🇰🇷 한글 설명
Linux 커널의 USB gadget UVC 드라이버에서 uvc_send_response() 함수가 응답 버퍼의 길이를 적절히 제한하지 않아 발생하는 취약점입니다. 데이터 소스 버퍼의 크기보다 큰 길이를 사용하여 memcpy()를 수행할 경우, 버퍼 범위를 벗어난 메모리 읽기가 발생할 수 있습니다.
💡 쉬운 설명
USB 장치 통신 과정에서 컴퓨터가 처리할 수 있는 데이터 크기보다 더 많은 데이터를 읽으려고 시도하는 오류입니다. 이로 인해 시스템의 중요한 정보가 유출되거나 프로그램이 비정상적으로 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: uvc: clamp SEND_RESPONSE length to the response buffer
uvc_send_response() builds the UVC control response from a user-supplied
struct uvc_request_data:
req->length = min_t(unsigned int, uvc->event_length, data->length);
...
memcpy(req->buf, data->data, req->length);
req->length is clamped to uvc->event_length, which is taken from the
host control request wLength (up to UVC_MAX_REQUEST_SIZE, 64), and to
data->length, which comes from the UVCIOC_SEND_RESPONSE ioctl and is
only checked for being negative. The source buffer data->data is only
60 bytes, so a response with uvc->event_length and data->length both
greater than 60 makes memcpy() read past the end of data->data.
Clamp req->length to sizeof(data->data) as well.
📍 영향받는 시스템
Linux kernel (USB gadget UVC driver 포함 버전)
⚔️ 공격 벡터
UVCIOC_SEND_RESPONSE ioctl을 통해 조작된 길이를 전달하여 메모리 경계 밖의 데이터를 읽도록 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 uvc_send_response()의 길이 제한 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전 이상인지 확인합니다.
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux