GHSL-2024-242: Integer underflow in FOURCC_strf parsing leading to OOB-read in GStreamer - CVE-2024-47545
An integer underflow in the parsing of the strf box in GStreamer's qtdemux can cause a negative size value, leading to an out-of-bounds read when copying data. An attacker could exploit this to read up to 4GB of process memory or cause a segmentation fault.
Originally disclosed on GitHub Security Lab
An integer underflow has been detected in qtdemuxparsetrak function within qtdemux.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 code subtracts 40 from a size value without checking if the size is at least 40, causing an integer underflow that results in a large unsigned value used in a memory copy.
Impact
This vulnerability can result in reading up to 4GB of process memory or potentially causing a segmentation fault (SEGV) when accessing invalid memory.
What the attacker needed
Malicious media 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 often uses numbers to decide how much data to copy. If a number becomes negative due to a mistake, the program might try to copy a huge amount of data, reading memory it shouldn't. This can crash the program or leak sensitive information.
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.