Bug 1238322 (CVE-2015-3276)

Summary: CVE-2015-3276 openldap: incorrect multi-keyword mode cipherstring parsing
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ankur.sao7, ebenes, he, jpazdziora, jrusnack, jsynacek, mhonek, mpoole, pkis, pmatouse, sardella, security-response-team, slawomir, vkaigoro
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A flaw was found in the way OpenLDAP parsed OpenSSL-style cipher strings. As a result, OpenLDAP could potentially use ciphers that were not intended to be enabled.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-20 05:21:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1231522, 1243517    
Bug Blocks: 1210268, 1238327    
Attachments:
Description Flags
patch against current upstream to provide correct AND logic for multiple-mask keywords none

Description Vasyl Kaigorodov 2015-07-01 15:20:52 UTC
The openldap (for NSS) emulation of the openssl cipherstring parsing code
incorrectly implements the multi-keyword mode.
As a consequence anyone using a combination like:

  ECDH+SHA

will not get the expected set of ciphers

  ECDH-RSA-RC4-SHA
  ECDH-RSA-DES-CBC3-SHA
  ECDH-RSA-AES128-SHA
  ECDH-RSA-AES256-SHA
  ECDH-ECDSA-RC4-SHA
  ECDH-ECDSA-DES-CBC3-SHA
  ECDH-ECDSA-AES128-SHA
  ECDH-ECDSA-AES256-SHA
  ECDHE-RSA-RC4-SHA
  ECDHE-RSA-DES-CBC3-SHA
  ECDHE-RSA-AES128-SHA
  ECDHE-RSA-AES256-SHA
  ECDHE-ECDSA-RC4-SHA
  ECDHE-ECDSA-DES-CBC3-SHA
  ECDHE-ECDSA-AES128-SHA
  ECDHE-ECDSA-AES256-SHA

but instead will match

  DES-CBC-SHA
  DES-CBC3-SHA
  RC4-SHA
  EDH-RSA-DES-CBC-SHA
  EDH-RSA-DES-CBC3-SHA
  EDH-DSS-DES-CBC-SHA
  EDH-DSS-DES-CBC3-SHA
  EXP1024-DES-CBC-SHA
  EXP1024-RC4-SHA
  SEED-SHA
  AES128-SHA
  AES256-SHA
  CAMELLIA256-SHA
  CAMELLIA128-SHA
  DHE-RSA-AES128-SHA
  DHE-RSA-AES256-SHA
  DHE-RSA-CAMELLIA128-SHA
  DHE-RSA-CAMELLIA256-SHA
  DHE-DSS-RC4-SHA
  DHE-DSS-AES128-SHA
  DHE-DSS-AES256-SHA
  DHE-DSS-CAMELLIA128-SHA
  DHE-DSS-CAMELLIA256-SHA
  ECDH-RSA-RC4-SHA
  ECDH-RSA-DES-CBC3-SHA
  ECDH-RSA-AES128-SHA
  ECDH-RSA-AES256-SHA
  ECDH-ECDSA-RC4-SHA
  ECDH-ECDSA-DES-CBC3-SHA
  ECDH-ECDSA-AES128-SHA
  ECDH-ECDSA-AES256-SHA
  ECDHE-RSA-RC4-SHA
  ECDHE-RSA-DES-CBC3-SHA
  ECDHE-RSA-AES128-SHA
  ECDHE-RSA-AES256-SHA
  ECDHE-ECDSA-RC4-SHA
  ECDHE-ECDSA-DES-CBC3-SHA
  ECDHE-ECDSA-AES128-SHA
  ECDHE-ECDSA-AES256-SHA

Acknowledgements:

This issue was discovered by Martin Poole of the Red Hat Software Maintenance Engineering group.

Comment 1 Vasyl Kaigorodov 2015-07-01 15:33:00 UTC
A suggested patch is attached in comment 4.

Comment 2 Kurt Seifried 2015-07-15 16:30:03 UTC
Created openldap tracking bugs for this issue:

Affects: fedora-all [bug 1243517]

Comment 4 Martin Prpič 2015-07-24 07:33:11 UTC
Created attachment 1055640 [details]
patch against current upstream to provide correct AND logic for multiple-mask keywords

Comment 6 Huzaifa S. Sidhpurwala 2015-08-14 08:55:51 UTC
Statement:

This issue does not affect the version of openldap package as shipped with Red Hat Enterprise Linux 5.

Comment 8 errata-xmlrpc 2015-11-19 08:53:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:2131 https://rhn.redhat.com/errata/RHSA-2015-2131.html

Comment 9 Ankur Sao 2016-03-03 07:28:50 UTC
Which version of openLdap is affected by this vulnerability and in which version it is fixed ?

Comment 10 Havard Eidnes 2016-12-13 18:28:12 UTC
(In reply to Ankur Sao from comment #9)
> Which version of openLdap is affected by this vulnerability and in which
> version it is fixed ?

By the looks of it, all versions of openLdap are affected; I know the
latest at 2.4.44 is.

I tried submitting this bug upstream, but got turned away because of
IPR concerns over the rights to the fix, ref.

  http://www.openldap.org/its/index.cgi?findid=8543

Can someone from RedHat please submit this bugfix to LDAP, because
that doesn't appear to have happened...

Best regards,

- Håvard

Comment 11 Jan Pazdziora 2023-07-25 15:23:59 UTC
Hello,

while doing review of the Vulnerability Assessment report of RHEL 8.6 for the purpose of Common Criteria certification, we came across this CVE-2015-3276. The CVE page https://access.redhat.com/security/cve/CVE-2015-3276 does not even list RHEL 8. However, the comment 10 above mentions that the fix was rejected upstream.

Do we still carry the patch downstream in RHEL 8 (RHEL 8.6 has openldap-2.4.46-16.el8)? Could the CVE page be updated with Red Hat's official statement about this CVE in RHEL 8?

Thank you, Jan

Comment 12 Martin Poole 2023-07-25 15:42:44 UTC
This CVE is not applicable to RHEL8 (and later).

openldap package went back to using openssl for cryptographic purposes rather than the compatibility shim on top of nss that had the issue.

Comment 13 Jan Pazdziora 2023-07-29 16:22:06 UTC
Great, thanks for the confirmation.

Comment 14 Petr Matousek 2023-08-10 11:16:55 UTC
In reply to comment #11:
> Could the CVE page be updated with Red Hat's official statement about this CVE in RHEL 8?

added statement

Comment 15 Jan Pazdziora 2023-08-10 11:22:28 UTC
Thanks but ... I was more after the short note of why we believe it to be so, similar to Martin's comment 12? It would help us in communication with the external parties.