🇰🇷 한글 설명
Linux 커널의 ALSA 컨트롤 기능에서 snd_ctl_elem_init_enum_names() 함수가 버퍼 길이를 적절히 검증하지 않아 발생하는 취약점입니다. 버퍼 길이가 0이 되었음에도 strnlen()을 호출할 경우, Clang의 FORTIFY_SOURCE 기능이 객체 크기 불일치를 감지하여 시스템 패닉(BRK exception)을 유발할 수 있습니다.
💡 쉬운 설명
사운드 관련 기능을 처리하는 과정에서 데이터의 길이를 잘못 계산하여 컴퓨터가 갑자기 멈추거나 재부팅될 수 있는 오류입니다. 데이터가 끝났는데도 계속 읽으려고 시도할 때 보안 기능이 이를 오류로 판단하여 시스템을 강제로 중단시키는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: control: Validate buf_len before strnlen() in snd_ctl_elem_init_enum_names()
snd_ctl_elem_init_enum_names() advances pointer p through the names
buffer while decrementing buf_len. If buf_len reaches zero but items
remain, the next iteration calls strnlen(p, 0).
While strnlen(p, 0) returns 0 and would hit the existing name_len == 0
error path, CONFIG_FORTIFY_SOURCE's fortified strnlen() first checks
maxlen against __builtin_dynamic_object_size(). When Clang loses track
of p's object size inside the loop, this triggers a BRK exception panic
before the return value is examined.
Add a buf_len == 0 guard at the loop entry to prevent calling fortified
strnlen() on an exhausted buffer.
Found by kernel fuzz testing through Xiaomi Smartphone.
📍 영향받는 시스템
ALSA(Advanced Linux Sound Architecture)를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
로컬 공격자가 조작된 사운드 컨트롤 데이터를 통해 커널 패닉을 유도하여 서비스 거부(DoS) 공격 수행
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인합니다.