Re: Very large font size crashing X Font Server and Grounding Server to a Halt (was: remote DoS in Mozilla 1.0)

From: Juliusz Chroboczek (
Date: Fri Jun 14 2002 - 08:46:47 EST

To answer a couple of the questions in this thread.

The Type 1 backend currently in XFree86 (originally by IBM and
Lexmark) uses static memory allocation (it was designed for embedded
systems) and does indeed have very poor error handling. The current
plan is to replace the Type 1 backend altoghether with a unified Type
1 and TrueType backend based on the FreeType library. This will
hopefully happen in 4.3.0.

As far as I know, nobody is currently working on fixing the (legacy)
Type 1 backend. While patches to fix its behaviour are likely to get
accepted, I think that getting the Type 1 backend to work reasonably
is more work than it's worth now that FreeType does a decent job with
Type 1 fonts.

As to out of memory allocations: with a few exceptions, the core X
server code deals smartly with malloc returning NULL: the current
client receives a BadAlloc error (``insufficient resources''), and
other clients are not bothered. (On the other hand, it is a rare
client that will deal gracefully with a BadAlloc; and if it's your
window manager that gets the error, all hell breaks loose.)

With current Linux kernels, this careful coding brings no benefit
whatsover, as malloc never (?) returns NULL. What is worse, as far as
I know the kernel doesn't send advance warning of an OOM situation; it
would not be too difficult to stop allocating memory when that happens.

I suggest xpert at as the right list to continue this
discussion. If you follow up on linux-kernel, please be so kind as to
CC me.


                                        Juliusz Chroboczek

P.S. As always, none of the above represents an official position of
the XFree86 project, but merely my personal perception of the
situation. This message may or may not have any sort of relationship
with reality.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:31 EST