🇰🇷 한글 설명
Linux 커널의 usb gadget f_uac1_legacy 드라이버에서 bRequest 인덱스 검증 미흡으로 인한 Out-of-Bounds(OOB) 취약점이 발견되었습니다. 공격자가 조작된 USB 요청을 보내면 5개 요소로 구성된 배열의 범위를 초과하여 힙 메모리에 접근할 수 있습니다.
💡 쉬운 설명
USB 장치가 컴퓨터와 통신할 때 사용하는 데이터 저장 공간의 크기를 제대로 확인하지 않는 오류가 있습니다. 나쁜 의도를 가진 USB를 연결하면 컴퓨터의 중요한 메모리 영역을 침범할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_uac1_legacy: validate bRequest index in generic_{set,get}_cmd
generic_set_cmd() and generic_get_cmd() use the low nibble of
ctrl->bRequest as an index into con->data[]:
u8 cmd = (ctrl->bRequest & 0x0F); /* 0 .. 15 */
...
con->data[cmd] = value; /* OOB when cmd >= 5 */
struct usb_audio_control (include/linux/usb/audio.h) declares data as
a 5-element array, so indices 5 through 15 write (or read) up to 44
bytes past the end of the array on the heap.
A malicious USB host can craft a class-specific SET_CUR / GET_CUR
request with an arbitrary bRequest value, triggering the out-of-bounds
access from an IRQ completion handler with no further preconditions.
Add an ARRAY_SIZE() guard to both functions.
📍 영향받는 시스템
Linux kernel (usb: gadget: f_uac1_legacy 관련 모듈 사용 시스템)
⚔️ 공격 벡터
조작된 bRequest 값을 포함한 클래스 특정 SET_CUR 또는 GET_CUR USB 요청 전송
🛡️ 대응 방법
Linux 커널을 최신 패치가 적용된 버전으로 업데이트하거나 generic_set_cmd 및 generic_get_cmd 함수에 ARRAY_SIZE() 가드 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 이후의 버전인지 확인합니다.