Project

General

Profile

Bug #1216

lighty 1.4.13 crashes with accessing out of bound fd array index

Added by Anonymous over 10 years ago. Updated over 10 years ago.

Status:
Fixed
Priority:
Urgent
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

When server.max-fds was set lower than system/process limits in lighttpd.conf it allocates that number of file descriptors to process evenets with various back-ends type.
However if lighty get larger number of fds under high system load it will access the array without checking whether the index is valid or not. That results in segfault or voluntary abort() in fdevent_get_context().

It can be easily demonstrated with lower fd value, say "server.max-fds = 100", while maintaining large number of active connections. Sometimes lighty records "accept failed: Too many open files" in error log and ignore the excessive file descriptor but it's not enough as lightty tries to accept connections upto 100 in network_server_handle_fdevent().

-- pyunyh

History

#1

Updated by jan over 10 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

might be fixed in r1873

Also available in: Atom