🇰🇷 한글 설명
Linux 커널의 dwc3 USB 컨트롤러 드라이버에서 이벤트 버퍼 카운트가 길이를 초과할 경우 인터럽트가 해제되지 않는 취약점이 발견되었습니다. 이로 인해 레벨 트리거 방식의 인터럽트 폭풍(IRQ storm)이 발생하며, 결국 커널 패닉을 유발하여 시스템이 중단될 수 있습니다.
💡 쉬운 설명
USB 장치 제어 과정에서 잘못된 데이터가 입력되면 컴퓨터가 쉴 새 없이 잘못된 신호를 처리하려다 결국 멈춰버리는 문제입니다. 마치 수도꼭지가 고장 나 물이 계속 쏟아지는데 밸브가 작동하지 않아 집안이 물바다가 되는 것과 비슷합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: dwc3: gadget: fix IRQ storm on invalid event buffer count
When dwc3_check_event_buf() reads a GEVNTCOUNT value exceeding the
event buffer length, commit 63ccd26cd1f6 ("usb: dwc3: gadget: check
that event count does not exceed event buffer length") returns IRQ_NONE
without writing back GEVNTCOUNT. Since the DWC3 interrupt is
level-triggered, the uncleared IRQ source keeps the line asserted,
causing a tight IRQ storm that accumulates 99,900 unhandled interrupts
and triggers spurious.c:184 BUG -> kernel panic.
The resulting call stack:
__report_bad_irq+0xac/0xc8
note_interrupt+0x340/0x468
handle_irq_event+0xac/0xc0
handle_fasteoi_irq+0x120/0x228
gic_handle_irq+0x68/0x108
...
kernel BUG at kernel/irq/spurious.c:184
To reproduce, write a bogus value exceeding the event buffer length
directly to the GEVNTCOUNT register:
devmem <DWC3_BASE + 0xc40c> 4 0x1004
Write the bogus count back to GEVNTCOUNT to clear the IRQ source,
consistent with the stale event clearing pattern in
dwc3_event_buffers_setup(), and schedule error recovery to
reinitialize the controller.
📍 영향받는 시스템
Linux kernel (dwc3 gadget driver 포함 버전)
⚔️ 공격 벡터
DWC3_BASE + 0xc40c 레지스터에 이벤트 버퍼 길이를 초과하는 잘못된 값을 직접 기록하여 발생
🛡️ 대응 방법
커널 패치를 적용하여 GEVNTCOUNT 값이 버퍼 길이를 초과할 경우 해당 값을 다시 써서 인터럽트를 해제하도록 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인하십시오.