I also have the issue on a custom compiled HTTPD and ITK, it's not a
Debian specific bug ; it appeared between 2.4.48 and 2.4.49.
Here is a basic patch for 2.4.51 that comments the line that provokes
the segfaults but it might break other things :
--- server/connection.c 2021-09-26 16:11:22.000000000 +0200
+++ server/connection.c 2021-10-11 17:00:17.868463811 +0200
@@ -156,7 +156,7 @@
apr_socket_t *csd = ap_get_conn_socket(c);
if (ap_start_lingering_close(c)) {
- apr_socket_close(csd);
+// apr_socket_close(csd);
return;
}
A "cleaner" patch, also for 2.4.51, that reverts the changes between
2.4.48 and 2.4.49 on connection.c but keep the other changes ; i don't
know what those changes could imply so i advise against using it on a
production platform :
--- ./server/connection.c 2021-09-26 16:11:22.000000000 +0200
+++ ./server/connection.c 2021-10-11 17:15:04.232960328 +0200
@@ -139,12 +139,18 @@
ap_flush_conn(c);
#ifdef NO_LINGCLOSE
+ apr_socket_close(csd);
return 1;
#else
/* Shut down the socket for write, which will send a FIN
* to the peer.
*/
- return (c->aborted || apr_socket_shutdown(csd, APR_SHUTDOWN_WRITE));
+ if (c->aborted
+ || apr_socket_shutdown(csd, APR_SHUTDOWN_WRITE) !=
APR_SUCCESS) {
+ apr_socket_close(csd);
+ return 1;
+ }
+ return 0;
#endif
}
@@ -156,7 +162,6 @@
apr_socket_t *csd = ap_get_conn_socket(c);
if (ap_start_lingering_close(c)) {
- apr_socket_close(csd);
return;
}