🇰🇷 한글 설명
Linux 커널의 ALSA PCM 구성 요소에서 snd_pcm_drain() 함수 호출 시 연결된 스트림 간의 대기 큐 리스트가 손상되는 취약점입니다. 동시 UNLINK 작업 시 고립된 대기 항목이 이전 큐에 남아 있어 리스트를 손상시키며, 이로 인해 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
사운드 장치를 처리하는 과정에서 데이터가 꼬여 시스템이 갑자기 멈추거나 꺼질 수 있는 오류입니다. 여러 작업이 동시에 사운드 데이터를 처리할 때 리스트 관리 방식의 문제로 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: PCM: Fix wait queue list corruption in snd_pcm_drain() on linked streams
snd_pcm_drain() uses init_waitqueue_entry which does not clear
entry.prev/next, and add_wait_queue with a conditional
remove_wait_queue that is skipped when to_check is no longer
in the group after concurrent UNLINK. The orphaned wait entry
remains on the unlinked substream sleep queue. On the next
drain iteration, add_wait_queue adds the entry to a new queue
while still linked on the old one, corrupting both lists. A
subsequent wake_up dereferences NULL at the func pointer
(mapped from the spinlock at offset 0 of the misinterpreted
wait_queue_head_t), causing a kernel panic.
Replace init_waitqueue_entry/add_wait_queue/conditional
remove_wait_queue with init_wait_entry/prepare_to_wait/
finish_wait. init_wait_entry clears prev/next via
INIT_LIST_HEAD on each iteration and sets
autoremove_wake_function which auto-removes the entry on
wake-up. finish_wait safely handles both the already-removed
and still-queued cases.
📍 영향받는 시스템
Linux Kernel (ALSA PCM 관련 모듈 사용 시스템)
⚔️ 공격 벡터
동시성 제어 미흡을 이용한 로컬 공격 또는 특정 사운드 스트림 조작을 통한 커널 패닉 유도
🛡️ 대응 방법
커널을 최신 버전으로 업데이트하여 init_wait_entry 및 finish_wait 기반의 수정된 코드를 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 보안 업데이트 버전인지 확인합니다.