GHSL-2020-106: integer signedness mismatch leading to OOB read in FreeRDP - CVE-2020-4030
An integer signedness mismatch in FreeRDP's trio_length_max function causes a negative precision value to be treated as a huge unsigned maximum, leading to an out-of-bounds read. An attacker could potentially trigger this when trace logging is enabled, causing the program to read beyond the intended buffer.
Originally disclosed on GitHub Security Lab
An integer signedness mismatch vulnerability has been detected in the triolengthmax function in triostr.c.
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 signed integer (precision) was passed to a function expecting an unsigned size_t, so a negative value was interpreted as a huge positive number.
Impact
This issue may lead to Out-of-Bounds read.
What the attacker needed
Trace logging enabled; attacker can influence input to TrioParse
The fix
The patch was published, but the text does not describe the fix details.
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.
This report describes a bug in a library called FreeRDP. A function that is supposed to limit how many characters to read from a string receives a negative number, but because the number is stored in an unsigned variable, it becomes a very large positive number. The function then reads past the end of the string, which can crash the program or leak memory contents.
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.