Bug 2223204

Summary: Rootful IPv6 masquerade does not route packets
Product: [Fedora] Fedora Reporter: François Rigault <francois.rigault>
Component: podmanAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: bbaude, container-sig, debarshir, dwalsh, go-sig, jnovy, lsm5, mheon, patrick, rh.container.bot, santiago
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/containers/netavark/issues/636
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-27 21:15:52 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:

Description François Rigault 2023-07-16 14:13:13 UTC
when publishing a port on an IPv6 network, packets from host to container are routed fine but the response is met with a "ICMP6, destination unreachable, unreachable route" 

seems similar to https://github.com/containers/netavark/issues/636

This is on rawhide with 
kernel 6.5.0-0.rc1.11.fc39.aarch64
iptables iptables-libs-1.8.9-4.fc39.aarch64
podman-4.5.1-1.fc39.aarch64

originally experienced while investigating an issue with Kubernetes Kind.

Reproducible: Always

Steps to Reproduce:
1. sudo -s
2. podman network create --ipv6  podman6
3. podman run --name n  --network podman6 --rm -ti --publish '8080:80' nginx
4. curl '[::1]:8080' -vvv
Actual Results:  
curl timeout

conntrack in SYN_RECV:

tcp      6 57 SYN_RECV src=::1 dst=::1 sport=38334 dport=8080 src=fd2d:a39e:3104:3725::3 dst=fd2d:a39e:3104:3725::1 sport=80 dport=38334 mark=0 secctx=system_u:object_r:unlabeled_t:s0 use=1

tcpdump: shows routing error:
14:08:42.582710 IP6 rawhide.38334 > fd2d:a39e:3104:3725::3.http: Flags [S], seq 119954706, win 65476, options [mss 65476,sackOK,TS val 3462719948 ecr 0,nop,wscale 7], length 0
14:08:42.582739 IP6 fd2d:a39e:3104:3725::3.http > rawhide.38334: Flags [S.], seq 2002668927, ack 119954707, win 64260, options [mss 1440,sackOK,TS val 2023408809 ecr 3462719948,nop,wscale 7], length 0
14:08:42.582753 IP6 rawhide > fd2d:a39e:3104:3725::3: ICMP6, destination unreachable, unreachable route rawhide, length 88



Expected Results:  
connection established

Comment 1 Matthew Heon 2023-07-17 16:28:55 UTC
This is a known problem specific to localhost. Localhost masquerade with IPv4 is allowed by the kernel, but not localhost IPv6 masquerade (my understanding is that this is for security reasons, but I'm not entirely familiar with why it is a security issue).

We've considered ways around this (which mostly amount to opening the sockets ourselves and forwarding traffic manually) but such a fix is currently low priority given that the forwarding does function correctly aside from localhost issues and the implications of having to maintain our own local forwarder.

Comment 2 François Rigault 2023-07-17 16:58:42 UTC
ok thanks for the feedback. 
For my particular use case I could use Kind apiServerAddress option, so I am not impacted by this behavior at all.


https://github.com/kubernetes-sigs/kind/blob/3610f606516ccaa88aa098465d8c13af70937050/site/content/docs/user/configuration.md?plain=1#L161

Comment 3 Fedora Release Engineering 2023-08-16 08:12:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 4 Lokesh Mandvekar 2023-10-18 13:22:59 UTC
can we close this?

Comment 5 Fedora Admin user for bugzilla script actions 2024-05-30 01:55:56 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 6 Aoife Moloney 2024-11-08 10:55:46 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 7 Aoife Moloney 2024-11-27 21:15:52 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 8 Red Hat Bugzilla 2025-03-28 04:25:14 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days