🔍 CVE-2024-57981

5.5
CVSS Score
MEDIUM
2025-02-27
2026-10-15 02:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 USB XHCI 드라이버에서 명령어 중단(abort) 처리 중 NULL 포인터 참조로 인한 커널 패닉이 발생합니다. 링 세그먼트의 마지막 TRB에 명령어가 큐잉되고 나중에 중단되면, dequeue 포인터가 다음 세그먼트로 이동하고 새로운 명령어가 없을 때 cur_cmd가 NULL인 상태에서 xhci_mod_cmd_timer()가 호출되어 충돌합니다.

💡 쉬운 설명

A USB driver crash occurs when certain USB devices don't respond to commands properly. The kernel tries to set up a timer without checking if there's an actual command to manage, causing a system crash (kernel panic).

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: usb: xhci: Fix NULL pointer dereference on certain command aborts If a command is queued to the final usable TRB of a ring segment, the enqueue pointer is advanced to the subsequent link TRB and no further. If the command is later aborted, when the abort completion is handled the dequeue pointer is advanced to the first TRB of the next segment. If no further commands are queued, xhci_handle_stopped_cmd_ring() sees the ring pointers unequal and assumes that there is a pending command, so it calls xhci_mod_cmd_timer() which crashes if cur_cmd was NULL. Don't attempt timer setup if cur_cmd is NULL. The subsequent doorbell ring likely is unnecessary too, but it's harmless. Leave it alone. This is probably Bug 219532, but no confirmation has been received. The issue has been independently reproduced and confirmed fixed using a USB MCU programmed to NAK the Status stage of SET_ADDRESS forever. Everything continued working normally after several prevented crashes.

📍 영향받는 시스템

Linux kernel with USB XHCI host controller driver (versions before CVE-2024-57981 fix)

⚔️ 공격 벡터

Local or via malicious USB device (MCU programmed to indefinitely NAK Status stage of SET_ADDRESS)

🛡️ 대응 방법

Apply kernel security patch adding NULL check for cur_cmd before xhci_mod_cmd_timer() invocation

🔧 검증 코드

If NULL/panic messages appear, vulnerability may be triggered; if only kernel version displays, cross-reference with CVE-2024-57981 patch release notes for your version

Shell / Script
dmesg | grep -iE '(xhci.*null|kernel panic.*usb)' 2>/dev/null || uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel