🇰🇷 한글 설명
Linux 커널의 dummy_hcd 드라이버에서 USB 요청 처리 중 FIFO 요청 객체가 재사용되는 취약점입니다. 요청 완료 콜백이 실행되는 도중 다른 CPU에서 동일한 객체를 재사용하여 함수 포인터를 덮어씀으로써 시스템 충돌(GPF/Page Fault)을 유발할 수 있습니다.
💡 쉬운 설명
USB 장치를 흉내 내는 기능에서 데이터 처리가 끝나기도 전에 같은 메모리 공간을 다시 사용하려고 시도하여 컴퓨터가 멈추거나 오류가 발생하는 문제입니다. 이 과정에서 중요한 실행 정보가 망가져 시스템이 비정상적으로 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: dummy_hcd: prevent fifo_req reuse during giveback
dummy_hcd embeds a single shared usb_request (dum->fifo_req) that the
"emulated single-request FIFO" fast-path in dummy_queue() reuses for
small IN transfers: it copies the caller's request into it
(req->req = *_req) and queues it, treating list_empty(&fifo_req.queue)
as "the slot is free".
The completion side (dummy_timer/transfer/nuke/dummy_dequeue) follows
the standard pattern: list_del_init(&req->queue) unlinks the request,
then the lock is dropped and usb_gadget_giveback_request() invokes
req->complete(). But list_del_init() makes fifo_req.queue look empty
*before* the completion callback returns, so a concurrent dummy_queue()
on another CPU sees the slot as free, reuses fifo_req and runs
req->req = *_req -- overwriting req->complete while dummy_timer is
mid-calling it. The indirect call then jumps to a clobbered pointer,
causing a general protection fault / page fault in dummy_timer
(syzkaller extid faf3a6cf579fc65591ca). The clobbering write is an
in-bounds memcpy on a live shared object, so KASAN cannot flag it.
Add a fifo_req_busy bit covering the shared request's whole lifetime:
set it in dummy_queue() when the FIFO fast-path takes fifo_req (making
it the fast-path guard, replacing the list_empty(&fifo_req.queue)
test), and clear it after the completion callback has returned, via a
dummy_giveback() helper used at all four gadget-request giveback
sites. The shared slot can no longer be reused until its completion
callback has finished.
📍 영향받는 시스템
Linux kernel (dummy_hcd driver 사용 환경)
⚔️ 공격 벡터
멀티코어 환경에서 특정 USB 요청을 동시에 처리하여 메모리 경합(Race Condition) 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 fifo_req_busy 플래그가 적용된 패치를 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux