138 points · by ingve · 10y ago · 38 comments
@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...
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?
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).
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.