GHSL-2020-100: Out of Bounds (OOB) read vulnerability in FreeRDP - CVE-2020-13396
The FreeRDP NTLM challenge message parser calculates a copy length from attacker-controlled fields without checking it against the source buffer size, causing an out-of-bounds read. A remote attacker could trigger this by sending a crafted NTLM challenge, potentially reading memory beyond the buffer.
Originally disclosed on GitHub Security Lab
An out-of-bounds (OOB) read vulnerability has been detected in ntlmreadChallengeMessage due to a memcpy with an attacker-controlled size. This issue was addressed in FreeRDP version 2.1.1.
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 code computes a copy length from attacker-controlled fields and calls memcpy without verifying that the length fits within the source buffer.
Impact
This issue may lead to an Out-of-Bounds read.
What the attacker needed
Attacker can send a crafted NTLM challenge
The fix
The issue was fixed in FreeRDP version 2.1.1 by adding a bounds check before the copy.
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.
When a program copies data from one place to another, it must ensure the amount copied does not exceed the source's size. Here, the length was calculated from values the attacker controls, so the program could read past the end of a buffer. This is called an out-of-bounds read and can leak memory contents or crash the program.
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.