🔍 CVE-2025-40314

0.0
CVSS Score
UNKNOWN
2025-12-08
2026-10-14 22:10
✅ 완료

🇰🇷 한글 설명

Linux 커널의 cdns3 gadget 드라이버에서 초기화 또는 종료 과정 중 Use-after-free 취약점이 발견되었습니다. gadget 구조체가 엔드포인트보다 먼저 해제되어 엔드포인트 리스트에 댕글링 포인터가 남게 되며, 이후 엔드포인트 해제 시 메모리 오류가 발생합니다.

💡 쉬운 설명

컴퓨터 부품을 정리할 때, 연결된 부품들을 먼저 정리하지 않고 본체를 먼저 버려서 발생하는 문제입니다. 이로 인해 시스템이 잘못된 메모리 주소를 참조하여 오류가 발생하거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: usb: cdns3: gadget: Use-after-free during failed initialization and exit of cdnsp gadget In the __cdnsp_gadget_init() and cdnsp_gadget_exit() functions, the gadget structure (pdev->gadget) was freed before its endpoints. The endpoints are linked via the ep_list in the gadget structure. Freeing the gadget first leaves dangling pointers in the endpoint list. When the endpoints are subsequently freed, this results in a use-after-free. Fix: By separating the usb_del_gadget_udc() operation into distinct "del" and "put" steps, cdnsp_gadget_free_endpoints() can be executed prior to the final release of the gadget structure with usb_put_gadget(). A patch similar to bb9c74a5bd14("usb: dwc3: gadget: Free gadget structure only after freeing endpoints").

📍 영향받는 시스템

Linux kernel (cdns3 gadget driver 사용 시스템)

⚔️ 공격 벡터

USB gadget 장치의 초기화 또는 종료 과정을 유도하여 메모리 오류를 일으키는 방식

🛡️ 대응 방법

엔드포인트를 먼저 해제한 후 gadget 구조체를 해제하도록 수정된 최신 Linux 커널로 업데이트

🔧 검증 코드

출력된 커널 버전이 취약점이 패치된 최신 버전인지 확인

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel