Re:Vulnerability in Microsoft Font Driver Could Allow Remote...
by rogerhoward on Monday July 20, 2015 @10:36PM
(#9920282)
> Word and JPEG are both examples of such "direct to memory" formats
I think you mean Word and PSD, not JPEG - otherwise spot on.
Re:Vulnerability in Microsoft Font Driver Could Allow Remote...
by pjc50 on Tuesday July 21, 2015 @05:41AM
(#9921192)
JPEG exploit: https://www.f-secure.com/v-descs/ms04-028.shtml
Re:Vulnerability in Microsoft Font Driver Could Allow Remote...
by rogerhoward on Tuesday July 21, 2015 @03:48PM
(#9925223)
Not saying JPEG hasn't had its share of exploits, but that the format itself isn't an example (like DOC, and PSD) of a format that can be described as "direct to memory" in the same sense. DOC and PSD are in many ways just the in-memory data structures of the apps that create them, written to disk.
http://www.joelonsoftware.com/items/2008/02/19.html
"These are binary formats, so loading a record is usually a matter of just copying (blitting) a range of bytes from disk to memory, where you end up with a C data structure you can use. There’s no lexing or parsing involved in loading a file. Lexing and parsing are orders of magnitude slower than blitting."
PSD is much the same - it's why interop with PSDs is such a challenge.
JPEG has to be parsed and decompressed - another source of problems, but not remotely in the same category.
Re:Vulnerability in Microsoft Font Driver Could Allow Remote...
by blueflow on Tuesday July 21, 2015 @03:41AM
(#9920943)
JPEG is perfectly streamable and beside from the beginning of the file not randomly accessible. You have to iterate through all the markers to find your data, so mmap doesn't bring much advantage when parsing...
Also note that this exploit was for Adobe's code and their fonts don't have any imperative hinting instructions (hints in CFF are purely declarative), which makes your first point moot.
OpenType Layout is most certainly used in "regular" fonts if you happen to be one of the 2+ billion people whose non-"sensible" languages can't be written without such features.