Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
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: VERIFIED
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:
URL:
Whiteboard:
Depends On:
Blocks: 1976845
TreeView+ depends on / blocked
 
Reported: 2020-12-15 18:00 UTC by Hubert Kario
Modified: 2022-09-01 08:28 UTC (History)
11 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:
Type: Bug
Target Upstream Version:


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 2022-05-16 11:32:56 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.


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