Bug 1375303

Summary: gnutls trusts a certificate whose CA is both explicitly trusted and blacklisted
Product: Red Hat Enterprise Linux 7 Reporter: Stanislav Zidek <szidek>
Component: gnutlsAssignee: Nikos Mavrogiannopoulos <nmavrogi>
Status: CLOSED ERRATA QA Contact: Stanislav Zidek <szidek>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: mgrepl
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gnutls-3.3.26-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 08:48:22 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:    
Bug Blocks: 1377248    

Description Stanislav Zidek 2016-09-12 16:36:02 UTC
Description of problem:
If I add my custom CA to both /etc/pki/ca-trust/source/anchors and /etc/pki/ca-trust/source/blacklist (and run update-ca-trust), certificates signed by this CA are trusted.

Version-Release number of selected component (if applicable):
gnutls-3.3.24-1.el7

How reproducible:
always

Steps to Reproduce:
1. generate a CA and a server cert signed by it
2. add the CA to both /etc/pki/ca-trust/source/anchors and /etc/pki/ca-trust/source/blacklist
3. update-ca-trust
4. verify server cert (certtool --verify <server.pem)

Actual results:
Chain verification output: Verified. The certificate is trusted.

Expected results:
Blacklist has priority, server cert is not trusted.

Additional info:
I did further investigation and it really seems that the issue is only in this corner case. Blacklisting CA that is included in system by default works as expected.

Comment 7 errata-xmlrpc 2017-08-01 08:48:22 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-2017:2292