🇰🇷 한글 설명
Linux 커널의 8250 DMA 직렬 포트 드라이버에서 RX DMA 종료 시 rx_running 상태가 초기화되지 않는 취약점이 발견되었습니다. 이로 인해 포트를 다시 열 때 NULL 채널을 DMA 엔진에 전달하게 되어 커널 Oops(시스템 충돌)가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 통신 장치를 껐다가 다시 켤 때, 이전의 잘못된 상태 정보가 남아 있어 시스템이 갑자기 멈추거나 오류를 일으킬 수 있는 문제입니다. 장치를 재사용하는 과정에서 데이터 통로를 제대로 확인하지 못해 발생하는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
serial: 8250_dma: Clear stale RX state on shutdown
serial8250_release_dma() terminates RX DMA and releases the channel, but
leaves rx_running set. If the port is closed while an RX transfer is
active, the stale state remains while rxchan is NULL until the channel is
requested again on the next open.
The DesignWare BUSY workaround added by commit a7b9ce39fbe4
("serial: 8250_dw: Ensure BUSY is deasserted") calls
serial8250_rx_dma_flush() from the LCR write path during startup. This
happens before serial8250_request_dma() obtains a new RX channel. On
reopen, the stale rx_running state therefore makes the flush path pass a
NULL channel to dmaengine_pause(), causing a kernel Oops.
Clear rx_running after terminating RX DMA, matching the TX cleanup. Also
make the flush helper return if the DMA object or RX channel is not
available so startup and teardown paths cannot pass a NULL channel to the
DMAengine API.
📍 영향받는 시스템
Linux kernel (serial: 8250_dma 관련 드라이버 포함 버전)
⚔️ 공격 벡터
로컬 공격자가 직렬 포트의 DMA 전송을 활성화한 상태에서 포트를 강제로 닫고 다시 여는 동작을 반복하여 커널 패닉 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 rx_running 상태 초기화 및 NULL 체크 로직을 적용해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인