🇰🇷 한글 설명
Linux 커널의 ALSA(Advanced Linux Sound Architecture) 코어에서 카드 초기화 시 NULL 모듈 포인터가 할당되는 취약점입니다. 사운드 코어가 내장(built-in)되어 있고 드라이버가 모듈로 빌드된 경우, 모듈 참조가 누락되어 모듈 제거 시 레이스 컨디션(Race Condition)이 발생할 수 있습니다.
💡 쉬운 설명
사운드 카드를 작동시키는 소프트웨어가 삭제될 때, 시스템이 이를 제대로 인식하지 못해 충돌이나 오류가 발생할 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안상 취약한 상태가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: core: Fix NULL module pointer assignment at card init
The commit 81033c6b584b ("ALSA: core: Warn on empty module")
introduced a WARN_ON() for a NULL module pointer passed at snd_card
object creation, and it also wraps the code around it with '#ifdef
MODULE'. This works in most cases, but the devils are always in
details. "MODULE" is defined when the target code (i.e. the sound
core) is built as a module; but this doesn't mean that the caller is
also built-in or not. Namely, when only the sound core is built-in
(CONFIG_SND=y) while the driver is a module (CONFIG_SND_USB_AUDIO=m),
the passed module pointer is ignored even if it's non-NULL, and
card->module remains as NULL. This would result in the missing module
reference up/down at the device open/close, leading to a race with the
code execution after the module removal.
For addressing the bug, move the assignment of card->module again out
of ifdef. The WARN_ON() is still wrapped with ifdef because the
module can be really NULL when all sound drivers are built-in.
Note that we keep 'ifdef MODULE' for WARN_ON(), otherwise it would
lead to a false-positive NULL module check. Admittedly it won't catch
perfectly, i.e. no check is performed when CONFIG_SND=y. But, it's no
real problem as it's only for debugging, and the condition is pretty
rare.
📍 영향받는 시스템
CONFIG_SND=y 설정이 되어 있고 특정 드라이버가 모듈(m)로 빌드된 Linux 커널 버전
⚔️ 공격 벡터
로컬 공격자가 특정 사운드 모듈을 로드 및 언로드하는 과정을 통해 레이스 컨디션을 유발하여 시스템 권한 탈취 시도 가능
🛡️ 대응 방법
커널 패치(commit 81033c6b584b 관련 수정 사항)가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 배포판 보안 공지를 통해 확인