🇰🇷 한글 설명
Linux 커널의 sata_dwc_460ex 드라이버에서 NCQ 태그 완료 비트 스캔 중 무한 루프가 발생하는 취약점이 발견되었습니다. 특정 조건에서 비트 마스크가 오버플로되어 0이 되면, 루프 조건이 항상 참이 되어 스핀락을 보유한 채 하드웨어 인터럽트(hardirq) 컨텍스트에서 무한 루프에 빠지게 됩니다.
💡 쉬운 설명
컴퓨터의 저장 장치와 통신하는 과정에서 특정 신호를 처리할 때 계산 오류로 인해 시스템이 멈추는 현상이 발생할 수 있습니다. 이 오류가 발생하면 시스템이 응답하지 않는 상태(프리징)가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ata: sata_dwc_460ex: fix infinite loop in NCQ tag completion bit-scanning
The hand-rolled bit-scanning loop in the NCQ completion path has an
infinite loop bug. When tag_mask has only high bits set (e.g.
0x80000000), the inner while loop left-shifts tag_mask until it
overflows to 0. At that point !(0 & 1) is always true and 0 <<= 1
stays 0, causing an infinite loop in hardirq context with a spinlock
held.
Replace the open-coded bit-scanning with __ffs() which correctly
finds the least significant set bit and is bounded by the width of
the argument.
📍 영향받는 시스템
sata_dwc_460ex 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
특정 하드웨어 상태(NCQ 태그 마스크 오버플로 유발)를 조작하여 시스템을 멈추게 하는 로컬 또는 물리적 공격
🛡️ 대응 방법
비트 스캔 방식을 __ffs() 함수를 사용하는 방식으로 수정하여 패치된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.