https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412021-01-08T22:11:44Zlighty labsLighttpd - Bug #3052: segfault with mod_scgi on backend server with unix socket domainhttps://redmine.lighttpd.net/issues/3052?journal_id=122012021-01-08T22:11:44Zgstrauss
<ul><li><strong>Target version</strong> changed from <i>1.4.x</i> to <i>1.4.59</i></li></ul><p>Thanks for letting us know. It appears that <code>gw_host * const host</code> member (<code>host->host</code>) is NULL and derefencing (<code>host->host->ptr</code>) results in the a crash. I'll trace back to find out why.</p> Lighttpd - Bug #3052: segfault with mod_scgi on backend server with unix socket domainhttps://redmine.lighttpd.net/issues/3052?journal_id=122022021-01-08T22:32:17Zgstrauss
<ul></ul><p>While lighttpd does not start the backend (via <code>"bin-path"</code>), then there is a chance that <code>host->host</code> might not be initialized.</p>
<pre>
--- a/src/gw_backend.c
+++ b/src/gw_backend.c
@@ -314,7 +314,8 @@ static void gw_proc_check_enable(gw_host * const host, gw_proc * const proc, log
log_error(errh, __FILE__, __LINE__,
"gw-server re-enabled: %s %s %hu %s",
- proc->connection_name->ptr, host->host->ptr, host->port,
+ proc->connection_name->ptr,
+ host->host ? host->host->ptr : "", host->port,
host->unixsocket && host->unixsocket->ptr ? host->unixsocket->ptr : "");
}
</pre>
<p>There are some other places in gw_backend.c which I will fix, but those paths are only hit when debug is enabled.</p> Lighttpd - Bug #3052: segfault with mod_scgi on backend server with unix socket domainhttps://redmine.lighttpd.net/issues/3052?journal_id=122032021-01-08T22:47:36Zgstrauss
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Patch Pending</i></li></ul> Lighttpd - Bug #3052: segfault with mod_scgi on backend server with unix socket domainhttps://redmine.lighttpd.net/issues/3052?journal_id=122042021-01-08T23:05:08Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li></ul><p>Applied in changeset <a class="changeset" title="[core] fix crash in error trace if backend is down (fixes #3052) (thx hamelg) x-ref: "segfaul..." href="https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/8faa456fc88f29dd108d49bf417fcb1b05d11bbc">8faa456fc88f29dd108d49bf417fcb1b05d11bbc</a>.</p>