Bug 1667568

Summary: x25519 allowed in FIPS mode
Product: Red Hat Enterprise Linux 8 Reporter: Alex Scheel <ascheel>
Component: nssAssignee: nss-nspr-maint <nss-nspr-maint>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: urgent Docs Contact:
Priority: high    
Version: 8.1CC: ascheel, dueno, hkario, mharmsen, mthacker, rcadova, rrelyea, szidek, tmraz, toneata
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1669180 1728260 1754518 (view as bug list) Environment:
Last Closed: 2019-08-05 08:14:35 UTC Type: Bug
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: 1679667, 1694603    
Bug Blocks: 1669180, 1701002, 1728260, 1754518    

Description Alex Scheel 2019-01-18 20:44:31 UTC
Description of problem:

In NSS, Curve25519 lacks a configuration parameter in the pkcs11.txt configuration format. As x25519 isn't yet an approved FIPS curve (with only the 3 NIST curves being approved), x25519 should not be enabled in FIPS mode; however, because it lacks a parameter, config="disable=ALL allow=<whitelist>" will fail to blacklist x25519.


On RHEL 7, this can be reproduced with the following since curl links against NSS:

1. Add an explicit config="disable=Curve25519" to /etc/pki/nssdb/pkcs11.txt
2. tcpdump -i eth0 -w capture.pcap
3. curl https://google.com

Notice how the Client Hello has x25519 as a supported group in the Client Hello. However, if you instead specify "SECP256R1" as the disabled curve, it will correctly disappear from the Client Hello.


This bug applies to RHEL7, RHEL8, RHEL8.1, and Fedora 29 as well. I believe a relevant portion showing the omission of x25519 is here:

https://github.com/nss-dev/nss/blob/master/lib/pk11wrap/pk11pars.c#L197


I was told to file this bug against RHEL 8.1 though. 




Version-Release number of selected component (if applicable):

nss-3.36.0-7.el7_5.x86_64

to

nss-3.41.0-1.fc29.x86_64



Expected results:

x25519 shouldn't be negotiated as a known group in FIPS mode. Configuration (whether crypto-policies on RHEL8/Fedora or pkcs11.txt) should understand x25519.