Skip to content
Memory corruption Advisory Advanced CVE-2024-47537

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.

antonio-morales Follow

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:

antonio-morales, on GitHub Security Lab

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.

More by antonio-morales

View all

45 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.