Bug 802725 (CVE-2012-0884)

Summary: CVE-2012-0884 openssl: CMS and PKCS#7 Bleichenbacher attack
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: anande, mvadkert, tmraz, wnefal+redhatbugzilla
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20120312,reported=20120312,source=cve,cvss2=2.6/AV:N/AC:H/Au:N/C:P/I:N/A:N,rhel-3/openssl=wontfix,rhel-4/openssl=wontfix,rhel-5/openssl=affected,rhel-6/openssl=affected,jbews-1/openssl=affected,rhel-3/openssl096b=wontfix,rhel-4/openssl096b=wontfix,rhel-5/openssl097a=wontfix,rhel-6/openssl098e=wontfix,fedora-all/openssl=affected,fedora-all/mingw32-openssl=affected,epel-5/mingw32-openssl=affected
Fixed In Version: openssl 0.9.8u, openssl 1.0.0h Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-25 03:59:08 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 802816, 802817, 802820, 804550, 804551, 804552, 804553    
Bug Blocks: 802502    

Description Jan Lieskovsky 2012-03-13 06:56:00 EDT
Common Vulnerabilities and Exposures assigned an identifier CVE-2012-0884 to the following vulnerability:

The implementation of Cryptographic Message Syntax (CMS) and PKCS #7 in OpenSSL before 0.9.8u and 1.x before 1.0.0h does not properly restrict certain oracle behavior, which makes it easier for context-dependent attackers to decrypt data via a Million Message Attack (MMA) adaptive chosen ciphertext attack.

References:
[1] http://www.openssl.org/news/secadv_20120312.txt
[2] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-0884
Comment 1 Tomas Hoger 2012-03-13 10:19:12 EDT
Upstream commits:
  http://cvs.openssl.org/chngview?cn=22238 0.9.8
  http://cvs.openssl.org/chngview?cn=22228 1.0.0
  http://cvs.openssl.org/chngview?cn=22251 trunk

Cryptographic Message Syntax (CMS) support is only available in openssl packages in Red Hat Enterprise Linux 6, earlier openssl packages are not affected by that part of the problem.
Comment 2 Tomas Hoger 2012-03-13 10:56:37 EDT
Created mingw32-openssl tracking bugs for this issue

Affects: fedora-all [bug 802817]
Affects: epel-5 [bug 802820]
Comment 3 Tomas Hoger 2012-03-13 10:56:40 EDT
Created openssl tracking bugs for this issue

Affects: fedora-all [bug 802816]
Comment 4 Tomas Hoger 2012-03-13 11:10:58 EDT
External Reference:

http://www.openssl.org/news/secadv_20120312.txt
Comment 10 errata-xmlrpc 2012-03-27 18:57:32 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 6

Via RHSA-2012:0426 https://rhn.redhat.com/errata/RHSA-2012-0426.html
Comment 11 Fedora Update System 2012-04-10 23:52:28 EDT
openssl-1.0.0h-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 12 Fedora Update System 2012-04-11 13:05:48 EDT
openssl-1.0.0h-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2012-04-11 13:06:39 EDT
openssl-1.0.0h-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 14 Fedora Update System 2012-04-11 22:49:48 EDT
openssl-1.0.0h-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Jan Lieskovsky 2012-05-11 12:13:20 EDT
Alexander Peslyak pointed out:
[3] http://www.openwall.com/lists/oss-security/2012/05/11/5

a deficiency in the original CVE-2012-0884 upstream fix, which is currently believed to be mostly of non-security relevance (more from [3]):
================================================================

This is just a heads up that OpenSSL 1.0.1c, 1.0.0j, and 0.9.8x fix an
additional issue that is believed to have only little/potential security
relevance in obscure cases and thus is being treated as a non-security
fix currently - yet is desirable to include in backports of distros that
make those instead of simply upgrading.

Here's the fix, by Stephen Henson of the OpenSSL core team:

"Make sure tkeylen is initialised properly when encrypting CMS messages."
http://cvs.openssl.org/chngview?cn=22537

or with an additional compiler warning fix:

http://cvs.openssl.org/filediff?f=openssl/crypto/cms/cms_enc.c&v1=1.11&v2=1.13

(Note: the "tkeylen = 0" portion is just to silence a possible compiler
warning; the actual fix is to the code.)

The bug had been introduced in:

"Fix for CMS/PKCS7 MMA. If RSA decryption fails use a random key and
continue with symmetric decryption process to avoid leaking timing
information to an attacker."
http://cvs.openssl.org/chngview?cn=22251

and more specifically in this portion:

http://cvs.openssl.org/filediff?f=openssl/crypto/cms/cms_enc.c&v1=1.10&v2=1.11

which introduced the tkey and tkeylen variables.
Comment 16 errata-xmlrpc 2012-09-24 12:02:47 EDT
This issue has been addressed in following products:

  JBoss Enterprise Application Platform 6.0.0

Via RHSA-2012:1308 https://rhn.redhat.com/errata/RHSA-2012-1308.html
Comment 17 errata-xmlrpc 2012-09-24 12:03:46 EDT
This issue has been addressed in following products:

  JBoss Enterprise Application Platform 5.1.2

Via RHSA-2012:1307 https://rhn.redhat.com/errata/RHSA-2012-1307.html
Comment 18 errata-xmlrpc 2012-09-24 12:04:54 EDT
This issue has been addressed in following products:

  JBoss Enterprise Web Server 1.0.2

Via RHSA-2012:1306 https://rhn.redhat.com/errata/RHSA-2012-1306.html