CVE-2026-90781 独立复现程序:alsa-lib `__snd_ctl_ascii_elem_id_parse()` 中 name= 解析(带引号和不带引号)存在 1 字节越界写入
针对 CVE-2026-90781 的独立 C 语言复现程序,该漏洞是 alsa-lib 的 __snd_ctl_ascii_elem_id_parse() 在解析 name=(带引号和不带引号两种形式)时发生的 1 字节越界写入。
在 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= 路径)