Clam AntiVirus 7z Archive Parsing Integer Overflow Remote Code Execution Vulnerability
Clam AntiVirus fails to properly validate user-supplied data when parsing streams inside 7z archives, causing an integer overflow before a buffer is allocated. An attacker could exploit this to execute arbitrary code in the context of the ClamAV process.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Clam AntiVirus. Interaction with this product is required to exploit this vulnerability but attack vectors may vary depending on the implementation.
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 in the 7z stream parsing logic, where a user-controlled size is used in a calculation before a buffer allocation without proper bounds validation.
Impact
An attacker could execute arbitrary code in the context of the ClamAV process, though interaction with the product is required and attack vectors may vary.
What the attacker needed
Interaction with the product; crafted 7z archive
The fix
The vendor issued an update to correct the vulnerability.
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.
Clam AntiVirus is software that scans files for malware. When it opens a 7z compressed archive, it reads a size value from the file and uses it to reserve memory; if that number is crafted, the arithmetic wraps around and too little memory is reserved. A malicious archive could then overwrite memory and run attacker code as the scanner.
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.