Skip to content
Memory corruption Advisory Intermediate CVE-2020-11098

GHSL-2020-105: OOB read vulnerability in FreeRDP glyph_cache_put - CVE-2020-11098

An off-by-one error in the glyph_cache_put function of FreeRDP allows an attacker to cause an out-of-bounds read by supplying an index equal to the number of entries in the glyph cache array. This could lead to reading memory outside the intended array bounds.

antonio-morales Follow

Originally disclosed on GitHub Security Lab

An out-of-bounds (OOB) read vulnerability has been detected in glyphcacheput due to an Off-by-one error in boundary condition checking.

antonio-morales, on GitHub Security Lab

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 boundary check uses '>' instead of '>=' when comparing the index to the number of elements, allowing an index equal to the size to pass and cause an out-of-bounds read.

Impact

This issue may lead to an out-of-bounds read, potentially disclosing memory contents or causing a crash.

What the attacker needed

Attacker can control the index value indirectly

The fix

The bug was fixed by the vendor, likely by changing the boundary check to use '>=' instead of '>'.

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.

In C, arrays are numbered starting from 0, so an array with 5 elements has valid indices 0 to 4. The code checks that an index is not greater than the number of elements, but it should check that it is not greater than or equal to the number. This mistake lets an attacker access one element past the end of the array, reading memory that is not part of the array.

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.

More by antonio-morales

View all

45 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.