Bug 1412120 (CVE-2016-7056)

Summary: CVE-2016-7056 openssl: ECDSA P-256 timing attack key recovery
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bbaranow, bmaxwell, bmcclain, cdewolf, cfergeau, csutherl, dandread, darran.lofthouse, dblechte, dosoudil, eedri, erik-fedora, gzaronik, hokuda, jawilson, jclere, ktietz, lgao, lsurette, marcandre.lureau, mbabacek, mgoldboi, michal.skrivanek, mturk, myarboro, pgier, pslavice, redhat-bugzilla, rh-spice-bugs, rjones, rnetuka, rsvoboda, sardella, slawomir, srevivo, tmraz, twalsh, vtunka, weli, ykaul, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A timing attack flaw was found in OpenSSL that could allow a malicious user with local access to recover ECDSA P-256 private keys.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1412125, 1412126, 1412127, 1422053, 1422054, 1731337    
Bug Blocks: 1412130, 1457678    

Description Andrej Nemec 2017-01-11 10:09:24 UTC
The signing function in crypto/ecdsa/ecdsa_ossl.c in certain OpenSSL versions and forks is vulnerable to timing attacks when signing with the standardized elliptic curve P-256 despite featuring constant-time curve operations and modular inversion. A software defect omits setting the BN_FLG_CONSTTIME flag for nonces, failing to take a secure code path in the BN_mod_inverse method and therefore resulting in a cache-timing attack vulnerability. A malicious user with local access can recover ECDSA P-256 private keys.



Comment 1 Andrej Nemec 2017-01-11 10:18:00 UTC
Created openssl101e tracking bugs for this issue:

Affects: epel-5 [bug 1412127]

Comment 2 Andrej Nemec 2017-01-11 10:18:19 UTC
Created openssl tracking bugs for this issue:

Affects: fedora-all [bug 1412125]

Comment 3 Andrej Nemec 2017-01-11 10:18:34 UTC
Created mingw-openssl tracking bugs for this issue:

Affects: fedora-all [bug 1412126]

Comment 4 Tomas Mraz 2017-01-11 10:22:02 UTC
OpenSSL in Fedora is at 1.0.2j and 1.1.0c so it should be  fixed already.

Comment 6 Huzaifa S. Sidhpurwala 2017-01-12 08:41:54 UTC

In order to exploit this flaw, the attacker needs to be have local (shell) access to the machine where the message is being signed using the ECDSA algorithm with a P-256 elliptic curve key. Then using cache timing attacks (which needs precise timing), on multiple signature runs, the private key could be obtained. Based on the factor that exploitation is difficult, Red Hat Product Security Team has rated this flaw as having Moderate impact. A further security release may address this flaw.

Comment 12 errata-xmlrpc 2017-06-07 17:46:07 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

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

Comment 13 errata-xmlrpc 2017-06-07 17:57:59 UTC
This issue has been addressed in the following products:

  JBoss Core Services on RHEL 6

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

Comment 14 errata-xmlrpc 2017-06-07 18:00:39 UTC
This issue has been addressed in the following products:

  JBoss Core Services on RHEL 7

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

Comment 16 Huzaifa S. Sidhpurwala 2019-07-23 04:10:00 UTC
This issue was addressed in Red Hat Enterprise Linux 7 via the openssl-1.0.2k rebase: