News for hackers. Stuff that matters.
Re:Memory Safety for Web Fonts by oergiR on Wednesday March 19, 2025 @12:49PM (#43414397)
FreeType was written when fonts were local, trusted, resources, and it was written in low-level C to be fast. The TrueType/OpenType format is also made for fast access, e.g. with internal pointers, making validation a pain.

So though FreeType is carefully written w.r.t. correctness, it was not meant to deal with malicious input and that robustness is hard to put in afterwards.

Re:Memory Safety for Web Fonts by ack_complete on Wednesday March 19, 2025 @04:07PM (#43416693)
TrueType also just has way too much complexity accumulated into it. The character to glyph mapping table alone has nine different encoding formats. I was only writing a TTF file instead of reading it and the complexity was still impressive.
Re:Memory Safety for Web Fonts by oefrha on Wednesday March 19, 2025 @01:47PM (#43415166)
If you think FreeType is bad, wait until you find out win32k.sys used to parse TrueType fonts directly in the kernel. https://msrc.microsoft.com/blog/2009/11/font-directory-entry... (that’s just one of a million vulnerabilities thanks to kernel mode font parsing.)