Actions
Bug #2993
closedsegmentation fault with 8 $HTTP["url"] and mod_webdav
ASK QUESTIONS IN Forums:
Description
Hi. I get a segfault with a simple configuration file (which is a simplified version of what I actually use):
var.basedir = "/var/www/localhost" var.logdir = "/var/log/lighttpd" var.statedir = "/var/lib/lighttpd" server.modules = ( "mod_webdav" ) include "mime-types.conf" server.username = "lighttpd" server.groupname = "lighttpd" server.document-root = var.basedir + "/htdocs" server.pid-file = "/var/run/lighttpd.pid" server.errorlog = var.logdir + "/error.log" $HTTP["url"] =~ "^/a/" { dir-listing.activate = "disable" } $HTTP["url"] =~ "^/b/" { dir-listing.activate = "disable" } $HTTP["url"] =~ "^/c/" { dir-listing.activate = "disable" } $HTTP["url"] =~ "^/d/" { dir-listing.activate = "disable" } $HTTP["url"] =~ "^/e/" { dir-listing.activate = "disable" } $HTTP["url"] =~ "^/f/" { dir-listing.activate = "disable" } $HTTP["url"] =~ "^/g/" { dir-listing.activate = "disable" } $HTTP["url"] =~ "^/h/" { dir-listing.activate = "disable" } # vim: set ft=conf foldmethod=marker et :
# lighttpd -D -f lighttpd.test.conf && echo "ok" Segmentation fault
The segfault does not happen if I remove at least one of $HTTP["url"] directives, or if I remove mod_webdav. I run gentoo on a 32 bit arm vps. Lighttpd version is 1.4.54.
Files
Updated by flynn almost 5 years ago
This should be already fixed for version 1.4.55, see #2958 for further information.
Updated by khumarahn almost 5 years ago
Thanks a lot!!! 1.4.55 is not yet available.. Is it ok to use this patch on 1.4.54?
commit 075241c773931d8ed9f2cc7d60a28ce95c48d497 Author: Glenn Strauss <gstrauss@gluelogic.com> Date: Wed Jun 5 23:54:44 2019 -0400 [mod_webdav] fix startup crash w/ multiple conds (fixes #2958) (thx flynn) x-ref: "lighttpd 1.4.54 segfaults on start in mod_webdav" https://redmine.lighttpd.net/issues/2958 diff --git a/src/mod_webdav.c b/src/mod_webdav.c index 121e4033..39905298 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -1275,8 +1275,8 @@ SERVER_FUNC(mod_webdav_worker_init) * across a fork() system call into the child process. */ plugin_data * const p = (plugin_data *)p_d; - plugin_config *s = p->config_storage[0]; - for (int n_context = p->nconfig+1; --n_context; ++s) { + for (int i = 0; i < p->nconfig; ++i) { + plugin_config *s = p->config_storage[i]; if (!buffer_is_empty(s->sqlite_db_name) && mod_webdav_sqlite3_prep(s->sql, s->sqlite_db_name, srv->errh) == HANDLER_ERROR)
Updated by khumarahn almost 5 years ago
Anyway, I applied the patch and lighttpd looks working. Thanks again. How do I close issues here....
Updated by gstrauss almost 5 years ago
- Category set to mod_webdav
- Status changed from New to Duplicate
Updated by gstrauss almost 5 years ago
- Is duplicate of Bug #2958: lighttpd 1.4.54 segfaults on start in mod_webdav added
Actions
Also available in: Atom