https://bz.apache.org/bugzilla/show_bug.cgi?id=66168

            Bug ID: 66168
           Summary: Segmentation fault
           Product: Apache httpd-2
           Version: 2.4.53
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_brotli
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 38339
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38339&action=edit
steps to reproduce

We've stumbled upon segmentation faults on some of our ubuntu servers
(18.04/20.04/22.04). It seems to only occur when the DocumentRoot is outside of
/var/www/html.
This segmentation fault leads to killing the parent server process with its
childs, resulting in clients getting "Empty reply".

We were able to replicate the issue on Apache versions 2.4.41, 2.4.52 and
2.4.54 (mpm_event).
Our Apache is configured to work with php-fpm over proxy_fcgid. We could
replicate the issue with php versions 5.6-7.4, where the script-output is a lot
of: "Warning: Use of undefined constant...".

I've attached the steps to reproduce with a "fresh" ubuntu installation.

-------- Errorlog --------

apache2[2470393]: [core:notice] [pid 2470393:tid 140639993146432] AH00051:
child pid 2473145 exit signal Segmentation fault (11), possible coredump in
/var/tmp

-------- CoreDump --------

Core was generated by `/usr/sbin/apache2 -k start'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f1b5a487056 in BrotliEncoderCompressStream () from
/lib/x86_64-linux-gnu/libbrotlienc.so.1
[Current thread is 1 (Thread 0x7f1b46328700 (LWP 2404021))]
(gdb) bt
#0  0x00007f1b5a487056 in BrotliEncoderCompressStream () from
/lib/x86_64-linux-gnu/libbrotlienc.so.1
#1  0x00007f1b5a53bac0 in process_chunk (f=0x7f1b4028d900, f=0x7f1b4028d900,
len=184, data=<optimized out>, ctx=0x7f1b4028eed0) at mod_brotli.c:222
#2  compress_filter (f=0x7f1b4028d900, bb=0x7f1b4028eaf8) at mod_brotli.c:561
#3  0x00007f1b5a50d2d0 in filter_harness (f=<optimized out>, bb=0x7f1b4028eaf8)
at mod_filter.c:323
#4  0x00007f1b5a315e6e in dispatch (conn=conn@entry=0x7f1b566060a0,
conf=conf@entry=0x7f1b56b01ad8, r=r@entry=0x7f1b402b60a0,
setaside_pool=0x7f1b40289028, err=err@entry=0x7f1b46327b40,
bad_request=bad_request@entry=0x7f1b46327b08, 
    has_responded=0x7f1b46327b0c, input_brigade=0x7f1b4028dbd8, request_id=1)
at mod_proxy_fcgi.c:849
#5  0x00007f1b5a316e7c in fcgi_do_request (p=<optimized out>, origin=0x0,
uri=<optimized out>, url=<optimized out>, input_brigade=0x7f1b4028dbd8,
server_portstr=0x7f1b46327bb0 "", conf=0x7f1b56b01ad8, conn=0x7f1b566060a0, 
    r=0x7f1b402b60a0) at mod_proxy_fcgi.c:992
#6  proxy_fcgi_handler (r=0x7f1b402b60a0, worker=<optimized out>,
conf=<optimized out>, url=<optimized out>, proxyname=<optimized out>,
proxyport=<optimized out>) at mod_proxy_fcgi.c:1206
#7  0x00007f1b5a2da31b in proxy_run_scheme_handler (r=r@entry=0x7f1b402b60a0,
worker=0x7f1b56da2358, conf=conf@entry=0x7f1b56da2018, url=0x7f1b4028dad0
"fcgi://php74fpm/www/htdocs/test3.php", 
    proxyhost=proxyhost@entry=0x0, proxyport=proxyport@entry=0) at
mod_proxy.c:3434
#8  0x00007f1b5a2dc3cb in proxy_handler (r=0x7f1b402b60a0) at mod_proxy.c:1507
#9  0x0000559dc8bc7268 in ap_run_handler (r=r@entry=0x7f1b402b60a0) at
config.c:169
#10 0x0000559dc8bc7816 in ap_invoke_handler (r=r@entry=0x7f1b402b60a0) at
config.c:443
#11 0x0000559dc8be0053 in ap_process_async_request (r=0x7f1b402b60a0) at
http_request.c:452
#12 0x0000559dc8be0222 in ap_process_request (r=r@entry=0x7f1b402b60a0) at
http_request.c:487
#13 0x00007f1b5a3a6f69 in h2_task_process_request (c=0x7f1b402bc0a0,
task=<optimized out>) at h2_task.c:671
#14 h2_task_process_conn (c=0x7f1b402bc0a0) at h2_task.c:713
#15 h2_task_process_conn (c=0x7f1b402bc0a0) at h2_task.c:700
#16 0x0000559dc8bd1008 in ap_run_process_connection (c=c@entry=0x7f1b402bc0a0)
at connection.c:42
#17 0x00007f1b5a3a82c7 in h2_task_do (task=0x7f1b402b80a0,
thread=thread@entry=0x7f1b59b40090, worker_id=<optimized out>) at h2_task.c:631
#18 0x00007f1b5a3abf80 in slot_run (thread=0x7f1b59b40090, wctx=0x7f1b56dcf420)
at h2_workers.c:263
#19 0x00007f1b5b2b6609 in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#20 0x00007f1b5b1db133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to