Buffer overflow in libavi_plugin memmove() call
The AVI parser in VLC uses a signed width value taken from the file without a strict check before a memory move, so a malformed AVI can cause a buffer overflow. An attacker could crash the player and may achieve remote code execution.
- Triaged in 12 hours
- Fixed in 5 months
- Paid in 22 days
- Disclosed after 5 months
Summary: When parsing an invalid AVI file, a buffer overflow might occur.
Description: The ReadFrame function in the avi.c file uses a variable i_width_bytes, which is obtained directly from the file. It is a signed integer. It does not do a strict check before the memory operation(memmove, memcpy), which may cause a buffer overflow.
Steps To Reproduce:
1.) Open vlc.exe with windbg 2.) F5 makes the program run 3 ) Drag poc files into vlc 4.) Monitor the crash from WinDBG
vlc version 3.0.6 x64 system version win7 x64
More relevant information and poc in the attachment
Impact
If successful, a malicious third party could trigger an invalid memory access, leading to a crash of the process of the VLC media player. May cause remote code execution.
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 a signed width value read from the file is used in a memory move without validating that it is non-negative and within the destination buffer.
Impact
A malicious third party could trigger an invalid memory access and crash VLC, and may cause remote code execution.
What the attacker needed
Victim opens a crafted AVI file
How it was found
- Open vlc.exe with windbg
- Press F5 to make the program run
- Drag the poc file into vlc
- Monitor the crash from WinDBG
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.
A media player reads a signed size value from a video file without a strict check before a memory move, which may cause a buffer overflow and crash it.
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.