-
Notifications
You must be signed in to change notification settings - Fork 3.4k
v1.17 Backports 2025-06-23 #40176
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
Merged
Merged
v1.17 Backports 2025-06-23 #40176
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ upstream commit f42e7d8 ] I'm unsure what "Cilium-managed host traffic" really means, but we should not give the impression anything other than Cilium-managed pod-to-pod traffic is encrypted. We haven't encrypted traffic between pods and hostns for a long time now. Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com> Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
[ upstream commit 8103535 ] IPSec relies on XFRM states and policies to ensure encrypted pod-to-pod connectivity. In the XFRM state: * seq is the incoming sequence number counter. It is used by the kernel to track and validate received packets. When a packet arrives, its sequence number is compared to the expected range to detect replays or out-of-order packets. Together this the oseq value, it helps implement the anti-replay window to prevent attackers from resending previously captured packets. * oseq is the outgoing sequence number counter. It is used when sending packets protected by IPsec. Each outbound IPsec packet is assigned an incrementing oseq value. The oseq ensures unique sequence numbers for each packet, which the receiver uses to validate the order and detect replays. In a SA between two nodes A and B, the seq/oseq values in the XFRM state A must match the oseq/seq values in node B, and vice versa. If that is not the case, users would experience the `XfrmInStateProtoError` error, with no IPSec connectivity between the two nodes. We noticed that a Cilium user might end up in this situation in both the following cases, as stated in the doc changes: 1. KVStore Mode (e.g., etcd): if a Cilium agent connects too late to the newly created KVStore, it may miss the node delete and create events for entries that were restored or reinitialized. This results in staling XFRM state, causing permanent network disruption. 2. KVStore Mode: if a Cilium agent is down for prolonged time, the corresponding node entry in the kvstore will be deleted due to lease expiration (15m), resulting in stale XFRM states. 3. CRD Mode: a similar issue may occur when a CiliumNode resource is deleted and the Cilium agent DaemonSet is restarted. While other agents will recreate fresh XFRM states for the new CiliumNode, the restarted agent may continue to hold obsolete XFRM states referencing all peer nodes. The identified mitigation strategy for these scenario is an IPSec key rotation, which would cause all the states to be consistently recreated in all Cilium agents. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com> Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
/test |
pchaigno
approved these changes
Jun 23, 2025
smagnani96
approved these changes
Jun 23, 2025
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.
Thanks Viktor, LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.17
This PR represents a backport for Cilium 1.17.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Once this PR is merged, a GitHub action will update the labels of these PRs: