🇰🇷 한글 설명
Linux 커널의 USB gadget UVC 드라이버에서 uvc_function_bind() 및 uvc_function_unbind() 함수 호출 시 dangling pointer가 발생하는 취약점이 발견되었습니다. 오류 처리 과정에서 메모리 해제 후 포인터를 NULL로 설정하지 않아 Use-After-Free(UAF) 취약점이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터가 USB 장치를 연결하거나 해제할 때, 이미 사용이 끝난 메모리 주소를 계속 붙잡고 있어 발생하는 오류입니다. 이로 인해 해커가 시스템의 제어권을 탈취하거나 시스템을 강제로 종료시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: uvc: fix dangling pointers in uvc_function_bind() and uvc_function_unbind()
In uvc_function_bind() error path, we use usb_ep_free_request which
uses uvc->control_req but does not set it to NULL afterwards. Thus,
uvc->control_req is a dangling pointer causing a UAF. Also we do not set
the uvc->control_buf pointer to NULL after freeing it, which is another
dangling pointer. Fix it by setting uvc->control_req to NULL after we run
usb_ep_free_request() and uvc->control_buf to NULL after kfree. Do the
same for uvc_function_unbind().
📍 영향받는 시스템
Linux kernel (USB gadget UVC driver 관련 모듈 사용 시스템)
⚔️ 공격 벡터
악의적으로 조작된 USB 장치를 연결하여 커널의 UVC 드라이버 오류 경로를 유도함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 메모리 해제 후 포인터를 NULL로 초기화하도록 수정함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.