🇰🇷 한글 설명
Linux 커널의 ALSA 구성 요소에서 snd_pcm_drain() 함수가 연결된 스트림을 처리할 때 발생하는 취약점입니다. 스트림 그룹 멤버십이 변경되는 과정에서 대기 항목이 적절히 제거되지 않아, 이후 wake_up() 호출 시 해제된 스택 프레임을 참조하게 되어 시스템 오류를 유발할 수 있습니다.
💡 쉬운 설명
사운드 장치를 사용하는 과정에서 특정 연결이 끊길 때, 컴퓨터 메모리의 잘못된 위치를 참조하게 만드는 오류입니다. 이로 인해 시스템이 멈추거나 예기치 않은 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: wake linked drain waiters on unlink
snd_pcm_drain() on a linked stream parks an on-stack wait entry on the
drained peer's runtime->sleep, and after schedule_timeout() removes it
only if that peer is still found in the caller's group. If group
membership changes during the wait and the sleep ends by signal or
timeout (so autoremove_wake_function() does not run), finish_wait() is
skipped and snd_pcm_drain() returns with the entry still queued on that
stream's sleep list; a later wake_up() then walks a freed stack frame.
This is reachable by unlinking either the drained or the draining stream.
Unlike the close path (snd_pcm_drop() -> snd_pcm_post_stop()),
snd_pcm_unlink() never wakes the sleep queues. Wake every group member
under the group lock before the membership change, so a linked drainer is
released and drops its entry while the streams are still grouped.
The window was opened when snd_pcm_link_rwsem stopped being held across
the wait and the removal became conditional on group membership (see
Fixes). The later switch to finish_wait() kept that conditional removal,
so the signal/timeout case remained.
📍 영향받는 시스템
Linux Kernel (ALSA 구성 요소가 포함된 버전)
⚔️ 공격 벡터
연결된 사운드 스트림의 unlink 작업을 통해 메모리 오류를 유도하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.