Description
stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. A crafted file may trigger out of bounds write in `f->vendor[len] = (char)'\0';`. The root cause is that if `len` read in `start_decoder` is a negative number and `setup_malloc` successfully allocates memory in that case, but memory write is done with a negative index `len`. Similarly if len is INT_MAX the integer overflow len+1 happens in `f->vendor = (char*)setup_malloc(f, sizeof(char) * (len+1));` and `f->comment_list[i] = (char*)setup_malloc(f, sizeof(char) * (len+1));`. This issue may lead to code execution.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| nothings | stb | <= 1.22 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libstb | No fix yet | — |
| Debian 13 | libstb | No fix yet | — |
| Debian 12 | libstb | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libstb | No fix yet | — |
| Ubuntu 26.04 LTS | libstb | No fix yet | — |
| Ubuntu 25.10 | libstb | No fix yet | — |
| Ubuntu 24.04 LTS | libstb | No fix yet | — |
| Ubuntu 22.04 LTS | libstb | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | libstb | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Package Hub 15 SP6 | SDL2_sound | 2.0.4-bp156.2.3.1 | openSUSE-SU-2025:0037-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | SDL2_sound | 2.0.4-1.1 | openSUSE-SU-2025:14642-1 |
| openSUSE Tumbleweed | SDL3_sound | 3.2.0-1.1 | openSUSE-SU-2026:10978-1 |
| openSUSE Leap 15.6 | SDL2_sound | 2.0.4-bp156.2.3.1 | openSUSE-SU-2025:0037-1 |
Advisories 3
- openSUSE-SU-2026:10978-1 SDL3_sound-devel-3.2.0-1.1 on GA media SUSE / openSUSE Security Updates · Jun 10, 2026
- openSUSE-SU-2025:0037-1 Security update for SDL2_sound SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2025:14642-1 SDL2_sound-devel-2.0.4-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://securitylab.github.com/advisories/GHSL-2023-145_GHSL-2023-151_stb_image_h/
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3653
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3670C7-L3670C75
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L950-L961