Microsoft’s first bug
A heap corruption bug existed in the Windows font subsetting library (fontsub.dll) that could be triggered by a malformed font file. An attacker could potentially cause memory corruption, though the author notes a full exploit is not practical.
Published on ezqelusia.blogspot.com
Continuing the series on fuzzing, this section I will share how I find attack surfaces on windows to fuzz. On windows handling a lot of file formats, learn and fuzz these file formats are a common way to find bugs on windows today.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a heap corruption in the ReadTableIntoStructure function of fontsub.dll when processing a malformed font file.
Impact
The bug could cause memory corruption, but the author states that a full exploit is not possible in practice.
What the attacker needed
Ability to supply a malformed font file; target uses fontsub.dll
The fix
The bug was fixed in the April 2020 Microsoft patch (CVE-2020-0687).
How it was found
- Build a fuzzing harness for the CreateFontPackage and MergeFontPackage APIs using Project Zero's public harness.
- Create a corpus of font files from public sources and mutate them with Project Zero's TTF/OTF mutator.
- Minimise the corpus with winafl-cmin and check coverage.
- Run WinAFL with one master and seven slaves until crashes appear.
- Review the crashes and identify a heap corruption that resembles a previously fixed bug.
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 write-up has not been written yet. The Original tab links to the source.
This is about a bug in a Windows component that handles font files. A specially crafted font file could cause the program to mishandle memory, which might let an attacker crash it or possibly run their own code, though the author says a full exploit is not realistic.
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.