🇰🇷 한글 설명
Linux 커널의 dmaengine dw-edma 드라이버에서 pause() 및 resume() 함수가 채널 상태를 확인할 때 잠금(lock)을 사용하지 않아 발생하는 레이스 컨디션 취약점입니다. 이로 인해 채널 상태가 불일치하게 되어 DMA 채널이 영구적으로 중단되거나 먹통이 되는 상태에 빠질 수 있습니다.
💡 쉬운 설명
장치를 잠시 멈추거나 다시 시작하는 과정에서 데이터 처리 상태를 확인하는 순서가 꼬여 발생하는 문제입니다. 이 문제가 발생하면 해당 장치가 더 이상 작동하지 않고 멈춰버릴 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: dw-edma: Serialize channel state checks
pause() and resume() read and update channel state without holding vc.lock,
while the interrupt handlers update the same state under it. Take the same
lock around those state checks so that request, status, and configured stay
consistent.
For example, pause() can observe EDMA_ST_BUSY right before the interrupt
handler completes the final descriptor and moves the channel to
EDMA_ST_IDLE, and then record EDMA_REQ_PAUSE on an already idle channel. No
further interrupt will acknowledge the request, and since issue_pending()
requires EDMA_REQ_NONE, the channel is wedged for good: terminate_all()
leaves the stale request behind, so even reconfiguring the channel does not
recover it.
issue_pending() already runs under vc.lock, but it tests configured before
taking it. Move that test under the lock as well, so configured, request,
and status are evaluated as one channel-state snapshot.
📍 영향받는 시스템
Linux kernel (dw-edma 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
특정 타이밍에 DMA 채널 상태 변경 명령을 정밀하게 조작하여 채널을 먹통으로 만드는 로컬 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 dw-edma의 상태 체크 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.