CVE-2026-74682 in Linux
요약
\~에 의해 VulDB • 2026. 08. 23.
리눅스 커널에서 다음 취약점이 해결되었습니다:
ALSA: usb-audio: Type II inbound URB에서의 OOB(범위 밖) 쓰기 수정
data_ep_set_params() 함수는 Format Type II 전송 구분자(delimiter)를 추가하기 전에 각 URB 전송 버퍼의 크기를 다음과 같이 설정합니다.
u->packets = urb_packs; u->buffer_size = maxsize * u->packets;
if (fmt->fmt_type == UAC_FORMAT_TYPE_II) u->packets++; /* 전송 구분자용 */ u->urb = usb_alloc_urb(u->packets, GFP_KERNEL);
buffer_size는 증분 전의 패킷 수를 기반으로 계산되며 재계산되지 않으므로, Type II 엔드포인트의 경우 URB가 구축될 때 지정된 패킷 수보다 버퍼 크기가 한 패킷 분만큼 부족합니다.
prepare_inbound_urb() 함수는 이후 각 패킷당 하나의 ISO 프레임을 배치하며 buffer_size를 참조하지 않습니다:
offs = 0; for (i = 0; i < urb_ctx->packets; i++) {
urb->iso_frame_desc[i].offset = offs;
urb->iso_frame_desc[i].length = ep->curpacksize;
offs += ep->curpacksize; }
urb->transfer_buffer_length = offs; urb->number_of_packets = urb_ctx->packets;
따라서 마지막 설명자(descriptor)는 전송 버퍼의 끝을 넘어 한 패킷 지점을 가리키며, 호스트 컨트롤러는 모든 inbound(수신) 전송 시 장치 데이터를 해당 위치에 기록합니다. prepare_silent_urb() 및 prepare_playback_urb() 함수는 채우기 루프(fill loops)를 ctx->buffer_size로 제한하므로, capture(녹음) 기능만 영향을 받습니다.
fmt_type 값은 디바이스의 오디오 스트리밍 설명자(descriptor)에서 파생되므로, Type II 캡처 형식을 광고하는 모든 디바이스는 사용자가 공간(userspace)에서 스트림에 hw_params를 설정하면 이 취약점이 발생합니다.
7.2.0-rc5 (arm64) 환경에서 dummy_hcd/raw-gadget 장치를 사용한 KASAN 테스트 결과, inbound 전송마다 하나의 보고가 생성되었습니다:
BUG: KASAN: slab-out-of-bounds in dummy_timer Write of size 64 at addr ffff0000186171c0 by task cons02/166 __asan_memcpy dummy_timer hrtimer_run_softirq Allocated by task 166: usb_alloc_coherent snd_usb_endpoint_set_params The buggy address is located 0 bytes to the right of allocated 64-byte region [ffff000018617180, ffff0000186171c0)
delimiter 패킷이 고려된 후에 buffer_size를 계산하고, prepare_silent_urb()가 outbound(송신) 측에서 이미 수행하는 것처럼 채우기 루프(buffer fill loop)를 buffer_size로 제한합니다. 이로 인해 모든 Type II URB 할당 시 maxsize 패킷 분만큼 크기가 증가합니다.
XBOW에 의해 발견되었으며, Baul Lee <[email protected]>가 triage(분류/분석)를 수행했습니다.
VulDB is the best source for vulnerability data and more expert information about this specific topic.