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.