CVE-2023-45675: GHSL-2023-145_GHSL-2023-151/GHSL-2023-165_GHSL-2023-172: Several memory access violations in stb_image and stb_vorbis
stbimage.h and stbvorbis libraries contain several memory access violations of different severity.
Other sources
stbvorbis 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 the len read in startdecoder is -1 and len + 1 becomes 0 when passed to setupmalloc. The setupmalloc behaves differently when f->alloc.allocbuffer is pre-allocated. Instead of returning NULL as in malloc case it shifts the pre-allocated buffer by zero and returns the currently available memory block. This issue may lead to code execution.
Affected Software
Event History
Frequently Asked Questions
What is CVE-2023-45675?
CVE-2023-45675 is a vulnerability in the stb_vorbis library that allows for a 0 byte write heap buffer overflow in the start_decoder function.
How severe is CVE-2023-45675?
CVE-2023-45675 has a severity rating of 7.8, which is considered high.
What is the root cause of CVE-2023-45675?
The root cause of CVE-2023-45675 is an out of bounds write in the f->vendor[len] assignment in the start_decoder function.
What software is affected by CVE-2023-45675?
The stb_vorbis library version 1.22 is affected by CVE-2023-45675.
How can I fix CVE-2023-45675?
To fix CVE-2023-45675, it is recommended to update to a patched version of the stb_vorbis library.