Bug 1538081

Summary: Policy does not apply to MGF1 hash in RSA-PSS signatures [rhel-7]
Product: Red Hat Enterprise Linux 7 Reporter: Alicja Kario <hkario>
Component: nssAssignee: Daiki Ueno <dueno>
Status: CLOSED ERRATA QA Contact: Alicja Kario <hkario>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.5CC: dueno, hkario
Target Milestone: rcKeywords: Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nss-3.43.0-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1649026 (view as bug list) Environment:
Last Closed: 2019-08-06 13:08:28 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: 1432142, 1649026    
Bug Blocks: 1457751, 1645231    

Description Alicja Kario 2018-01-24 12:47:43 UTC
Description of problem:
When a certificate uses SHA-1 for MGF1 hash and SHA-256 for document hash in RSA-PSS signatures and the policy is set to disallow use of SHA-1 the certificate is still accepted.

Version-Release number of selected component (if applicable):
 nss-3.34.0-4.el7

How reproducible:
always

Steps to Reproduce:
1. x509CertSign --CA ca -t webclient --padding pss --md sha256 --pssMgf1Md sha1 md-client
2. /usr/lib64/nss/unsupported-tools/selfserv -d sql:./md-server-db -p 4433 -rr -n md-server
3. set policy:
# To re-enable legacy algorithms, edit this file
# Note that the last empty line in this file must be preserved
library=
name=Policy
NSS=flags=policyOnly,moduleDB
config="disallow=md5:sha1 allow=DH-MIN=1023:DSA-MIN=1023:RSA-MIN=1023"

4. /usr/lib64/nss/unsupported-tools/tstclnt -d sql:./clnt-db -h localhost -p 4433

Actual results:
subject DN: CN=localhost
issuer  DN: O=Example CA
0 cache hits; 1 cache misses, 0 cache not reusable
0 stateless resumes
Received 0 Cert Status items (OCSP stapled data)


Expected results:
SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED

Additional info:

Comment 5 Simo Sorce 2019-02-11 15:39:56 UTC
This issue was not selected to be included either in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small amount of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.

Comment 13 errata-xmlrpc 2019-08-06 13:08:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2237