Bug 1925226 (CVE-2021-20230)

Summary: CVE-2021-20230 stunnel: client certificate not correctly verified when redirect and verifyChain options are used
Product: [Other] Security Response Reporter: Riccardo Schirone <rschiron>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: asosedki, crypto-team, ngompa13, rhel-crypto-maint, sahana, security-response-team, szidek, tm
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: stunnel 5.57 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in stunnel, where it improperly validates client certificates when it is configured to use both redirect and verifyChain options. This flaw allows an attacker with a certificate signed by a Certificate Authority, which is not the one accepted by the stunnel server, to access the tunneled service instead of being redirected to the address specified in the redirect option. The highest threat from this vulnerability is to confidentiality.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-22 13:02:02 UTC Type: ---
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: 1925229, 1925230, 1926894, 1926895, 1926896, 1926897    
Bug Blocks: 1919806, 1926224    

Description Riccardo Schirone 2021-02-04 16:15:34 UTC
stunnel before version 5.57 does not correctly verify the client certificate when options `redirect` and `verifyChain` are used. `redirect` redirects TLS client connections to another address when there is a certificate-based authentication failure and `verifyChain` is used to verify the client certificate starting from the root CA (specified in CAfile or CApath). When these options are used together, the stunnel server does not correctly validate the client certificate, allowing a client with a certificate not signed by the right CA to access the service without being redirected to the specified `redirect` address.

Upstream 5.57 release patch:
https://github.com/mtrojnar/stunnel/commit/ebad9ddc4efb2635f37174c9d800d06206f1edf9

Comment 2 Riccardo Schirone 2021-02-04 16:58:14 UTC
"redirect" option was added in stunnel upstream version 5.00, according to https://www.stunnel.org/NEWS.html .

Comment 9 RaTasha Tillery-Smith 2021-02-09 17:04:21 UTC
Statement:

This issue did not affect the versions of stunnel as shipped with Red Hat Enterprise Linux 5, 6, and 7 as they did not include support for the "redirect" option.

Comment 13 errata-xmlrpc 2021-02-22 10:25:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:0620 https://access.redhat.com/errata/RHSA-2021:0620

Comment 14 errata-xmlrpc 2021-02-22 10:26:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:0618 https://access.redhat.com/errata/RHSA-2021:0618

Comment 15 errata-xmlrpc 2021-02-22 10:39:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:0619 https://access.redhat.com/errata/RHSA-2021:0619

Comment 16 Product Security DevOps Team 2021-02-22 13:02:02 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-20230