🔍 CVE-2026-31778

7.1
CVSS Score
HIGH
2026-05-01
2026-05-11 18:05
✅ 완료

🇰🇷 한글 설명

Linux 커널의 ALSA caiaq 드라이버에서 USB 오디오 디바이스 이름 처리 중 스택 오버플로우 취약점입니다. 버퍼 범위 확인 실수로 널 터미네이터가 덮어써져 스택 메모리 내용을 읽을 수 있습니다. 다중 바이트 UTF-8 문자가 포함된 USB 장치로 쉽게 트리거됩니다.

💡 쉬운 설명

컴퓨터의 사운드 시스템이 USB 오디오 장치의 이름을 처리할 때 메모리 경계를 잘못 계산하는 오류입니다. 공격자는 특별한 이름의 USB 장치를 연결하여 컴퓨터의 민감한 메모리 정보를 읽을 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: ALSA: caiaq: fix stack out-of-bounds read in init_card The loop creates a whitespace-stripped copy of the card shortname where `len < sizeof(card->id)` is used for the bounds check. Since sizeof(card->id) is 16 and the local id buffer is also 16 bytes, writing 16 non-space characters fills the entire buffer, overwriting the terminating nullbyte. When this non-null-terminated string is later passed to snd_card_set_id() -> copy_valid_id_string(), the function scans forward with `while (*nid && ...)` and reads past the end of the stack buffer, reading the contents of the stack. A USB device with a product name containing many non-ASCII, non-space characters (e.g. multibyte UTF-8) will reliably trigger this as follows: BUG: KASAN: stack-out-of-bounds in copy_valid_id_string sound/core/init.c:696 [inline] BUG: KASAN: stack-out-of-bounds in snd_card_set_id_no_lock+0x698/0x74c sound/core/init.c:718 The off-by-one has been present since commit bafeee5b1f8d ("ALSA: snd_usb_caiaq: give better shortname") from June 2009 (v2.6.31-rc1), which first introduced this whitespace-stripping loop. The original code never accounted for the null terminator when bounding the copy. Fix this by changing the loop bound to `sizeof(card->id) - 1`, ensuring at least one byte remains as the null terminator.

📍 영향받는 시스템

Linux kernel v2.6.31-rc1 (2009년 6월) 이후 모든 버전

⚔️ 공격 벡터

다중 바이트 UTF-8 문자가 포함된 특수 조작 제품명의 USB 오디오 디바이스 연결

🛡️ 대응 방법

Linux 커널을 최신 버전으로 업데이트하여 패치 적용

🔧 검증 코드

드라이버가 로드된 상태('vulnerable driver loaded' 출력)이면 현재 커널이 취약한 상태이며, 'driver not loaded'이면 드라이버가 활성화되지 않은 상태입니다.

Shell / Script
lsmod | grep snd_usb_caiaq && echo "vulnerable driver loaded" || echo "driver not loaded"

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel