🇰🇷 한글 설명
Linux 커널의 usbip vudc 구성 요소에서 vep_dequeue() 함수 호출 시 NULL 포인터 역참조가 발생하는 취약점입니다. vep_alloc_request()에서 vrequest->udc를 초기화하지 않아 FunctionFS AIO 경로에서 취소 작업이 발생할 때 유효하지 않은 UDC 참조로 인해 시스템 오류(oops)가 발생할 수 있습니다.
💡 쉬운 설명
USB 장치를 연결하는 기능 중 특정 작업을 취소할 때 컴퓨터가 참조할 주소를 찾지 못해 시스템이 멈추거나 오류가 발생하는 문제입니다. 이 문제는 약 10년 동안 존재해 왔으며 특정 조건에서 시스템 불안정을 유발할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usbip: vudc: fix NULL deref in vep_dequeue()
vep_alloc_request() wasn't initializing vrequest->udc, so cancellations
on the FunctionFS AIO path were arriving in vep_dequeue without a valid
UDC reference.
Since vrequest->udc is never actually properly used anywhere, we opt to
remove it, and update vep_dequeue to obtain a reference to the udc with
ep_to_vudc(), consistent with the other vep_ ops.
AFAICT this bug has existed for ~10 years. Seems that nobody has really
stressed the FunctionFS AIO path on usbip's vudc.
I tested this fix in a QEMU aarch64 guest driving FunctionFS endpoints
via AIO. Before the fix, running `usbip attach` from the host would
cause the guest to oops with the following backtrace:
Call trace:
vep_dequeue+0x1c/0xe4 (P)
usb_ep_dequeue+0x14/0x20
ffs_aio_cancel+0x24/0x34
__arm64_sys_io_cancel+0xb0/0x124
do_el0_svc+0x68/0x100
el0_svc+0x18/0x5c
el0t_64_sync_handler+0x98/0xdc
el0t_64_sync+0x154/0x158
📍 영향받는 시스템
usbip vudc를 사용하는 Linux 커널 (FunctionFS AIO 경로 사용 시)
⚔️ 공격 벡터
호스트에서 usbip attach를 통해 FunctionFS 엔드포인트를 사용하는 게스트 시스템에 접근하여 특정 AIO 취소 시퀀스를 유도함
🛡️ 대응 방법
vrequest->udc를 제거하고 ep_to_vudc()를 사용하여 UDC 참조를 올바르게 획득하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인