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 1908036 - openssl listens on IPv4 "any" socket only not on IPv6
Summary: openssl listens on IPv4 "any" socket only not on IPv6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openssl
Version: 8.4
Hardware: All
OS: Unspecified
low
low
Target Milestone: rc
: 8.0
Assignee: Daiki Ueno
QA Contact: Ivan Nikolchev
URL:
Whiteboard:
Depends On:
Blocks: 1976845
TreeView+ depends on / blocked
 
Reported: 2020-12-15 18:00 UTC by Hubert Kario
Modified: 2021-11-10 08:44 UTC (History)
12 users (show)

Fixed In Version: openssl-1.1.1k-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1976845 (view as bug list)
Environment:
Last Closed: 2021-11-09 19:44:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1909213 0 high CLOSED s390x systems lost link-local IPv6 addresses 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker CRYPTO-5287 0 None None None 2021-11-09 19:59:57 UTC
Red Hat Product Errata RHSA-2021:4424 0 None None None 2021-11-09 19:45:06 UTC

Internal Links: 1909213

Description Hubert Kario 2020-12-15 18:00:45 UTC
Description of problem:
When I start an application like OpenSSL, it did start by listening on IPv6 "any" address, now it's listening on the IPv4 specific "any" address.

Version-Release number of selected component (if applicable):
Not sure, included in the RHEL-8.4.0-20201209.n.0 compose

How reproducible:
always

Steps to Reproduce:
1. start openssl s_server
2. ss -ptna | grep openssl

Actual results:
LISTEN     0      128          0.0.0.0:4433       0.0.0.0:*    users:(("openssl",pid=7325,fd=3))

Expected results:
LISTEN      0        128                     *:4433                   *:*        users:(("openssl",pid=846593,fd=3)) 

Additional info:
The bug is s390x specific

Comment 1 Florian Weimer 2020-12-15 18:08:41 UTC
Would you please share your /etc/nsswitch.conf file? Is the system host name listed in /etc/hosts or resolvable over DNS? Thanks.

I assume the expected behavior occurs under Red Hat Enterprise Linux 8.3.0.

Comment 3 Florian Weimer 2020-12-15 19:01:14 UTC
Actual reproducer commands:

openssl req -nodes -x509 -new -out server.pem  -keyout server.key -days 365  -subj "/C=XX/ST=mystate/L=mytown/O=myorganisation/OU=myou/CN=myname/emailAddress=myemail/"
openssl s_server -www -key server.key -cert server.pem
^Z
ss -ptna | grep openssl

My test system does not have any link-local IPv6 addresses, so the glibc behavior is as documented. OpenSSL uses AI_PASSIVE | AI_ADDRCONFIG.

Comment 4 Hubert Kario 2020-12-15 19:37:09 UTC
ah, so the problem is that openssl is asking from wrong address and the host configuration exposed it

thanks for debugging it, I'm switching the bug to openssl then

Comment 5 Alexander Sosedkin 2020-12-16 13:04:25 UTC
bz1908334 is a sister bug for gnutls (same issue, also caused by AI_ADDRCONFIG application).

Comment 6 Marcelo Ricardo Leitner 2020-12-17 14:57:26 UTC
(In reply to Florian Weimer from comment #3)
> My test system does not have any link-local IPv6 addresses, so the glibc
> behavior is as documented. OpenSSL uses AI_PASSIVE | AI_ADDRCONFIG.

Can you please share more details on the networking for this system?
Which interfaces it has, how are they configured?

Comment 8 Marcelo Ricardo Leitner 2020-12-17 16:17:51 UTC
(In reply to Hubert Kario from comment #7)
> they don't have IPv6 addresses on public interface, not even link-local
> addresses

That much I understood. IPv6 public addresses AFAIK are assigned by IT and the
systems will fetch it with dhcpv6. But link-local addresses can be auto-generated
and doesn't depend on anything, so we may have two problems at hand here then.

So it would be helpful if you could describe how the network is configured on these
systems. Is it using networkmanager? Is it, somehow, disabling ipv6 maybe (say, via
net.ipv6.conf.all.disable_ipv6)?

(In reply to Hubert Kario from comment #0)
> Actual results:
> LISTEN     0      128          0.0.0.0:4433       0.0.0.0:*   
> users:(("openssl",pid=7325,fd=3))
> 
> Expected results:
> LISTEN      0        128                     *:4433                   *:*   
> users:(("openssl",pid=846593,fd=3)) 

For this, it shouldn't matter specifics of cabled interfaces, as you can have ipv6
enabled only on loopback and it should be enough. Can you please share the output of
'ip addr list' ?

Comment 9 Hubert Kario 2020-12-17 17:14:37 UTC
I don't know how they are configured, I didn't do anything special, just asked beaker for s390x machine. Clone my task if you want to see what environment you end up with.

Comment 10 Florian Weimer 2020-12-18 16:17:22 UTC
Beniamino asked for a NetworkManager bug regarding the underlying issue, so I filed 1909213.

Comment 18 errata-xmlrpc 2021-11-09 19:44:31 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 (Moderate: openssl security and bug fix 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/RHSA-2021:4424


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