
Standalone reproducer for CVE-2026-90781: 1-byte OOB write in alsa-lib __snd_ctl_ascii_elem_id_parse() name= parsing (quoted and unquoted)
Standalone C reproducer for CVE-2026-90781, a 1-byte out-of-bounds write in alsa-lib's __snd_ctl_ascii_elem_id_parse() when parsing name= (both quoted and unquoted forms).
In src/control/ctlparse.c (v1.2.16.1 and earlier development HEAD):
char buf[64];
...
if (size < (int)sizeof(buf)) { // BUG: allows size == 64
*ptr++ = *str;
size++;
}
...
*ptr = '\0'; // writes buf[64] when size == 64
The numid= path was already fixed to sizeof(buf) - 1; the two name= loops were not.
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 — mirrors the exact vulnerable and fixed parsing logicsrc/control/ctlparse.c1e27d63 (numid= path)