You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft Font Subsetting DLL Stack Exhaustion at fontsub!GetComponentGlyphList
DDoS 微软说目前不打算修,没准将来会修,那就贴出来吧
Please excuse my poor English. I'm not a native speaker. I will do my best to describe this bug.
I test this on sytem
windows 10 professional
v1903 x64 bit
fontsub background
The Microsoft Font Subsetting DLL (fontsub.dll) is a default Windows helper library for subsetting TTF fonts; i.e. converting fonts to their more compact versions based on the specific glyphs used in the document where the fonts are embedded. It is used by Windows GDI and Direct2D, and parts of the same code are also found in the t2embed.dll library designed to load and process embedded fonts.
The DLL exposes two API functions: CreateFontPackage and MergeFontPackage. I have tested CreateFontPackage with a fuzzer.
crash
when I use a specific ttf file with CreateFontPackage , it crashed
0:000> g
ModLoad: 00007ffb`a5190000 00007ffb`a51b2000 C:\WINDOWS\system32\fontsub.dll
ModLoad: 00007ffb`b44d0000 00007ffb`b456e000 C:\WINDOWS\System32\msvcrt.dll
(4dec.5240): Stack overflow - code c00000fd (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
fontsub!ReadWord+0x1c:
00007ffb`a51a953c e8cbfeffff call fontsub!CheckInOffset (00007ffb`a51a940c)
Microsoft Font Subsetting DLL Stack Exhaustion at fontsub!GetComponentGlyphList
DDoS 微软说目前不打算修,没准将来会修,那就贴出来吧
Please excuse my poor English. I'm not a native speaker. I will do my best to describe this bug.
I test this on sytem
fontsub background
The Microsoft Font Subsetting DLL (fontsub.dll) is a default Windows helper library for subsetting TTF fonts; i.e. converting fonts to their more compact versions based on the specific glyphs used in the document where the fonts are embedded. It is used by Windows GDI and Direct2D, and parts of the same code are also found in the t2embed.dll library designed to load and process embedded fonts.
The DLL exposes two API functions: CreateFontPackage and MergeFontPackage. I have tested
CreateFontPackage
with a fuzzer.crash
when I use a specific ttf file with
CreateFontPackage
, it crashedcheck stack call
It's too long...it may exhausted all stack memory
crash analysis
fontsub!GetComponentGlyphList
has been called too many times.Let's see it in
ida
recursive condition
watch
[rsi]
datayou can see,
[rsi]
always is0
, ifr12w
is large, recursive callGetComponentGlyphList
will cause stack exhaustion.Conconlusion
If use a specific ttf file, it may cause some security issues.
The issue reproduces on a fully updated Windows 10 1903,I haven't tested on earlier versions of the system.
attachment is a poc ttf file
The text was updated successfully, but these errors were encountered: