🇰🇷 한글 설명
Linux 커널의 ALSA emu10k1 드라이버에서 snd_emu10k1_pcm_channel_alloc() 함수 호출 시 배열 범위를 벗어난 접근이 발생하는 취약점입니다. 음성 할당 과정에서 인덱스가 배열 끝에 도달하여 다시 시작될 때, 이를 고려하지 않고 접근함으로써 메모리 경계를 초과하게 됩니다.
💡 쉬운 설명
사운드 카드를 사용하는 과정에서 컴퓨터가 정해진 메모리 공간을 넘어서는 잘못된 위치에 데이터를 쓰거나 읽을 수 있는 문제입니다. 이로 인해 시스템이 충돌하거나 예상치 못한 동작을 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc()
The voice allocator sometimes begins allocating from near the end of the
array and then wraps around, however snd_emu10k1_pcm_channel_alloc()
accesses the newly allocated voices as if it never wrapped around.
This results in out of bounds access if the first voice has a high enough
index so that first_voice + requested_voice_count > NUM_G (64).
The more voices are requested, the more likely it is for this to occur.
This was initially discovered using PipeWire, however it can be reproduced
by calling aplay multiple times with 16 channels:
aplay -r 48000 -D plughw:CARD=Live,DEV=3 -c 16 /dev/zero
UBSAN: array-index-out-of-bounds in sound/pci/emu10k1/emupcm.c:127:40
index 65 is out of range for type 'snd_emu10k1_voice [64]'
CPU: 1 PID: 31977 Comm: aplay Tainted: G W IOE 6.0.0-rc2-emu10k1+ #7
Hardware name: ASUSTEK COMPUTER INC P5W DH Deluxe/P5W DH Deluxe, BIOS 3002 07/22/2010
Call Trace:
<TASK>
dump_stack_lvl+0x49/0x63
dump_stack+0x10/0x16
ubsan_epilogue+0x9/0x3f
__ubsan_handle_out_of_bounds.cold+0x44/0x49
snd_emu10k1_playback_hw_params+0x3bc/0x420 [snd_emu10k1]
snd_pcm_hw_params+0x29f/0x600 [snd_pcm]
snd_pcm_common_ioctl+0x188/0x1410 [snd_pcm]
? exit_to_user_mode_prepare+0x35/0x170
? do_syscall_64+0x69/0x90
? syscall_exit_to_user_mode+0x26/0x50
? do_syscall_64+0x69/0x90
? exit_to_user_mode_prepare+0x35/0x170
snd_pcm_ioctl+0x27/0x40 [snd_pcm]
__x64_sys_ioctl+0x95/0xd0
do_syscall_64+0x5c/0x90
? do_syscall_64+0x69/0x90
? do_syscall_64+0x69/0x90
entry_SYSCALL_64_after_hwframe+0x63/0xcd
📍 영향받는 시스템
emu10k1 사운드 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
aplay와 같은 도구를 사용하여 다수의 채널을 요청함으로써 메모리 경계를 넘는 입력을 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 emu10k1 취약점이 수정된 최신 패치 버전인지 확인