Bug 1440080 (CVE-2017-5461)

Summary: CVE-2017-5461 nss: Write beyond bounds caused by bugs in Base64 de/encoding in nssb64d.c and nssb64e.c (MFSA 2017-10)
Product: [Other] Security Response Reporter: Huzaifa S. Sidhpurwala <huzaifas>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: cperry, dueno, hkario, jwalter, kengert, rrelyea, sardella, security-response-team, skontar, slawomir, slong, szidek, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds write flaw was found in the way NSS performed certain Base64-decoding operations. An attacker could use this flaw to create a specially crafted certificate which, when parsed by NSS, could cause it to crash or execute arbitrary code, using the permissions of the user running an application compiled against the NSS library.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-20 05:35:02 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: 1440081, 1440082, 1440083, 1440085, 1440095, 1440591, 1440592, 1440593, 1440594, 1440595, 1440596, 1440597, 1447567    
Bug Blocks: 1440097    

Description Huzaifa S. Sidhpurwala 2017-04-07 09:28:38 UTC
An out-of-bounds write during Base64 decoding operation in the Network Security Services (NSS) library due to insufficient memory being allocated to the buffer. This results in a potentially exploitable crash. 


External Reference:

https://www.mozilla.org/en-US/security/advisories/mfsa2017-10/#CVE-2017-5461


Acknowledgements:

Name: the Mozilla project
Upstream: Ronald Crane

Comment 9 errata-xmlrpc 2017-04-20 02:17:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5.9 Long Life

Via RHSA-2017:1103 https://access.redhat.com/errata/RHSA-2017:1103

Comment 10 errata-xmlrpc 2017-04-20 02:17:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5 Extended Lifecycle Support

Via RHSA-2017:1101 https://access.redhat.com/errata/RHSA-2017:1101

Comment 11 errata-xmlrpc 2017-04-20 02:37:36 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.7 Extended Update Support
  Red Hat Enterprise Linux 7.2 Extended Update Support
  Red Hat Enterprise Linux 6.2 Advanced Update Support
  Red Hat Enterprise Linux 6.4 Advanced Update Support
  Red Hat Enterprise Linux 6.5 Advanced Update Support
  Red Hat Enterprise Linux 6.6 Advanced Update Support
  Red Hat Enterprise Linux 6.5 Telco Extended Update Support
  Red Hat Enterprise Linux 6.6 Telco Extended Update Support

Via RHSA-2017:1102 https://access.redhat.com/errata/RHSA-2017:1102

Comment 12 errata-xmlrpc 2017-04-20 05:00:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6
  Red Hat Enterprise Linux 7

Via RHSA-2017:1100 https://access.redhat.com/errata/RHSA-2017:1100

Comment 13 Huzaifa S. Sidhpurwala 2017-04-21 04:56:26 UTC
Statement:

The security flaw exists in NSS library Base64 encoder/decoder code. Any application which uses NSS library to parse base64 encoded data could possibly be affected by the flaw. For example:

1. Servers compiled against NSS which parse untrusted certificates or any other base64 encoded data from its users.

2. Utilities like curl etc which use NSS to parse user provided base64 encoded certificates.

3. Applications like Firefox which use NSS to parse client-certificates before passing them to the web server.