RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1298866 - backport request for Bug 52315 - NULL pointer in log.c caused by ap_send_interim_response() in protocol.c
Summary: backport request for Bug 52315 - NULL pointer in log.c caused by ap_send_inte...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: httpd
Version: 6.7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Petr Šplíchal
URL:
Whiteboard:
Depends On:
Blocks: 1277547 1300707
TreeView+ depends on / blocked
 
Reported: 2016-01-15 09:53 UTC by Patrick
Modified: 2021-01-14 09:36 UTC (History)
8 users (show)

Fixed In Version: httpd-2.2.15-52.el6
Doc Type: Bug Fix
Doc Text:
Previously, when writing an error message about an incorrect HTTP interim response code to a log file, the httpd daemon used a NULL pointer instead of a pointer to the real request. As a consequence, httpd could terminate unexpectedly with a segmentation fault if the back-end server sent incorrect interim response code. With this update, the correct HTTP request pointer is passed to the httpd logging code, and httpd no longer crashes in this scenario.
Clone Of:
: 1300707 (view as bug list)
Environment:
Last Closed: 2016-05-10 21:37:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Sanitized httpd configuration (21.09 KB, application/x-xz)
2016-01-15 14:34 UTC, Andy Grimm
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0841 0 normal SHIPPED_LIVE httpd bug fix and enhancement update 2016-05-10 22:42:26 UTC

Description Patrick 2016-01-15 09:53:32 UTC
Description of problem:

We have a customer facing the following issue in production with httpd-2.2.15
https://bz.apache.org/bugzilla/show_bug.cgi?id=52315

this was fixed in httpd-2.2.22

Version-Release number of selected component (if applicable):

httpd-2.2.15

Comment 3 Andy Grimm 2016-01-15 14:10:11 UTC
backtrace:

#0  ap_log_rerror (file=0x7fb549d86870 "/builddir/build/BUILD/httpd-2.2.15/server/protocol.c", line=1679, level=7, status=0, r=0x0, fmt=0x7fb549d86840 "Status is %d - not sending interim response")
    at /usr/src/debug/httpd-2.2.15/server/log.c:737
#1  0x00007fb549d5f6f7 in ap_send_interim_response (r=0x7fb2a0002978, send_headers=1) at /usr/src/debug/httpd-2.2.15/server/protocol.c:1679
#2  0x00007fb5447c4b35 in ap_proxy_http_process_response (p=0x7fb2a00028f8, r=<value optimized out>, backend=0x7fb54b2673f8, origin=0x7fb2a0008bb8, conf=0x7fb54b2a0238, server_portstr=0x7fb53cc0baa0 "")
    at /usr/src/debug/httpd-2.2.15/modules/proxy/mod_proxy_http.c:1667
#3  0x00007fb5447c5e7e in proxy_http_handler (r=0x7fb2a0002978, worker=<value optimized out>, conf=0x7fb53cc0ba88, url=0x7fb2a00070a0 "/recordEvent/delivery_success", 
    proxyname=0x7fb2a00008e8 "\310\375~8\265\177", proxyport=35768) at /usr/src/debug/httpd-2.2.15/modules/proxy/mod_proxy_http.c:2045
#4  0x00007fb544bd51ca in proxy_run_scheme_handler (r=0x7fb2a0002978, worker=0x7fb54b2a0410, conf=0x7fb54b2a0238, url=0x7fb2a0006c2e "http://127.12.24.129:8080/recordEvent/delivery_success", proxyhost=0x0, 
    proxyport=0) at /usr/src/debug/httpd-2.2.15/modules/proxy/mod_proxy.c:2408
#5  0x00007fb544bd97d7 in proxy_handler (r=0x7fb2a0002978) at /usr/src/debug/httpd-2.2.15/modules/proxy/mod_proxy.c:1029
#6  0x00007fb549d6d7d0 in ap_run_handler (r=0x7fb2a0002978) at /usr/src/debug/httpd-2.2.15/server/config.c:158
#7  0x00007fb549d7108e in ap_invoke_handler (r=0x7fb2a0002978) at /usr/src/debug/httpd-2.2.15/server/config.c:376
#8  0x00007fb549d7c4c0 in ap_process_request (r=0x7fb2a0002978) at /usr/src/debug/httpd-2.2.15/modules/http/http_request.c:282
#9  0x00007fb549d79308 in ap_process_http_connection (c=0x7fb5387f0060) at /usr/src/debug/httpd-2.2.15/modules/http/http_core.c:190
#10 0x00007fb549d752d8 in ap_run_process_connection (c=0x7fb5387f0060) at /usr/src/debug/httpd-2.2.15/server/connection.c:43
#11 0x00007fb549d82122 in process_socket (thd=0x7fb54b2d57c8, dummy=<value optimized out>) at /usr/src/debug/httpd-2.2.15/server/mpm/worker/worker.c:544
#12 worker_thread (thd=0x7fb54b2d57c8, dummy=<value optimized out>) at /usr/src/debug/httpd-2.2.15/server/mpm/worker/worker.c:894
#13 0x00007fb548616a51 in start_thread (arg=0x7fb53cc0c700) at pthread_create.c:301
#14 0x00007fb54836393d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Comment 4 Andy Grimm 2016-01-15 14:34:54 UTC
Created attachment 1115171 [details]
Sanitized httpd configuration

Comment 6 Andy Grimm 2016-01-15 18:27:57 UTC
FWIW, I currently have worked around the bug with:

SetEnv proxy-interim-response Suppress

As you might expect, this results in a large number of errors in the logs due to the bogus status line we discussed (HTTP/1.1 12501 unknown):

[Fri Jan 15 13:21:44 2016] [error] [client 52.89.28.21] (20014)Internal error: proxy: error reading status line from remote server 127.12.24.129
[Fri Jan 15 13:21:44 2016] [error] [client 52.89.28.21] proxy: Error reading from remote server returned by /recordEvent/delivery_created

But at least it doesn't crash.

Comment 7 Jan Kaluža 2016-01-18 14:42:45 UTC
The backtrace really looks like to be caused by the Bug 52315 from httpd bugzilla. I'm also able to reproduce it with httpd in RHEL6.

I'm not sure what to do with the Internal error. Apache httpd should send only valid HTTP responses back to the client and status code 12501 is not valid HTTP status code. Therefore httpd prints the error to error_log and sends 502 Proxy Error to the client.

It's clear that it is the backend application sending invalid response here, so for this bugreport, we are going to fix only the crash. I think it is up to backend application developers to fix the application.

Comment 17 errata-xmlrpc 2016-05-10 21:37:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0841.html


Note You need to log in before you can comment on or make changes to this bug.