FreeRDP Rdp Client Recv RDP Code Execution Vulnerability
A specially crafted RDP server response can cause an out-of-bounds write in FreeRDP's receive functionality due to improper validation of a length field. An attacker who controls the server or performs a man-in-the-middle attack could potentially execute code.
Originally disclosed on Cisco Talos
An exploitable code execution vulnerability exists in the RDP receive functionality of FreeRDP 2.0.0-beta1+android11. A specially crafted server response can cause an out-of-bounds write resulting in an exploitable condition.
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
The length field from the RDP packet is not validated before being used in a subtraction and passed to a decryption function, leading to a negative length and out-of-bounds write.
Impact
An attacker could potentially execute code on the client machine, but the exploit requires the attacker to control the server or be a man-in-the-middle.
What the attacker needed
Attacker controls RDP server or MITM
How it was found
- Run the included Python server.
- Connect the FreeRDP client to the server.
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.
FreeRDP is software that lets you connect to remote desktops. When it receives data from a server, it trusts a length value in the packet. If that value is too small, the program writes data outside its intended memory area, which can crash it 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.