-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ipsec: Fix unencrypted traffic when IPsec is used with L7 egress proxy #32683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/ci-ipsec-upgrade |
|
Maybe even the first 2 patches are also not needed? Will try later. |
No we still need that: https://github.com/cilium/cilium/actions/runs/9205906830/job/25322612955 I think this is because adding But I don't understand how #32331 passed ci-ipsec-e2e on kpr=true + bpf.masq=true. My understanding is, since proxy is always transparent, we always need netfilter to do masquerade for go-to-world traffic. |
a0f49ac to
aceca82
Compare
aceca82 to
c4d9fe5
Compare
71facda to
7807510
Compare
3766731 to
6cb00de
Compare
This was addressed by cilium#32683. Signed-off-by: Julian Wiedmann <[email protected]>
This was addressed by #32683. Signed-off-by: Julian Wiedmann <[email protected]>
[ upstream commit 5f18d88 ] This was addressed by cilium#32683. Signed-off-by: Julian Wiedmann <[email protected]>
[ upstream commit 5f18d88 ] This was addressed by cilium#32683. Signed-off-by: Julian Wiedmann <[email protected]>
[ upstream commit 5f18d88 ] This was addressed by #32683. Signed-off-by: Julian Wiedmann <[email protected]>
[ upstream commit 5f18d88 ] This was addressed by #32683. Signed-off-by: Julian Wiedmann <[email protected]>
[ upstream commit: 5f18d88 ] This was addressed by #32683. Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: gray <[email protected]>
[ upstream commit: 5f18d88 ] This was addressed by #32683. Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: gray <[email protected]>
Allow Envoy listener chaining via the loopback device by not routing transparent proxy traffic destined to the loopback device to the cilium_host device. Fixes: cilium#32683, cilium/proxy#742 Signed-off-by: Jarno Rajahalme <[email protected]>
Allow Envoy listener chaining via the loopback device by not routing transparent proxy traffic destined to the loopback device to the cilium_host device. Fixes: #32683, cilium/proxy#742 Signed-off-by: Jarno Rajahalme <[email protected]>
Allow Envoy listener chaining via the loopback device by not routing transparent proxy traffic destined to the loopback device to the cilium_host device. Fixes: cilium#32683, cilium/proxy#742 Signed-off-by: Jarno Rajahalme <[email protected]>
[ upstream commit 4c9cf37 ] Allow Envoy listener chaining via the loopback device by not routing transparent proxy traffic destined to the loopback device to the cilium_host device. Fixes: #32683, cilium/proxy#742 Signed-off-by: Jarno Rajahalme <[email protected]> Signed-off-by: gray <[email protected]>
[ upstream commit 4c9cf37 ] Allow Envoy listener chaining via the loopback device by not routing transparent proxy traffic destined to the loopback device to the cilium_host device. Fixes: #32683, cilium/proxy#742 Signed-off-by: Jarno Rajahalme <[email protected]> Signed-off-by: gray <[email protected]>
|
|
||
| if (from_proxy && | ||
| (!info || !identity_is_cluster(info->sec_identity))) | ||
| ctx->mark = MARK_MAGIC_PROXY_TO_WORLD; | ||
| #endif /* ENABLE_IPSEC && !TUNNEL_MODE */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jschwinger233 coming back to this - I only now realized that #36329 also applies here, and the mark potentially gets scrubbed on the transfer between cilium_host and cilium_net. Which is why we're still setting use_meta=true in the set_ipsec_encrypt() call above.
So I suppose this mark works well as mechanism to skip the transparent-socket match in iptables - but we can't really trust yet that it also survives until cilium_net (or a subsequent to-netdev) would see it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😨
This PR fixes unencrypted traffic among nodes when IPsec is used with L7 egress proxy.
This PR supersedes #31955 that didn't take cilium/proxy#742 into consideration.
(The last three patches are temporarily added to run leak detection in CI, they'll be dropped after approval. Leak detection will be added separately soon.)
Fixes: #31984