Bug 873664 (CVE-2012-5885, CVE-2012-5886, CVE-2012-5887)

Summary: CVE-2012-5885 CVE-2012-5886 CVE-2012-5887 tomcat: three DIGEST authentication implementation issues
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: akurtako, aneelica, devrim, djorm, dknox, dwalluck, extras-orphan, ivan.afonichev, java-sig-commits, kdaniel, lfuka, pcheung, scorneli, sochotni
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20121105,reported=20121105,source=internet,cvss2=5.0/AV:N/AC:L/Au:N/C:N/I:P/A:N,rhel-5/tomcat5=affected,rhel-6/tomcat6=affected,fedora-16/tomcat5=affected,fedora-16/tomcat=affected,fedora-all/tomcat6=affected,brms-5/jbossweb=affected,epp-5/jbossweb=wontfix,soap-5/jbossweb=affected,jbews-2/tomcat6=affected,jbews-2/tomcat7=notaffected,jdg-6/jbossweb=affected,jon-3.1/jbossweb=notaffected
Fixed In Version: Apache Tomcat 5.5.36, Apache Tomcat 6.0.36, Apache Tomcat 7.0.30 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-01 12:12:24 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 873672, 873703, 873707, 882008, 882009, 882010, 882011, 882012, 882013, 882014, 882015, 882019, 882020, 912962, 915386, 953308, 1014383    
Bug Blocks: 873710, 906153, 953709    

Description Jan Lieskovsky 2012-11-06 08:07:56 EST
Multiple weaknesses were found in Tomcat's DIGEST authentication implementation. This flaw affects all versions up to Tomcat 5.5.35 [1], tomcat 6.0.35 [2] and 7.0.29 [3].

Summary from Tomcat's security pages:
1) Tomcat tracked client rather than server nonces and nonce count.
2) When a session ID was present, authentication was bypassed.
3) The user name and password were not checked before when indicating that a nonce was stale.

Relevant upstream pathes are:
Tomcat 5: http://svn.apache.org/viewvc?view=rev&rev=1392248
Tomcat 6: http://svn.apache.org/viewvc?view=rev&rev=1380829
Tomcat 7: http://svn.apache.org/viewvc?view=rev&rev=1377807

[1] http://tomcat.apache.org/security-5.html#Fixed_in_Apache_Tomcat_5.5.36
[2] http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.36
[3] http://tomcat.apache.org/security-7.html#Fixed_in_Apache_Tomcat_7.0.30
Comment 1 Jan Lieskovsky 2012-11-06 08:14:30 EST
These issues affect the version of the tomcat5 package, as shipped with Red Hat Enterprise Linux 5.

--

These issues affect the version of the tomcat5 package, as shipped with JBoss Enterprise Web Server 1.0.2.

--

These issues affect the version of the tomcat5 package, as shipped with Fedora release of 16.
Comment 2 Jan Lieskovsky 2012-11-06 08:15:43 EST
Created tomcat5 tracking bugs for this issue

Affects: fedora-16 [bug 873672]
Comment 3 Jan Lieskovsky 2012-11-06 08:24:40 EST
Relevant upstream patch for Tomcat 6:
[3] http://svn.apache.org/viewvc?view=revision&revision=1380829

Affected Tomcat 6 versions: From 6.0.0 up to 6.0.35.
Comment 4 Jan Lieskovsky 2012-11-06 08:26:09 EST
These issues affect the version of the tomcat6 package, as shipped with Red Hat Enterprise Linux 6.

--

These issues affect the version of the tomcat6 package, as shipped with JBoss Enterprise Web Server 1.0.2.

--

These issues affect the versions of the tomcat6 package, as shipped with Fedora release of 16 and 17.
Comment 5 Jan Lieskovsky 2012-11-06 08:32:53 EST
Relevant upstream patch for Tomcat 7:
[4] http://svn.apache.org/viewvc?view=revision&revision=1377807

Affected Tomcat 7 versions: From 7.0.0 up to 7.0.29.
Comment 6 Jan Lieskovsky 2012-11-06 08:35:04 EST
These issues affect the version of the tomcat package, as shipped with Fedora release of 16.

--

These issues does not affect the version of the tomcat package, as shipped with Fedora release of 17 (that version has been already updated).
Comment 7 Jan Lieskovsky 2012-11-06 09:17:03 EST
Created tomcat6 tracking bugs for this issue

Affects: fedora-all [bug 873703]
Comment 8 Jan Lieskovsky 2012-11-06 09:22:19 EST
Created tomcat tracking bugs for this issue

Affects: fedora-16 [bug 873707]
Comment 9 Jan Lieskovsky 2012-11-20 11:06:29 EST
The CVE identifier of CVE-2012-3439 has been rejected (and therefore should not be used) by MITRE:

--
** REJECT **

DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: CVE-2012-5885,
CVE-2012-5886, CVE-2012-5887. Reason: This candidate is a duplicate
of CVE-2012-5885, CVE-2012-5886, and CVE-2012-5887. Notes: All CVE
users should reference one or more of CVE-2012-5885, CVE-2012-5886,
and CVE-2012-5887 instead of this candidate. All references and
descriptions in this candidate have been removed to prevent accidental
usage.
--

in favour of the following three ids: CVE-2012-5885, CVE-2012-5886, and CVE-2012-5887, whose description is as follows:

