VMware VNC Pointer Decode Code Execution Vulnerability
A type confusion in VMware's VNC cursor decoding allows a specially crafted sequence of VNC messages to cause a stack buffer overflow, potentially leading to code execution. An attacker can initiate a VNC session and send these messages to trigger the overflow.
Originally disclosed on Cisco Talos
An exploitable code execution vulnerability exists in the remote management functionality of VMware . A specially crafted set of VNC packets can cause a type confusion resulting in stack overwrite, which could lead to code execution.
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 a race condition between threads handling cursor rendering and encoding, combined with a type confusion when TrueColor mode is disabled, causes a high value to be written into a PNG info struct and later used as a loop counter, leading to stack overflow.
Impact
This could lead to code execution, but exploitation is easier on Linux than on Windows, and it requires a successful VNC authentication beforehand (though by default VMware does not require authentication).
What the attacker needed
VNC session initiated; VNC authentication (if enabled)
The fix
Turning on VNC authentication should mitigate this, turning it from a no-auth bug to a single-auth one.
How it was found
- Initiate a VNC session to the VMware VNC server.
- Send a VNC SetPixelFormat message with bits-per-pixel and depth set to 0x8 to disable TrueColor mode.
- Send a VNC FrameBufferUpdateRequest message with the incremental field not set.
- Send a VNC PointerEvent message (or any message that causes the cursor to be re-rendered).
- The server misinterprets the cursor type, writes a high value into the PNG info struct, and enters a loop that overflows the stack.
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.
VNC is a protocol for remote desktop access. The bug happens because the server misinterprets the type of data when rendering the mouse cursor, leading to a loop that writes too much data onto the stack, which can crash the program or let an attacker run their own code.
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.