🇰🇷 한글 설명
Linux 커널의 dpaa2-eth 드라이버에서 TSO 헤더를 처리할 때 DMA 언맵(unmap)을 먼저 수행한 후 가상 주소를 조회하여 잘못된 주소를 참조하는 취약점입니다. 이로 인해 kfree 호출 시 유효하지 않은 가상 주소가 사용되어 커널 패닉(Kernel Paging Request Error)이 발생할 수 있습니다.
💡 쉬운 설명
네트워크 데이터를 처리하는 과정에서 메모리 주소를 잘못 계산하여 컴퓨터 시스템이 갑자기 멈추거나 오류를 일으킬 수 있는 문제입니다. 잘못된 주소를 참조하여 시스템의 핵심 기능이 중단될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dpaa2-eth: retrieve the virtual address before dma_unmap
The TSO header was DMA unmapped before the virtual address was retrieved
and then used to free the buffer. This meant that we were actually
removing the DMA map and then trying to search for it to help in
retrieving the virtual address. This lead to a invalid virtual address
being used in the kfree call.
Fix this by calling dpaa2_iova_to_virt() prior to the dma_unmap call.
[ 487.231819] Unable to handle kernel paging request at virtual address fffffd9807000008
(...)
[ 487.354061] Hardware name: SolidRun LX2160A Honeycomb (DT)
[ 487.359535] pstate: a0400005 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 487.366485] pc : kfree+0xac/0x304
[ 487.369799] lr : kfree+0x204/0x304
[ 487.373191] sp : ffff80000c4eb120
[ 487.376493] x29: ffff80000c4eb120 x28: ffff662240c46400 x27: 0000000000000001
[ 487.383621] x26: 0000000000000001 x25: ffff662246da0cc0 x24: ffff66224af78000
[ 487.390748] x23: ffffad184f4ce008 x22: ffffad1850185000 x21: ffffad1838d13cec
[ 487.397874] x20: ffff6601c0000000 x19: fffffd9807000000 x18: 0000000000000000
[ 487.405000] x17: ffffb910cdc49000 x16: ffffad184d7d9080 x15: 0000000000004000
[ 487.412126] x14: 0000000000000008 x13: 000000000000ffff x12: 0000000000000000
[ 487.419252] x11: 0000000000000004 x10: 0000000000000001 x9 : ffffad184d7d927c
[ 487.426379] x8 : 0000000000000000 x7 : 0000000ffffffd1d x6 : ffff662240a94900
[ 487.433505] x5 : 0000000000000003 x4 : 0000000000000009 x3 : ffffad184f4ce008
[ 487.440632] x2 : ffff662243eec000 x1 : 0000000100000100 x0 : fffffc0000000000
[ 487.447758] Call trace:
[ 487.450194] kfree+0xac/0x304
[ 487.453151] dpaa2_eth_free_tx_fd.isra.0+0x33c/0x3e0 [fsl_dpaa2_eth]
[ 487.459507] dpaa2_eth_tx_conf+0x100/0x2e0 [fsl_dpaa2_eth]
[ 487.464989] dpaa2_eth_poll+0xdc/0x380 [fsl_dpaa2_eth]
📍 영향받는 시스템
Linux kernel (dpaa2-eth driver used in architectures like SolidRun LX2160A)
⚔️ 공격 벡터
특수하게 조작된 네트워크 패킷을 전송하여 dpaa2-eth 드라이버의 TSO 처리 로직을 트리거함으로써 발생
🛡️ 대응 방법
dma_unmap 호출 전에 dpaa2_iova_to_virt()를 호출하여 가상 주소를 먼저 확보하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전인지 확인합니다.