Bug 1695954 (CVE-2019-1543)

Summary: CVE-2019-1543 openssl: ChaCha20-Poly1305 with long nonces
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bmaxwell, cdewolf, cfergeau, chazlett, csutherl, darran.lofthouse, dimitris, dosoudil, erik-fedora, fgavrilo, gzaronik, jawilson, jclere, jondruse, jorton, ktietz, lersek, lgao, marcandre.lureau, mbabacek, mturk, myarboro, pgier, philmd, pjurak, ppalaga, psakar, pslavice, rh-spice-bugs, rjones, rnetuka, rstancel, rsvoboda, tmraz, twalsh, vtunka, weli
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openssl 1.1.1c-dev, openssl 1.1.0k-dev Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-09 04:57:11 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: 1695955, 1695956, 1695957, 1695959, 1697738    
Bug Blocks: 1695958    

Description Pedro Sampaio 2019-04-03 23:39:37 UTC
ChaCha20-Poly1305 is an AEAD cipher, and requires a unique nonce input for every encryption operation. RFC 7539 specifies that the nonce value (IV) should be 96 bits (12 bytes). OpenSSL allows a variable nonce length and front pads the nonce with 0 bytes if it is less than 12 bytes. However it also incorrectly allows a nonce to be set of up to 16 bytes. In this case only the last 12 bytes are significant and any additional leading bytes are ignored. It is a requirement of using this cipher that nonce values are unique. Messages encrypted using a reused nonce value are susceptible to serious confidentiality and integrity attacks. If an application changes the default nonce length to be longer than 12 bytes and then makes a change to the leading bytes of the nonce expecting the new value to be a new unique nonce then such an application could inadvertently encrypt messages with a reused nonce. Additionally the ignored bytes in a long nonce are not covered by the integrity guarantee of this cipher. Any application that relies on the integrity of these ignored leading bytes of a long nonce may be further affected. Any OpenSSL internal use of this cipher, including in SSL/TLS, is safe because no such use sets such a long nonce value. However user applications that use this cipher directly and set a non-default nonce length to be longer than 12 bytes may be vulnerable. OpenSSL versions 1.1.1 and 1.1.0 are affected by this issue. Due to the limited scope of affected deployments this has been assessed as low severity and therefore we are not creating new releases at this time. Fixed in OpenSSL 1.1.1c-dev (Affected 1.1.1-1.1.1b). Fixed in OpenSSL 1.1.0k-dev (Affected 1.1.0-1.1.0j).

Upstream patch:

https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=ee22257b1418438ebaf54df98af4e24f494d1809
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f426625b6ae9a7831010750490a5f0ad689c5ba3

References:

https://www.openssl.org/news/secadv/20190306.txt

Comment 1 Pedro Sampaio 2019-04-03 23:40:05 UTC
Created compat-openssl10 tracking bugs for this issue:

Affects: fedora-all [bug 1695959]


Created mingw-openssl tracking bugs for this issue:

Affects: epel-7 [bug 1695956]
Affects: fedora-all [bug 1695955]


Created openssl tracking bugs for this issue:

Affects: fedora-all [bug 1695957]

Comment 2 Huzaifa S. Sidhpurwala 2019-04-09 04:55:28 UTC
Note: Support for ChaCha20-Poly1305 was introduced in OpenSSL in 1.1.0, hence the previous versions are not affected by this flaw:
https://github.com/openssl/openssl/issues/304

Further, as stated in the advisory, SSL/TLS use of this ciphersuite is not affected. Only EVP functions which invoke this ciphersuite are really affected.

Comment 5 Joshua Padman 2019-05-23 10:23:43 UTC
As this flaw only affects OpenSSL versions later than 1.1.0 no Middleware products are affected.

Comment 6 errata-xmlrpc 2019-11-05 22:05:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2019:3700 https://access.redhat.com/errata/RHSA-2019:3700