Skip to content
Memory corruption Advisory Advanced CVE-2021-21853CVE-2021-21854CVE-2021-21855CVE-2021-21856CVE-2021-21857CVE-2021-21858

GPAC Project Advanced Content MPEG-4 Decoding multiple integer addition overflow vulnerabilities

Multiple integer overflow vulnerabilities in GPAC's MPEG-4 decoding allow a crafted file to cause a heap-based buffer overflow, leading to memory corruption and potential code execution. An attacker can convince a user to open a malicious video to trigger the issue.

A member Follow

Originally disclosed on Cisco Talos

High 8.8 View original

Multiple exploitable integer overflow vulnerabilities exist within the MPEG-4 decoding functionality of the GPAC Project on Advanced Content library v1.0.1. A specially crafted MPEG-4 input can cause an integer overflow due to unchecked addition arithmetic resulting in a heap-based buffer overflow that causes memory…

a member, on Cisco Talos

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

Impact

This can result in code execution under the context of the library.

What the attacker needed

Victim opens a crafted MPEG-4 file

How it was found

  1. Craft an MPEG-4 file with a 'name' atom whose size field is set to a value that causes the 32-bit length to be 0xffffffff.
  2. Open the file with a GPAC-based application, which triggers the name_box_read function.
  3. The function truncates the 64-bit size to 32 bits, adds 1, and overflows to zero, allocating a zero-sized buffer.
  4. The function then reads 0xffffffff bytes into the zero-sized buffer, causing a heap-based buffer overflow.

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 video file, it uses numbers from the file to decide how much memory to set aside. If those numbers are huge, adding one can wrap around to a tiny number, so the program sets aside too little memory and then copies a lot of data into it, overwriting other memory. This can let an attacker run their own code on your computer if you open a malicious video.

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 A member

View all

110 more disclosed reports, best first.

More from Cisco Talos

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.