Bug 1077871 - (CVE-2014-0098) CVE-2014-0098 httpd: mod_log_config does not properly handle logging certain cookies resulting in DoS
CVE-2014-0098 httpd: mod_log_config does not properly handle logging certain ...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20140307,reported=2...
: Security
Depends On: 1127227 1077878 1077885 1077907 1078174 1078175 1078176 1078177 1078686 1078687 1078688 1078689
Blocks: 1077876 1078645 1093890 1105541 1112035
  Show dependency treegraph
 
Reported: 2014-03-18 14:20 EDT by Vincent Danen
Modified: 2015-10-15 14:17 EDT (History)
41 users (show)

See Also:
Fixed In Version: httpd 2.4.8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-17 03:57:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Vincent Danen 2014-03-18 14:20:19 EDT
Common Vulnerabilities and Exposures assigned an identifier CVE-2014-0098 to
the following vulnerability:

Name: CVE-2014-0098
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0098
Assigned: 20131203
Reference: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c
Reference: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c?r1=1575394&r2=1575400&diff_format=h
Reference: http://www.apache.org/dist/httpd/CHANGES_2.4.9

The log_cookie function in mod_log_config.c in the mod_log_config
module in the Apache HTTP Server before 2.4.8 allows remote attackers
to cause a denial of service (segmentation fault and daemon crash) via
a crafted cookie that is not properly handled during truncation.
Comment 1 Vincent Danen 2014-03-18 14:32:18 EDT
Created httpd tracking bugs for this issue:

Affects: fedora-all [bug 1077878]
Comment 3 Vincent Danen 2014-03-18 15:42:33 EDT
Upstream describes the problem as thus:

A flaw was found in mod_log_config. A remote attacker could send a specific truncated cookie causing a crash. This crash would only be a denial of service if using a threaded MPM.
Comment 10 Vincent Danen 2014-03-24 11:41:50 EDT
Also note that the upstream description of this flaw (from http://httpd.apache.org/security/vulnerabilities_24.html) is:

"A flaw was found in mod_log_config. A remote attacker could send a specific truncated cookie causing a crash. This crash would only be a denial of service if using a threaded MPM."

By default, Red Hat Enterprise Linux uses the Prefork MPM.
Comment 12 Tomas Hoger 2014-03-26 05:14:49 EDT
The problem here is buffer over read triggered by malformed Cookie header in the HTTP request header.  If httpd is configured to log values of a specific cookie (using %{Foobar}C format string in the LogFormat), remote attacker can cause httpd to read memory behind allocated buffer.

http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats

String processing functions are used (strspn, strlen), hence reading stops on the first \0 byte encountered.  Depending on the memory layout, this may lead to a crash of httpd child process, which gets respawned by the httpd master process.

Cookie logging can be disabled to mitigate this issue.
Comment 13 Tomas Hoger 2014-03-26 08:33:24 EDT
While log_cookie() implementation in Red Hat Enterprise Linux 5 (and Red Hat Enterprise Linux 6 before 6.4) is different, similar buffer over read can happen there too.
Comment 19 Tomas Hoger 2014-03-28 04:13:05 EDT
(In reply to Tomas Hoger from comment #12)
> Cookie logging can be disabled to mitigate this issue.

The default httpd configuration in Red Hat Enterprise Linux does not enabled cookie logging.  Only configurations where the feature was enabled explicitly are affected by this issue.
Comment 20 Fedora Update System 2014-03-30 22:16:51 EDT
httpd-2.4.9-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 errata-xmlrpc 2014-04-03 17:00:54 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2014:0369 https://rhn.redhat.com/errata/RHSA-2014-0369.html
Comment 22 errata-xmlrpc 2014-04-03 17:01:26 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2014:0370 https://rhn.redhat.com/errata/RHSA-2014-0370.html
Comment 23 Morten Stevens 2014-04-05 14:23:25 EDT
I think it should also affect Fedora 19, but there are no updated packages for Fedora 19 available.

Fedora 19 httpd package: httpd-2.4.7-1
Comment 24 Jan Kaluža 2014-04-09 04:50:51 EDT
I've just built https://admin.fedoraproject.org/updates/httpd-2.4.9-1.fc19
Comment 25 Fedora Update System 2014-04-23 00:33:22 EDT
httpd-2.4.9-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 26 errata-xmlrpc 2014-06-23 13:55:38 EDT
This issue has been addressed in following products:

  JBoss Enterprise Web Server 2.0.1

Via RHSA-2014:0784 https://rhn.redhat.com/errata/RHSA-2014-0784.html
Comment 27 errata-xmlrpc 2014-06-23 13:56:07 EDT
This issue has been addressed in following products:

  JBEWS 2 for RHEL 5
  JBEWS 2 for RHEL 6

Via RHSA-2014:0783 https://rhn.redhat.com/errata/RHSA-2014-0783.html
Comment 28 errata-xmlrpc 2014-07-01 11:05:05 EDT
This issue has been addressed in following products:

  JBEAP 6.2 for RHEL 5
  JBEAP 6.2 for RHEL 6

Via RHSA-2014:0826 https://rhn.redhat.com/errata/RHSA-2014-0826.html
Comment 29 errata-xmlrpc 2014-07-01 11:05:28 EDT
This issue has been addressed in following products:

  Red Hat JBoss Enterprise Application Platform 6.2

Via RHSA-2014:0825 https://rhn.redhat.com/errata/RHSA-2014-0825.html

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