1) CVE-2012-5885:
=================
The replay-countermeasure functionality in the HTTP Digest Access Authentication implementation in Apache Tomcat 5.5.x before 5.5.36, 6.x before 6.0.36, and 7.x before 7.0.30 tracks cnonce (aka client nonce) values instead of nonce (aka server nonce) and nc (aka nonce-count) values, which makes it easier for remote attackers to bypass intended access restrictions by sniffing the network for valid
requests, a different vulnerability than CVE-2011-1184.

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-5885
http://svn.apache.org/viewvc?view=revision&revision=1377807
http://svn.apache.org/viewvc?view=revision&revision=1380829
http://svn.apache.org/viewvc?view=revision&revision=1392248
http://tomcat.apache.org/security-5.html
http://tomcat.apache.org/security-6.html
http://tomcat.apache.org/security-7.html

2) CVE-2012-5886:
=================
The HTTP Digest Access Authentication implementation in Apache Tomcat 5.5.x before 5.5.36, 6.x before 6.0.36, and 7.x before 7.0.30 caches information about the authenticated user within the session state, which makes it easier for remote attackers to bypass authentication via vectors related to the session ID.

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-5886
http://svn.apache.org/viewvc?view=revision&revision=1377807
http://svn.apache.org/viewvc?view=revision&revision=1380829
http://svn.apache.org/viewvc?view=revision&revision=1392248
http://tomcat.apache.org/security-5.html
http://tomcat.apache.org/security-6.html
http://tomcat.apache.org/security-7.html

3) CVE-2012-5887:
=================
The HTTP Digest Access Authentication implementation in Apache Tomcat 5.5.x before 5.5.36, 6.x before 6.0.36, and 7.x before 7.0.30 does not properly check for stale nonce values in conjunction with enforcement of proper credentials, which makes it easier for remote attackers to bypass intended access restrictions by sniffing the network for valid requests.

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-5887
http://svn.apache.org/viewvc?view=revision&revision=1377807
http://svn.apache.org/viewvc?view=revision&revision=1380829
http://svn.apache.org/viewvc?view=revision&revision=1392248
http://tomcat.apache.org/security-5.html
http://tomcat.apache.org/security-6.html
http://tomcat.apache.org/security-7.html
Comment 15 Fedora Update System 2012-12-19 03:28:55 EST
tomcat-7.0.33-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 errata-xmlrpc 2013-02-19 15:30:45 EST
This issue has been addressed in following products:

  JBoss Enterprise Web Server 2.0.0

Via RHSA-2013:0265 https://rhn.redhat.com/errata/RHSA-2013-0265.html
Comment 18 errata-xmlrpc 2013-02-19 17:14:47 EST
This issue has been addressed in following products:

  JBEWS 2 for RHEL 5
  JBEWS 2 for RHEL 6

Via RHSA-2013:0266 https://rhn.redhat.com/errata/RHSA-2013-0266.html
Comment 41 errata-xmlrpc 2013-03-11 14:37:49 EDT
This issue has been addressed in following products:

  JBEWP 5 for RHEL 4
  JBEWP 5 for RHEL 5
  JBEWP 5 for RHEL 6

Via RHSA-2013:0631 https://rhn.redhat.com/errata/RHSA-2013-0631.html
Comment 42 errata-xmlrpc 2013-03-11 14:37:56 EDT
This issue has been addressed in following products:

  JBEAP 5 for RHEL 4
  JBEAP 5 for RHEL 5
  JBEAP 5 for RHEL 6

Via RHSA-2013:0629 https://rhn.redhat.com/errata/RHSA-2013-0629.html
Comment 43 errata-xmlrpc 2013-03-11 15:08:07 EDT
This issue has been addressed in following products:

  JBoss Enterprise Web Platform 5.2.0

Via RHSA-2013:0633 https://rhn.redhat.com/errata/RHSA-2013-0633.html
Comment 44 errata-xmlrpc 2013-03-11 15:08:11 EDT
This issue has been addressed in following products:

  JBoss Enterprise Application Platform 5.2.0

Via RHSA-2013:0632 https://rhn.redhat.com/errata/RHSA-2013-0632.html
Comment 45 errata-xmlrpc 2013-03-11 15:33:40 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2013:0623 https://rhn.redhat.com/errata/RHSA-2013-0623.html
Comment 46 errata-xmlrpc 2013-03-12 14:08:07 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2013:0640 https://rhn.redhat.com/errata/RHSA-2013-0640.html
Comment 47 errata-xmlrpc 2013-03-14 12:49:15 EDT
This issue has been addressed in following products:

  JBoss Enterprise Application Platform 6.0.1

Via RHSA-2013:0648 https://rhn.redhat.com/errata/RHSA-2013-0648.html
Comment 48 errata-xmlrpc 2013-03-14 12:50:03 EDT
This issue has been addressed in following products:

  JBEAP 6 for RHEL 5
  JBEAP 6 for RHEL 6

Via RHSA-2013:0647 https://rhn.redhat.com/errata/RHSA-2013-0647.html
Comment 49 errata-xmlrpc 2013-03-20 11:59:22 EDT
This issue has been addressed in following products:

  JBoss Data Grid 6.1.0

Via RHSA-2013:0665 https://rhn.redhat.com/errata/RHSA-2013-0665.html
Comment 50 errata-xmlrpc 2013-04-09 14:19:25 EDT
This issue has been addressed in following products:

  JBoss Enterprise SOA Platform 5.3.1

Via RHSA-2013:0726 https://rhn.redhat.com/errata/RHSA-2013-0726.html
Comment 52 errata-xmlrpc 2013-07-01 11:15:11 EDT
This issue has been addressed in following products:

  Red Hat JBoss BRMS 5.3.1

Via RHSA-2013:1006 https://rhn.redhat.com/errata/RHSA-2013-1006.html
Comment 54 Stefan Cornelius 2015-10-28 05:52:40 EDT
*** Bug 1275985 has been marked as a duplicate of this bug. ***