
CVE-2026-90781 독립 실행형 재현기: alsa-lib __snd_ctl_ascii_elem_id_parse()의 name= 파싱(따옴표 및 비따옴표)에서 발생하는 1바이트 OOB 쓰기
CVE-2026-90781에 대한 독립 실행형 C 재현기로, alsa-lib의 __snd_ctl_ascii_elem_id_parse()에서 name=(따옴표로 묶인 형태와 묶이지 않은 형태 모두)을 파싱할 때 발생하는 1바이트 범위 초과 쓰기(out-of-bounds write)입니다.
src/control/ctlparse.c(v1.2.16.1 및 이전 개발 HEAD)에서:
char buf[64];
...
if (size < (int)sizeof(buf)) { // BUG: allows size == 64
*ptr++ = *str;
size++;
}
...
*ptr = '\0'; // writes buf[64] when size == 64
numid= 경로는 이미 sizeof(buf) - 1로 수정되었으나, 두 개의 name= 루프는 수정되지 않았습니다.
gcc -o reproducer reproducer.c
./reproducer
# With AddressSanitizer (recommended to observe the OOB write):
gcc -fsanitize=address -g -o reproducer reproducer.c
./reproducer
WRITE of size 1 at ... Stack right redzone
reproducer.c — 취약한 파싱 로직과 수정된 파싱 로직을 정확히 그대로 재현src/control/ctlparse.c1e27d63 (numid= 경로)