Project

General

Profile

Actions

Bug #2023

closed

lighttpd results a DoS when using kqueue in FreeBSD 7 STABLE

Added by blackm0re over 15 years ago. Updated over 15 years ago.

Status:
Duplicate
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

For the past 10 months I have been 'fighting' with an abnormal behavior involving lighttpd and FreeBSD 7.x.
I finally managed to narrow the problem to the kqueue configuration option.

Problem description:
I run the latest (FreeBSD-port) version of lighttpd (as I said, the problem has existed in the past versions as well).
I am using the fast_cgi module to run php5. When I execute a very simple php-upload script (that I have been running since 2001 under Apache+mod_php5 and later on with lighttpd+fast_cgi) my entire server crashes.

crashes = All services seize to function, I am unable to log-in, no crash logs are written in /var/log. I am unable to boot the system in the normal way.
All existing connections (ssh) to the server start to idle (without being formally canceled by the server).
I don't get a kernel panic, though (since the kernel answers to imcp (ping) requests).

Kqueue:
I experienced the problem for the first time around May, 2008. Since then I have installed the system from scratch. I also managed to reproduce the same problem with my other server (also running a FreeBSD 7.X-STABLE).
Since the problem exists only when I execute the script I started to investigate the cause of it using lots of different configuration options.
I finally noticed that the problem does not occur when I remove the: 'server.event-handler = "freebsd-kqueue"' line from lighttpd.conf

I am providing you all information about my system and current setup (as an attachment).

The configuration options in php.ini seem to be almost irrelevant, since the problem occur even when I turn file_uploads = Off, safe_mode = Off.. and so on.
The problem is also reproduced with FreeBSD's GENERIC kernel.

Steps to reproduce:
1. Unpack the provided attachment
2. Install lighttpd and php (ports-options are provided in the attachment)
3. Configure lighttpd.conf (server.event-handler = "freebsd-kqueue"' is enabled by default which makes this bug even more severe).
4. Place the provided index.html and update.php to e proper location.
5. Change the commented line in update.php (to point at a real location. This location should be writable for the php (fastcgi) user).
6. Call the script (attempt to upload a small binary file (f.i .jpg file)).

Should you need any more information, I will gladly provide it for you.

Best regards
Simeon


Files

lighttpd-crash.tar.bz2 (23.5 KB) lighttpd-crash.tar.bz2 Different configuration files and .php script blackm0re, 2009-07-08 08:23
Actions #1

Updated by darix over 15 years ago

  • Status changed from New to Duplicate

see #1993
this is not a lighttpd issue but a freebsd kernel issue.

Actions #2

Updated by stbuehler over 15 years ago

  • Target version deleted (1.4.x)
Actions

Also available in: Atom