Actions
Bug #2766
closedcrashes for invalid IP addresses when using mod_extforward
ASK QUESTIONS IN Forums:
Description
lighttpd crashes when using mod_extforward from an invalid IP.
These two cases have shown in my error.log:
2016-11-01 08:13:01: (mod_extforward.c.330) could not parse ip address 78.253.43.53:50883 because hostname nor servname provided, or not known (Bad file descriptor)
2016-01-14 11:58:53: (mod_extforward.c.331) could not parse ip address 147.13.742.564 because hostname nor servname provided, or not known (Bad file descriptor)
And this shows in my /var/log/messages:
Nov 1 08:13:01 x kernel: pid 31758 (lighttpd), uid 80: exited on signal 11
Updated by gstrauss almost 8 years ago
Please try this patch:
--- a/src/mod_extforward.c +++ b/src/mod_extforward.c @@ -423,6 +423,7 @@ URIHANDLER_FUNC(mod_extforward_uri_handler) { if (real_remote_addr != NULL) { /* parsed */ sock_addr sock; + sock.plain.sa_family = AF_UNSPEC; data_string *forwarded_proto = (data_string *)array_get_element(con->request.headers, "X-Forwarded-Proto"); if (NULL != forwarded_proto) {
Updated by Gilby almost 8 years ago
Thanks, I applied that patch a few days ago and so far no issues.
Updated by gstrauss almost 8 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset bb30f44530e127b6737998e939cc723e089c9045.
Actions
Also available in: Atom