Bug 2159066
Summary: | stopped detecting port conflicts with kernel 6.0.16 - bind() does not fail with "address already in use" any more | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Pitt <mpitt> | ||||
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 37 | CC: | acaringi, acui, adscvr, airlied, alciregi, andy, bbaude, bskeggs, cks-rhbugzilla, container-sig, debarshir, dwalsh, go-sig, hdegoede, hpa, ismail, jarodwilson, jglisse, jnovy, josef, kernel-maint, lgoncalv, linville, lsm5, masami256, mchehab, mheon, mhofmann, mhroncok, nvwarr, patrick, pehunt, pholzing, ptalbert, rh.container.bot, santiago, steved | ||||
Target Milestone: | --- | Keywords: | Regression | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | CockpitTest | ||||||
Fixed In Version: | kernel-6.1.4-200.fc37 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2023-02-26 08:34:19 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: | |||||||
Attachments: |
|
Description
Martin Pitt
2023-01-08 09:19:24 UTC
Might be an issue with the kernel. I did something similar with nc -l 5001 & nc -l 5001 This does seem to be a problem in the kernel. I am also seeing it in 6.0.17-300.fc37.x86_64 & 6.0.18-300.fc37.x86_64. I see it when I start two ssh sessions going to a server both using X11 forwarding. The second or subsequent sessions get allocated the same port number for the forwarding ports. On kernel 6.0.15 with debug enabled sshd reports "Address already in use" as it cycles through ports 6010- onwards. On the faulty kernels sshd just allocates port 6010 on all sessions. Ack, this starts looking serious! Reassigning to the kernel then. This is no longer happening in kernel-6.1.4-200.fc37. See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/7VPNMC77YC3SI5LFYKUA4B5MTFPLTLVB/ *** Bug 2159802 has been marked as a duplicate of this bug. *** This bug breaks X11 forwarding in ssh and also breaks some in-house software. For us it is quite a severe showstopper. Fortunately, it seems easy to fix. In net/ipv4/inet_connection_sock.c:370, ret should be initialised to -EADDRINUSE not 1 in the function inet_csk_get_port. Patching this seems to fix the problem. The suggestion is from: https://lore.kernel.org/stable/CAFsF8vL4CGFzWMb38_XviiEgxoKX0GYup=JiUFXUOmagdk9CRg@mail.gmail.com/ which Miro pointed to. Created attachment 1937748 [details]
patch to fix it
Here's the actual patch
Current F37/F38 kernels seem fine. |