🇰🇷 한글 설명
Linux 커널의 ALSA 타이머 구성 요소에서 발생하는 취약점으로, 사용자 공간에서 유도된 타이머(utimer)가 직렬화 없이 snd_timer_interrupt()를 호출하여 동일한 인스턴스에 대해 두 개의 콜백이 동시에 실행될 수 있습니다. 이로 인해 첫 번째 콜백이 종료되면서 플래그를 해제하면, 실행 중인 두 번째 콜백이 참조하는 데이터가 해제되는 Use-After-Free(UAF) 취약점이 발생합니다.
💡 쉬운 설명
컴퓨터 소리 관련 타이머 기능에서 작업이 끝나기도 전에 같은 작업을 중복으로 실행하여, 이미 삭제된 메모리 영역에 접근하려고 시도하는 오류입니다. 이로 인해 시스템이 충돌하거나 보안 공격에 노출될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: timer: don't re-enter an instance callback that is still running
The userspace-driven timer (utimer) TRIGGER ioctl calls
snd_timer_interrupt() directly with no serialization, so two threads
triggering the same utimer can run snd_timer_interrupt() on one
snd_timer concurrently.
snd_timer_process_callbacks() drops timer->lock around each instance
callback and marks the in-flight callback with the single
SNDRV_TIMER_IFLG_CALLBACK bit; snd_timer_close_locked() waits on that
bit to drain an in-flight callback before freeing the instance. The bit
cannot represent two concurrent callbacks: when a second interrupt
re-queues an instance whose callback is still running, both run at once,
the first to finish clears the bit, and the close-path drain then frees
the instance (and its callback_data) while the other callback is still
live - a use-after-free reachable by any user able to open
/dev/snd/timer, both via a user timer instance and via a sequencer queue
timer bound to the utimer.
snd_timer_interrupt() sets IFLG_CALLBACK before dropping timer->lock, so
a concurrent interrupt already observes it under the lock. Skip
re-queuing an instance (and its slaves) to the ack/sack list while its
callback is in flight; the accumulated pticks are delivered on the next
tick, so no event is lost.
📍 영향받는 시스템
Linux Kernel (ALSA subsystem)
⚔️ 공격 벡터
/dev/snd/timer 장치에 접근 권한이 있는 로컬 사용자가 타이머 인스턴스를 조작하여 발생
🛡️ 대응 방법
ALSA 타이머 콜백 실행 중 중복 실행을 방지하도록 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인