CVE-2022–27492: An integer underflow in WhatsApp causing remote code execution when receiving a crafted video file
A crafted video file sent to WhatsApp could trigger an integer underflow in the video file handler, corrupting memory. An attacker who convinced a user to play the dropped video could potentially achieve remote code execution.
Published on infosecwriteups.com
A crafted video file could have triggered a remote code execution due to an integer underflow in WhatsApp. An unspecified code block of the component Video File Handler is affected by this RCE bug.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a size or length value in the video file handler was decremented below zero, wrapping to a large number that was then used for memory allocation or indexing.
Impact
A crafted video could corrupt memory and potentially allow remote code execution, though the text gives no confirmation that exploitation was demonstrated in the wild.
What the attacker needed
Victim receives a crafted video; victim plays the video in WhatsApp
The fix
The text does not describe the vendor patch; it only advises allocating the correct amount of memory and using language features that detect 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 write-up has not been written yet. The Original tab links to the source.
A computer stores numbers in fixed-size slots, and if a calculation makes a number smaller than the slot can hold, it wraps around to a huge value instead. Here that wrapped value was used to decide how much memory to set aside, so the program could write past the end of its buffer and crash or run attacker code. The attacker only had to get a victim to play a specially made 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.