CVE-2023-45677
Heap buffer out of bounds write in start_decoder in stb_vorbis
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
stb_vorbis es una librería de archivo único con licencia MIT para procesar archivos ogg vorbis. Un archivo manipulado puede provocar una escritura fuera de límites en `f->vendor[len] = (char)'\0';`. La causa principal es que si `len` leído en `start_decoder` es un número negativo y `setup_malloc` asigna memoria exitosamente en ese caso, pero la escritura en memoria se realiza con un índice negativo `len`. De manera similar, si len es INT_MAX, el desbordamiento de enteros len+1 ocurre en `f->vendor = (char*)setup_malloc(f, sizeof(char) * (len+1));` y `f->comment_list[i] = (char*)setup_malloc(f, tamaño de(char) * (len+1));`. Este problema puede provocar la ejecución del código.
CVSS Scores
SSVC
- Decision:Attend
Timeline
- 2023-10-10 CVE Reserved
- 2023-10-20 CVE Published
- 2023-10-27 EPSS Updated
- 2024-09-12 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-787: Out-of-bounds Write
CAPEC
References (6)
URL | Tag | Source |
---|---|---|
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658 | Third Party Advisory | |
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3653 | Third Party Advisory | |
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658 | Third Party Advisory | |
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3670C7-L3670C75 | Third Party Advisory | |
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L950-L961 | Third Party Advisory | |
https://securitylab.github.com/advisories/GHSL-2023-145_GHSL-2023-151_stb_image_h | Third Party Advisory |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Nothings Search vendor "Nothings" | Stb Vorbis.c Search vendor "Nothings" for product "Stb Vorbis.c" | 1.22 Search vendor "Nothings" for product "Stb Vorbis.c" and version "1.22" | - |
Affected
|