Hello All Mongrel Users,
For the unintiated, Mongrel is a web server that runs Ruby web
really fast. Read http://mongrel.rubyforge.org/ to get find out more
This is the Iron Mongrel release. It is the result of trying to trash
Mongrel until it can’t move and then fixing anything that comes up. The
work was done on EastMedia’s and VeriSign’s upcoming project in order to
make sure it can handle heavy loads and potentially malformed requests.
project is a security and identity project so having a web server that
able to block bad requests is very important.
The testing methods used were (are):
- Unit testing what I can. Mongrel is a server so many tests have to
- Thrashing Mongrel’s HTTP parser internally with random or
data (called fuzzing).
- Using “Peach Fuzz”:http://peachfuzz.sourceforge.net/ to thrash
live apps with randomness.
- Running several extensive little scripts to explore the edges of
- Heavy code audits covering as much code as possible to find any
The end result is a lot of little fixes which make Mongrel more robust
against badly behaving clients and possibly against many potential
risks in the future. In general Mongrel 0.3.12.1 behaves more
compared to past releases when given random data or maliciously
The main changes are related to how IO is processed and how the HTTP
rejects “bad” input. What the parser now blocks is:
- Any header over 112k.
- Any query string over 10k.
- Any header field value over 80k.
- Any header field name over 256 bytes.
- Any request URI (the file part, not the whole thing) greater than 512
As soon as these conditions are detected the client is disconnected
immediately and a log message is printed out listing the IP address, the
exact cause, and the data that caused it. I’ll remove the data dump
but I want people to shoot me valid requests that cause parser errors.
That’s not all though. I’ve started a “security”:security.html page
I’ll publish the results of security threats, tests, and improvements as
well as any advice for folks.
This release also features a few little features here and there:
- Initial support for a “config script”. I’ll be documenting this more,
it basically lets you use the Mongrel::RailsConfigurator to augment your
application’s config via a small script. Just pass “-S
and put any Mongrel::RailsConfigurator statements that are reasonable.
- Mongrel will report the correct REMOTE_ADDR variable, but it does a
trick where if there is an X-FORWARDED-FOR header then it sets
- Fixes for little bugs like double log messages, but not a lot of
to the overall core.
Go ahead and install the usual way: gem install mongrel or gem
Zed A. Shaw
P.S. The snazzy Iron Mongrel logo is courtesy court3nay from