RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1805132 - socat does not recognize IP addresses of the SAN extensions in ssl mode
Summary: socat does not recognize IP addresses of the SAN extensions in ssl mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: socat
Version: 8.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.0
Assignee: Ondrej Moriš
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-20 10:38 UTC by Frank Büttner
Modified: 2021-11-09 20:50 UTC (History)
4 users (show)

Fixed In Version: socat-1.7.4.1-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 17:48:19 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CRYPTO-5184 0 None None None 2021-11-09 00:24:00 UTC
Red Hat Issue Tracker CRYPTO-5185 0 None None None 2021-11-09 00:24:10 UTC
Red Hat Product Errata RHBA-2021:4167 0 None None None 2021-11-09 17:48:26 UTC

Description Frank Büttner 2020-02-20 10:38:03 UTC
Description of problem:
When using in ssl mode and the connection to the peer is done via an ip address and the ip address of the peer are in the san part of the x509 certificate, then the connection fails with: E certificate is valid but its commonName does not match hostname

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

How reproducible:
Every every time

Steps to Reproduce:
1. start socat on node B with the following command:
socat -u openssl-listen:4445,reuseaddr,cert=/etc/pki/tls/certs/cert.pem,key=/etc/pki/tls/private/key.pem,cafile=/etc/pki/tls/certs/certificate_chain.crt stdio

2. start scocat on node A with:
socat -d -d -d -u stdio openssl-connect:192.168.0.2:4445,cert=/etc/pki/tls/certs/cert.pem,key=/etc/pki/tls/private/key.pem,cafile=/etc/pki/tls/certs/certificate_chain.crt

Actual results:
The connection from node A to B fails with:
E certificate is valid but its commonName


Expected results:
Working connetions

Additional info:
The certificate_chain.crt contains all needed intermediate certificates.
cert.pem contain the IP addresses of both nodes in the SAN field.
Running socat in debug mode shows, that only DNS fields of the SAN part are checked. But IP field are ignored.
Here the SAN part of the certificate:
X509v3 Subject Alternative Name: 
                DNS:foo1.foo.foo, DNS:foo2.foo.foo, IP Address:192.168.0.1, IP Address:192.168.0.2

Debug log of socat:
socat[45554] I commonName "foo1.foo.foo" does not match peername "192.168.0.2"
socat[45554] I commonName "foo2.foo.foo" does not match peername "192.168.0.2"
socat[45554] I commonName "foo3.foo.foo" does not match peername "192.168.0.2"
socat[45554] E certificate is valid but its commonName does not match hostname
socat[45554] N exit(1)
socat[45554] I close(6)
foo3 is the cn name of the certificate

It looks like the IP addresses are not checked.

Comment 17 errata-xmlrpc 2021-11-09 17:48:19 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 (socat bug fix and enhancement update), 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/RHBA-2021:4167


Note You need to log in before you can comment on or make changes to this bug.