GHSL-2024-094: OOB-write in Gstreamer - CVE-2024-47537
An integer overflow in Gstreamer's MP4 demuxer when parsing a crafted file can cause an out-of-bounds write. An attacker could crash the process or potentially corrupt memory.
Originally disclosed on GitHub Security Lab
In the following code snippet, the program attempts to reallocate the memory pointed to by stream->samples to accommodate stream->nsamples + samplescount elements of type QtDemuxSample:
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
Likely an integer overflow when adding a file-controlled sample count to an existing count, leading to an undersized allocation and subsequent out-of-bounds write.
Impact
This vulnerability overwrites the entire process memory, leading to a segmentation fault (SEGV).
What the attacker needed
Crafted MP4 file; victim opens the file
The fix
The issue was fixed and disclosed.
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.
When a program reads a file, it sometimes uses numbers from the file to decide how much memory to reserve. If a number is very large, adding it to another number can wrap around to a small value, so the program reserves too little memory. Later, it writes more data than fits, which can crash the program or corrupt memory.
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.