🇰🇷 한글 설명
Linux 커널의 ALSA 구성 요소에서 PREEMPT_RT 환경 사용 시 발생할 수 있는 데드락 취약점입니다. snd_pcm_group_lock_irq() 함수가 spin_lock_irq()를 호출할 때 softirq를 적절히 비활성화하지 않아, 타이머 소프트인터럽트와 softirq_ctrl.lock 간의 동기화 문제로 인해 시스템이 멈출 수 있습니다.
💡 쉬운 설명
컴퓨터의 소리 관련 기능을 처리하는 과정에서 특정 작업들이 서로를 기다리며 무한히 대기하는 '교착 상태'가 발생할 수 있는 문제입니다. 이로 인해 시스템이 응답하지 않거나 멈출 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT
snd_pcm_group_lock_irq() acquires a spinlock_t and disables interrupts
via spin_lock_irq(). This also implicitly disables the handling of
softirqs such as TIMER_SOFTIRQ.
On PREEMPT_RT softirqs are preemptible and spin_lock_irq() does not
disable them. That means a timer can be invoked during spin_lock_irq()
on the same CPU. Due to synchronisations reasons local_bh_disable() has
a per-CPU lock named softirq_ctrl.lock which synchronizes individual
softirq against each other.
syz-bot managed to trigger a lockdep report where softirq_ctrl.lock is
acquired in hrtimer_cancel() in addition to hrtimer_run_softirq(). This
is a possible deadlock.
The softirq_ctrl.lock can not be made part of spin_lock_irq() as this
would lead to too much synchronisation against individual threads on the
system. To avoid the possible deadlock, softirqs must be manually
disabled before the lock is acquired.
Disable softirqs before the lock is acquired on PREEMPT_RT.
📍 영향받는 시스템
PREEMPT_RT 패치가 적용된 Linux 커널 (ALSA 모듈 사용 환경)
⚔️ 공격 벡터
로컬 시스템에서 특정 사운드 장치 제어 및 타이머 인터럽트를 유발하여 데드락을 트리거할 수 있음
🛡️ 대응 방법
커널 패치를 통해 spin_lock_irq() 호출 전 수동으로 softirq를 비활성화하도록 업데이트해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 보안 패치 버전인지 확인하십시오.