Bug 1826177 (CVE-2020-12399)

Summary: CVE-2020-12399 nss: Timing attack on DSA signature generation
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bmontgom, crypto-team, cschalle, dueno, elio.maldonado.batiz, eparis, gecko-bugs-nobody, jburrell, jhorak, jokerman, kdudka, kengert, markdenihan, nss-nspr-maint, nstielau, rrelyea, security-response-team, sponnaga, stransky
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: nss 3.44.4, nss 3.52.1, thunderbird 68.9.0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the DSA signature generation function in nss. During the process of generating a DSA signature, the nonce value 'k' is not padded, exposing the bit length. Combined with other techniques, this can result in the recovery of the DSA private key. The highest threat from this vulnerability is to data confidentiality.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-18 22:44:56 UTC 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: 1838376, 1838377, 1838378    
Bug Blocks: 1826178    

Description Marian Rehak 2020-04-21 07:47:53 UTC
During DSA signature generation in the function `dsa_SignDigest`, the nonce value `k` is not padded, exposing the bit length of `k`, i.e. the most significant bits (MSBs) of the nonce. Combined with other techniques this can result in DSA private keys recovery.

Comment 1 Mark Cooper 2020-04-22 05:51:32 UTC
OpenShift 4.x only packages nss-altfiles and has been confirmed to *not* share any of the vulnerable signature code:
    - nss-altfiles only reads information from files in the same format as /etc/passwd and /etc/group.

Comment 2 Huzaifa S. Sidhpurwala 2020-05-20 03:17:47 UTC
Upstream patch: https://hg.mozilla.org/projects/nss/rev/daa823a4a29bcef0fec33a379ec83857429aea2e
Upstream bug (still private): https://bugzilla.mozilla.org/show_bug.cgi?id=1631576

Comment 7 Huzaifa S. Sidhpurwala 2020-05-21 02:44:44 UTC

Name: the Mozilla Project
Upstream: Cesar Pereida Garcia and the Network and Information Security Group (NISEC) (Tampere University)

Comment 9 Huzaifa S. Sidhpurwala 2020-05-21 02:49:09 UTC
Created nss tracking bugs for this issue:

Affects: fedora-all [bug 1838376]

Comment 12 Huzaifa S. Sidhpurwala 2020-05-21 04:26:20 UTC

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Comment 13 Mark Denihan 2020-05-28 15:46:10 UTC
@Huzaifa Can you clarify the mitigation statement? Is the mitigation not available or is it available and doesn't meet the Red Hat Product Security criteria. Is there any indication of when a mitigation would be available?

Comment 15 Doran Moppert 2020-06-15 03:25:55 UTC

A timing attack was found in the way NSS generated DSA signatures. A man-in-the-middle attacker could use this attack during DSA signature generation to recover the private key. This attack is only feasible when the attacker is local to the machine or in certain cross-VM scenarios where the signature is being generated. Attacks over the network or via the internet are not feasible.

Firefox and Thunderbird on Red Hat Enterprise Linux are built against the system nss library.