🔍 CVE-2026-89739

0.0
CVSS Score
UNKNOWN
2026-09-11
2026-10-21 13:20
✅ 완료

🇰🇷 한글 설명

Linux 커널의 dwc3 USB 가젯 드라이버에서 레이스 컨디션으로 인한 Use-After-Free(UAF) 취약점이 발견되었습니다. dwc3_gadget_free_endpoints 함수가 메모리를 해제하기 전에 대기 중인 지연된 작업(delayed work)을 취소하지 않아 발생합니다. 이로 인해 이미 해제된 메모리 영역에 접근하려는 시도가 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터가 USB 장치를 정리하는 과정에서, 아직 끝나지 않은 작업이 있는데 메모리를 먼저 지워버려 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: gadget: Fix use-after-free in dwc3_gadget_free_endpoints due to race condition In dwc3_gadget_init_endpoint, &dep->nostream_work is bound with dwc3_nostream_work, and dwc3_gadget_endpoint_stream_event can queue this delayed work on system_percpu_wq when a DEPEVT_STREAM_NOSTREAM event is received. If we remove the gadget, dwc3_gadget_free_endpoints makes cleanup and the memory allocated for dep with kzalloc() is released by kfree(dep), while the delayed work mentioned above may still be pending or running. The sequence of operations that may lead to a UAF bug is as follows: CPU0 CPU1 | dwc3_thread_interrupt | dwc3_endpoint_interrupt | dwc3_gadget_endpoint_stream_event | queue_delayed_work(system_percpu_wq, | &dep->nostream_work) dwc3_gadget_free_endpoints | dwc3_free_trb_pool(dep) | list_del(&dep->endpoint.ep_list) | dwc3_debugfs_remove_endpoint_dir(dep) | kfree(dep) | // dep is freed | | dwc3_nostream_work | // use dep (use-after-free) Fix it by canceling the delayed work before kfree(dep) in dwc3_gadget_free_endpoints.

📍 영향받는 시스템

Linux kernel (dwc3 gadget driver component)

⚔️ 공격 벡터

특정 USB 이벤트(DEPEVT_STREAM_NOSTREAM)를 유도하여 레이스 컨디션을 일으킴으로써 메모리 오류 유발

🛡️ 대응 방법

커널 패치를 적용하여 dwc3_gadget_free_endpoints 호출 시 kfree(dep) 이전에 delayed work를 취소하도록 업데이트

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel