GPAC Project on Advanced Content library MPEG-4 Decoding multiple multiplication integer overflow vulnerabilities
Multiple integer overflow vulnerabilities in GPAC's MPEG-4 decoding allow a crafted MPEG-4 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.
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 arithmetic resulting in a heap-based buffer overflow that causes memory corruption.
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 the library trusts size fields from the MPEG-4 file and multiplies them without checking for integer overflow, leading to an undersized heap allocation.
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
- Open a crafted MPEG-4 file with the GPAC library.
- The library parses atoms and reads a size field.
- The size field is used to calculate a heap allocation without overflow check.
- An undersized buffer is allocated.
- The library reads data into the buffer, causing a heap 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 in the file to decide how much memory to set aside. If those numbers are not checked properly, the program can set aside too little memory and then write more data than fits, corrupting memory. This can let an attacker run their own code on the victim's computer.
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.