Bug 1942533 (CVE-2021-20305)

Summary: CVE-2021-20305 nettle: Out of bounds memory access in signature verification
Product: [Other] Security Response Reporter: Cedric Buissart <cbuissar>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: ALEXANDER.HOPPE, ansasaki, asosedki, chorn, chousekn, cmoore, crypto-team, daviddavis, dbecker, dueno, dwmw2, faguiard, jjoyce, jschluet, kaycoth, lhh, lpeer, lphiri, mburns, mike, nicampbe, n.mavrogiannopoulos, osapryki, pemensik, pwouters, rh-spice-bugs, sadams, sclewis, slinaber, szidek, tm, vmugicag
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nettle 3.7.2 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Nettle, where several Nettle signature verification functions (GOST DSA, EDDSA & ECDSA) result in the Elliptic Curve Cryptography point (ECC) multiply function being called with out-of-range scalers, possibly resulting in incorrect results. This flaw allows an attacker to force an invalid signature, causing an assertion failure or possible validation. The highest threat to this vulnerability is to confidentiality, integrity, as well as system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-08 23:35:19 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: 1942535, 1942918, 1942919, 1942921, 1942922, 1942923, 1942924, 1942925, 1942926, 1942927, 1942928, 1942929, 1942930, 1942931, 1943156, 1946910, 1946960, 1948707, 1950937, 1950938, 1950939, 1950940, 1950942, 1950943, 1950944, 1950945, 1962738, 1962739, 1966261, 1976077    
Bug Blocks: 1939224, 1945330    

Description Cedric Buissart 2021-03-24 14:12:36 UTC
Certain signatures result in the ecc point multiply function being called with out-of-range scalars, which may give incorrect results, or crash in an assertion failure. It's an old bug, probably since Nettle's initial implementation of ECDSA.

Even when it's not possible to trigger an assertion failure, it's easy to produce valid-looking input "signatures" that hit out-of range intermediate scalar values where point multiplication may misbehave. This applies to all the NIST secp* curves as well as the GOST curves.

Reference:
https://lists.lysator.liu.se/pipermail/nettle-bugs/2021/009457.html

Comment 1 Cedric Buissart 2021-03-24 14:13:07 UTC
Created gnutls tracking bugs for this issue:

Affects: fedora-all [bug 1942535]

Comment 4 Cedric Buissart 2021-03-25 10:52:47 UTC
Created nettle tracking bugs for this issue:

Affects: fedora-all [bug 1942921]

Comment 13 errata-xmlrpc 2021-04-08 21:44:23 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2021:1145 https://access.redhat.com/errata/RHSA-2021:1145

Comment 14 Product Security DevOps Team 2021-04-08 23:35:19 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-20305

Comment 15 Pedro Sampaio 2021-04-12 19:02:15 UTC
Created mingw-nettle tracking bugs for this issue:

Affects: fedora-all [bug 1948707]

Comment 16 errata-xmlrpc 2021-04-14 20:30:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1206 https://access.redhat.com/errata/RHSA-2021:1206

Comment 18 errata-xmlrpc 2021-04-19 11:47:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:1245 https://access.redhat.com/errata/RHSA-2021:1245

Comment 19 errata-xmlrpc 2021-04-19 11:54:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:1246 https://access.redhat.com/errata/RHSA-2021:1246

Comment 20 Cedric Buissart 2021-04-19 15:03:11 UTC
Acknowledgments:

Name: Niels Möller

Comment 21 Cedric Buissart 2021-04-20 15:08:33 UTC
External References:

https://lists.lysator.liu.se/pipermail/nettle-bugs/2021/009457.html

Comment 25 Cedric Buissart 2021-05-05 06:37:07 UTC
Statement:

* Although Red Hat OpenStack's dibbler package bundles nettle, it does not include the flawed functionality and is therefore unaffected.

Comment 31 errata-xmlrpc 2021-06-07 22:29:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.7 Extended Update Support

Via RHSA-2021:2280 https://access.redhat.com/errata/RHSA-2021:2280

Comment 32 errata-xmlrpc 2021-06-09 09:28:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.6 Advanced Update Support
  Red Hat Enterprise Linux 7.6 Telco Extended Update Support
  Red Hat Enterprise Linux 7.6 Update Services for SAP Solutions

Via RHSA-2021:2356 https://access.redhat.com/errata/RHSA-2021:2356

Comment 36 errata-xmlrpc 2021-07-15 19:01:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Advanced Update Support
  Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.4 Telco Extended Update Support

Via RHSA-2021:2758 https://access.redhat.com/errata/RHSA-2021:2758

Comment 37 errata-xmlrpc 2021-07-19 07:53:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.3 Advanced Update Support

Via RHSA-2021:2760 https://access.redhat.com/errata/RHSA-2021:2760