🇰🇷 한글 설명
Linux 커널의 ALSA aloop 모듈에서 포맷 변경 시 발생하는 Use-After-Free(UAF) 취약점입니다. 재생 시작 시 캡처 스트림과 매개변수가 일치하지 않으면 캡처 측을 중지시키는데, 이 과정에서 락(lock)을 해제한 후 snd_pcm_stop()이 실행되어 이미 해제된 메모리에 접근할 수 있습니다.
💡 쉬운 설명
사운드 장치를 사용하는 과정에서 프로그램이 이미 삭제된 메모리 영역을 다시 사용하려고 시도하여 시스템 오류나 보안 문제가 발생할 수 있는 결함입니다. 특정 상황에서 소리 재생과 녹음 설정이 충돌할 때 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: aloop: Fix peer runtime UAF during format-change stop
loopback_check_format() may stop the capture side when playback starts
with parameters that no longer match a running capture stream. Commit
826af7fa62e3 ("ALSA: aloop: Fix racy access at PCM trigger") moved
the peer lookup under cable->lock, but the actual snd_pcm_stop() still
runs after dropping that lock.
A concurrent close can clear the capture entry from cable->streams[] and
detach or free its runtime while the playback trigger path still holds a
stale peer substream pointer.
Keep a per-cable count of in-flight peer stops before dropping
cable->lock, and make free_cable() wait for those stops before
detaching the runtime. This preserves the existing behavior while
making the peer runtime lifetime explicit.
📍 영향받는 시스템
ALSA aloop 모듈을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
동시적인 사운드 스트림 제어(재생 시작 및 캡처 종료/해제)를 통한 메모리 오염
🛡️ 대응 방법
커널 패치(Commit 826af7fa62e3)가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.