A year of Windows kernel font fuzzing #1: the results
googleprojectzero.blogspot.com
googleprojectzero.blogspot.com
@font-face { src: url("/fonts/evil-font.ttf"); ... }
And making use of these? Do current browsers even use windows libraries for font handling?Edit: reading further, the article actually mentions two browser exploits, the first of which links to a proof-of-concept which is just a font file. So yes, it seems that just including a carefully-crafted font (an OTF in this case) could take your shellcode directly to the kernel.
https://bugs.chromium.org/p/project-zero/issues/detail?id=36...
https://dev.opera.com/blog/300-million-users-and-move-to-web...
"Opera sends 90 out the door"
"They were sacrificed for strategic choice to dump core technology, with Opera's proprietary engine Presto and JavaScript interpreter Carakan"
The license for OTS is permissive so I don't see why it couldn't also be used in Edge/IE although I've no idea if they do (or if they rolled their own even).
Tangential, anybody knows how Apple handles fonts?
Just looking at the fact that Flash still works with win32k lockdown enabled (meaning it can't use any GDI system calls) is probably enough evidence on its own (maybe). I don't know how other browsers handle font handling with Flash.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=523278
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=523278...
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=523278...
The relevant ironic quote: "Due to the modular design of Windows NT moving Window Manager and GDI to kernel mode will make no difference to the security subsystem or to the overall security of the operating system."
This was, as these things often go, an expedient decision made in the '90s that wouldn't be fixed for nearly 20 years.
A few years ago there was a remote code execution exploit that had to do with decoding EMF/WMF images in the kernel: https://www.symantec.com/security_response/vulnerability.jsp...
I believe that one got at least partially fixed by moving some of the video code out of the kernel and into user-mode with Vista, but I don't recall exactly.
To give an absurd example: what good is a fancy looking/feeling ATM if every third transaction gets siphoned to another continent?
Back when this transition happened in NT4, it actually led to many crashes which weren't there in the microkernel'ish design of the feature in NT 3.51.
I'm hopeful we'll return to Microkernel systems where couple with a capability system the damage an attacker can cause will be substantially smaller.
As far as I'm aware, I guess this can still occur.
https://bugs.documentfoundation.org/show_bug.cgi?id=62764&re...
EDIT: RTFAing, Google even mentions using longer runtimes:
> As shown in the table, the crashes were reported in three iterations: the first one obviously contained the bulk of the issues, as the fuzzer was hitting a lot of different states and code paths right from the start. The second and third iterations were run for a longer time, in order to shake out any crashes which might have been masked by other, more frequently hitting bugchecks.
EDIT x2: Also, it looks like they moved it out of the Kernel in Windows 10, so that's good.
> It's also worth noting that while the elevation of privileges scenario is mitigated in Windows 10 by the architectural shift to performing font rasterization in a user-mode process with restricted privileges, an RCE in the context of that process is still a viable option (although much more limited than directly compromising the ring-0 security context).
"it was trivial to discover with a dumb fuzzer, and it's surprising that such a bug could even survive until 2015, with so much work being supposedly put into the security of font processing."
(Emphasis mine.) I suppose they might be underplaying the complexity of the steps required to reproduce their finds, but it really doesn't look like it. Honestly I'm not that surprised. At times like this I'm reminded of the sheer amount of security holes out there in the wild and I just want to chuck my computer in the lake.
The backup tapes? I'm sure the trash is fine.
If anything it re-enforces it. From the repo introduction:
The current state of the code is quite rough. It's not known to compile with stable Rust 1.0 (the original version was written well before 1.0 stabilized), it doesn't handle composite glyphs, the code isn't organized with Cargo, and it's basically not ready for prime time.
To answer the parent's questions, which I unfortunately forgot to: if we translate Harfbuzz and FreeType to Rust, it won't take that long. See Dropbox's recent blogpost about their translation of Brotli's C code to Rust.