GHSL-2024-259: OOB-read in gst_wavparse_smpl_chunk in GStreamer - CVE-2024-47777
The gst_wavparse_smpl_chunk function in GStreamer reads 4 bytes from a fixed offset without checking the buffer size, causing an out-of-bounds read. An attacker could trigger this by supplying a crafted WAV file with a small smpl chunk, potentially reading beyond the buffer.
Originally disclosed on GitHub Security Lab
An OOB-read vulnerability has been identified in the gstwavparsesmplchunk function within gstwavparse.c.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The function reads from a fixed offset without verifying that the buffer is at least that large.
Impact
This vulnerability may result in reading 4 bytes out of the boundaries of the data buffer.
What the attacker needed
Crafted WAV file with small smpl chunk
The fix
The issue was fixed by adding a size check before reading from the buffer.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A program that processes WAV audio files has a function that reads a specific part of the file without first checking if the file is large enough. If a malicious file is too small, the program reads past the end of the data, which is an out-of-bounds read. This can cause crashes or leak memory contents.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.