🇰🇷 한글 설명
Linux 커널의 fsl-lpspi 드라이버에서 TX 채널 준비 실패 시 RX 채널이 종료되지 않고 계속 실행되는 취약점이 발견되었습니다. 이로 인해 SPI 코어가 DMA 버퍼를 해제한 후에도 RX DMA 엔진이 해당 버퍼에 계속 데이터를 쓰게 되어 메모리 오염이나 Use-After-Free가 발생할 수 있습니다.
💡 쉬운 설명
데이터를 보내는 과정에서 오류가 발생했을 때, 데이터를 받는 통로를 제대로 닫지 않아 발생하는 문제입니다. 이로 인해 이미 사용이 끝난 메모리 공간에 데이터가 잘못 기록되어 시스템이 망가질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
spi: fsl-lpspi: terminate the RX channel on TX prepare failure path
When dmaengine_prep_slave_sg() fails for the TX channel, the error path
terminates the TX DMA channel but leaves the RX channel running. Since
the RX channel was already submitted and issued prior to preparing
the TX descriptor, returning -EINVAL causes the SPI core to unmap the
DMA buffers while the RX DMA engine continues writing to them, leading
to potential memory corruption or use-after-free.
Terminate the RX channel before returning on the TX prepare failure path.
📍 영향받는 시스템
Linux kernel (fsl-lpspi driver 사용 시스템)
⚔️ 공격 벡터
특정 조건에서 TX DMA 준비 실패를 유도하여 메모리 오염 및 권한 상승 시도
🛡️ 대응 방법
TX 준비 실패 경로에서 RX 채널을 명시적으로 종료하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.