# Cilium v1.18.5

2025-12-18 · [Original release notes](https://github.com/cilium/cilium/releases/tag/v1.18.5) · [Full summary](https://ratatosk.io/en/releases/cilium/v1.18.5)

Security 2 · Breaking changes 3 · Important fixes 21 · Dependency updates 19 · Other changes 35

## Security (2)

### ipcache consistency fixed for overlapping `toFQDN` selectors

- Affects: FQDN policies with multiple `toFQDN` selectors matching the same IP

When a DNS lookup matched multiple `toFQDN` selectors, ipcache could assign the IP either selector's identity depending on operation order, leaving ipcache inconsistent and making FQDN policies nearly unusable. The inconsistent behavior caused by the `flattened` comparison is fixed for this case.

> * Fix ipcache issues causing severe issues with the fqdn subsystem (Backport PR cilium/cilium#42864, Upstream PR cilium/cilium#42815, @odinuge)

### Automatic recovery of deleted `CiliumEndpoint` resources

- Affects: `CiliumEndpoint` resources in Kubernetes

During make-before-break pod migrations, a race could delete a `CiliumEndpoint` without checking ownership, leaving a pod unmanaged indefinitely, bypassing network policies and becoming invisible to monitoring. Missing CEPs are now detected and recreated within 10 seconds.

> * Recreate CiliumEndpoints (k8s resource) if they are accidentally deleted. (Backport PR cilium/cilium#43117, Upstream PR cilium/cilium#42877, @aanm)

## Breaking changes (3)

### Conntrack GC logs replace `CTMapIPVersion` with `Family` and `ClusterID`

- Affects: setups that generate or consume conntrack GC log entries (Inferred)

> * Fix GC of per-cluster ctmap entries (Backport PR cilium/cilium#43294, Upstream PR cilium/cilium#43160, @giorio94)

### KVStoreMesh CA bundle validation fixed

- Affects: KVStoreMesh remote-cluster certificate validation with the CA bundle setting enabled (Inferred)

When KVStoreMesh validated remote-cluster certificates with the CA bundle setting enabled, it used the CA from the secret instead of the configured bundle. It now uses the configured CA bundle.

> * KVStoreMesh now correctly respects the CA bundle setting when validating remote cluster certificates (Backport PR cilium/cilium#42828, Upstream PR cilium/cilium#42726, @giorio94)

### L4 checksum update error reporting fixed for ICMP Errors with TCP inner packets

- Affects: ICMP Error messages with TCP inner packets

When the optional length attribute was missing, Cilium could fail to report L4 checksum update errors.

> * Fix a bug that would cause Cilium to not report L4 checksum update errors when the length attribute is missing in ICMP Error messages with TCP inner packets. (Backport PR cilium/cilium#42828, Upstream PR cilium/cilium#42426, @yushoyamaguchi)

## Important fixes (21)

### DNS proxy transparent mode no longer excludes Endpoint ID 1

- Affects: DNS proxy transparent mode enabled (Inferred)

The old check tested endpoint ID where the intent was to test security identity, though the host check made that identity check unnecessary. The remaining transparent-mode conditions still apply.

> * Do not opt-out Endpoint ID 1 from dnsproxy transparent mode. (Backport PR cilium/cilium#42948, Upstream PR cilium/cilium#42887, @jrajahalme)

### IPsec XFRM log directions corrected

- Affects: Cilium IPsec setups that log processed XFRM rules (Inferred)

Previously, processed XFRM rules were all logged as ingress, including egress rules. Logs now derive direction from the masked mark: decrypt marks are ingress, encrypt marks are egress, and nil or invalid marks are unspecified.

> * Fix a bug that would cause IPsec logs to incorrectly report the XFRM rules being processed as "Ingress" rules. (Backport PR cilium/cilium#42828, Upstream PR cilium/cilium#42640, @sjohnsonpal)

### FQDN cache race that blocked egress fixed

- Affects: FQDN setups using `toFQDN` egress policies

When a domain was already in the FQDN cache and a DNS lookup was in flight, garbage collection could add an IP to the global cache before the lookup upserted it. `toFQDN` could then deny egress to that IP until it was removed from the FQDN cache and returned by a later lookup; the fix limits the described garbage-collection path to IPs already in the local cache.

> * fqdn: Fix fqdn subsystem correctness issues causing packet drops and inconsistent ipcache (Backport PR cilium/cilium#43117, Upstream PR cilium/cilium#42500, @odinuge)

### Immediate Cilium operator shutdown after loss of HA leadership

- Affects: Cilium operator deployments using HA leader election (Inferred)

In rare cases, after losing leadership in an HA deployment, an operator could keep acting as leader for up to a minute, causing split-brain problems such as duplicate pod CIDR allocation.

> * In rare cases, the cilium-operator losing the lead of the HA deployment could continue acting as if leading for at most a minute, leading to split-brain problems such as double allocation of pod CIDRs. (Backport PR cilium/cilium#43059, Upstream PR cilium/cilium#42920, @bimmlerd)

### Consolidated CIDR metadata leak fixed

- Affects: policy-generated, consolidated CIDR metadata in `ipcache`, especially when multiple policies reference the same CIDR

When multiple policies referenced the same consolidated CIDR, deleting the last policy could send a deletion under a different resource identity, so the metadata tracker ignored it and the CIDR metadata leaked. Upserts and removals now use the same resource identity, allowing the final deletion to remove the metadata.

> * [v1.18] ipcache: Fix leak in CIDR metadata consolidation logic (cilium/cilium#43354, @christarazi)

### Cluster Mesh sidecar etcd listeners bind on all IPs and advertise localhost

- Affects: Cluster Mesh API Server deployments using sidecar etcd; etcd metrics when enabled

With etcd v3.6.6 or later, a bracketed IPv4 Pod IP in the listener URL is rejected by stricter validation. Previously, the client URL advertised the Pod IP, and the client and enabled metrics listeners were bound to localhost and the primary Pod IP.

> * Change the sidecar etcd instance of the Cluster Mesh API Server listen on all IP addresses (Backport PR cilium/cilium#42948, Upstream PR cilium/cilium#42818, @giorio94)

### AWS EC2 ENI attachment slot validation fixed

- Affects: AWS EC2 instances with multiple network cards, including EFA setups

When the attachment request omitted the network card index, AWS could reject it with an `InvalidParameterValue` error while validating available ENI slots. Cilium now sends index 0 explicitly for its primary-NIC attachment requests, resolving this validation failure.

> * AWS EC2: Fix ENI attachment on multi-network card instances with high-performance networking (EFA) setups (Backport PR cilium/cilium#42745, Upstream PR cilium/cilium#42512, @41ks)

### FQDN garbage collection now cleans stale global cache entries

- Affects: FQDN cache entries associated with deleted endpoints

Previously, those entries were cleaned up only when another endpoint later looked up the same FQDN, so names that were never looked up again could remain leaked in the global cache. The garbage collector now removes names that remain in the global cache but are absent from endpoint caches.

> * Cleanup FQDNs that have leaked into the global FQDN cache (Backport PR cilium/cilium#42864, Upstream PR cilium/cilium#42485, @sjohnsonpal)

### AWS ENI subnet-selection nil-subnet panic fixed

- Affects: AWS ENI setups

When a route table referenced a subnet missing from the manager's subnet map, including one filtered out by `subnetsFilters`, selection could panic. It now skips that subnet and can select the tracked subnet with the most available addresses.

> * ENI: Fix panic on nil subnet (Backport PR cilium/cilium#43117, Upstream PR cilium/cilium#43023, @HadrienPatte)

### Graceful fallback when etcd is in a bad state

- Affects: Cilium agents configured to use etcd as their kvstore

When the etcd cluster had no leader, agents could repeatedly relist keys, starving etcd of network capacity and potentially causing OOM kills. Range requests now require a quorum or leader instead of using serializable reads.

> * Ensure cilium-agent gracefully does fallbacks when etcd is in a bad state. (Backport PR cilium/cilium#43059, Upstream PR cilium/cilium#42977, @odinuge)

### Endpoint identity reference-count leak fixed

- Affects: endpoint restoration for endpoints already stopping and being cleaned up

An endpoint in this state could have an identity that was never added to the identity manager, but cleanup removed it anyway, causing a reference-count issue. Cleanup now releases an identity only if it was set and managed by the agent.

> * Fix agent local identity leak (Backport PR cilium/cilium#43117, Upstream PR cilium/cilium#42662, @odinuge)

### IPsec XFRM state conflict detection fixed

- Affects: IPsec-enabled setups that add XFRM states

The agent compared source IP addresses when checking for conflicts, which could leave a conflicting state in place and cause insertion to fail, potentially preventing startup. It now follows the kernel’s conflict lookup, removes conflicting states, and retries the insertion.

> * Fix bug that could cause the agent to fail to add XFRM states when IPsec is enabled, thus preventing a proper startup. (Backport PR cilium/cilium#42948, Upstream PR cilium/cilium#42666, @pchaigno)

### Endpoint regeneration cancellation deadlock fixed

- Affects: endpoint creation through `PUT /endpoint/{id}` (Inferred)

After the request returned successfully, cancellation of its context could stop regeneration, leaving the endpoint stuck in `waiting-to-regenerate` and subsequent regenerations waiting indefinitely. That cancellation no longer interrupts endpoint regeneration.

> * Fix issue where endpoints got stuck in "waiting-to-regenerate" (Backport PR cilium/cilium#42948, Upstream PR cilium/cilium#42856, @odinuge)

### Selector policy cache leak fixed

- Affects: endpoint regeneration

If an endpoint changed identity during regeneration, its identity could be removed from the selector policy cache, causing a leak.

> * Fix leak in the policy subsystem (Backport PR cilium/cilium#43117, Upstream PR cilium/cilium#42661, @odinuge)

### Expired kvstore lease reuse fixed

- Affects: setups using the kvstore lease manager (Inferred)

In a rare kvstore issue, Cilium kept using an expired lease, causing kvstore operations to fail consistently.

> * Fix rare kvstore issue where cilium continues to use an expired lease causing kvstore operations to fail consistently (Backport PR cilium/cilium#42745, Upstream PR cilium/cilium#42709, @odinuge)

### Endpoint selector-policy deadlock fixed

- Affects: selector-policy updates for endpoints with the same identity

When one endpoint runs `updateSelectorPolicy` on an older revision while another runs it on a newer revision, the newer update can replace the old selector policy before the first endpoint runs `DistillPolicy`, leaving it stuck on a detached policy and unable to receive updates with new identities. The affected endpoint is now regenerated after detachment, allowing it to receive the updated policy and identities.

> * policy: Fix rare Endpoint Selector Policy Deadlock causing policies to not be updated with new identities (Backport PR cilium/cilium#42864, Upstream PR cilium/cilium#42306, @odinuge)

### etcd/clustermesh troubleshooting certificate validation fixed

- Affects: etcd or clustermesh troubleshooting certificate-validation commands

When these commands validated certificates, their verification options did not explicitly specify `ClientAuth`, and warnings omitted the underlying verification error. They now check certificate validity for client authentication and include the verification error in the warning.

> * Minor improvements around certificate validation in etcd/clustermesh troubleshoot commands (Backport PR cilium/cilium#42948, Upstream PR cilium/cilium#42782, @giorio94)

### Broken JSON responses fixed for local policy API `L4Filter` exports

- Affects: JSON-marshaled `L4Filter` exports through the local policy API

If an `L4Filter` contains a field that cannot be JSON-encoded, the API could return broken JSON. The error detail is now JSON-encoded, with `unable to marshall error` as a fallback if encoding the detail also fails.

> * policy: Marshal L4Filter marshalling errors into json (Backport PR cilium/cilium#42948, Upstream PR cilium/cilium#42834, @joestringer)

### LXC-to-host source identity transfer fixed

- Affects: LXC-to-host traffic subject to host ingress policy handling

For IPv4 or IPv6 traffic from an LXC endpoint to the host that goes through host ingress policy handling, the source security identity was not stored in `CB_SRC_LABEL`. It is now available to the lxc-to-host policy path.

> * [v1.18] bpf: lxc: transfer source identity for lxc-to-host policy (cilium/cilium#42821, @julianwiedmann)

### Hybrid load-balancing forwarding mode selection fixed

- Affects: setups using Hybrid load-balancing mode (Inferred)

Service map entries in Hybrid mode now use DSR for TCP and SNAT for other or unspecified protocols. When `LBModeAnnotation` is enabled, a defined forwarding mode from the service annotation takes precedence.

> * [v1.18] lb: Implement Hybrid-DSR via annotation infrastructure (cilium/cilium#43056, @julianwiedmann)

### Connectivity loss for terminating endpoints fixed

- Affects: terminating Kubernetes endpoints with a false `serving` condition

Pod readiness checks could make terminating endpoints unready, causing them to be discarded and connectivity to be lost. They now remain in BPF backend state until fully removed, but are not used for new connections; the API can report their state as `terminating-not-serving`.

> * Kubernetes endpoints that are terminating are retained in the backends BPF state regardless of the "serving" condition to avoid connection disruptions when a pod no longer signals readiness to process new connections. (cilium/cilium#42708, @joamaki)

## Dependency updates (19)

19 more, none mentioning security

- `* [v1.18] proxy: Bump envoy version to v1.34.11 (cilium/cilium#43143, @sayboras)`
- `* [v1.18] deps: bump x/crypto to v0.45.0 (cilium/cilium#43114, @ferozsalam)`
- `* [v1.18] vendor: Bump to StateDB v0.4.6 (cilium/cilium#42953, @joamaki)`
- `* chore(deps): update all-dependencies (v1.18) (cilium/cilium#42804, @cilium-renovate[bot])`
- `* chore(deps): update all-dependencies (v1.18) (cilium/cilium#43037, @cilium-renovate[bot])`
- `* chore(deps): update dependency cilium/cilium-cli to v0.18.9 (v1.18) (cilium/cilium#43182, @cilium-renovate[bot])`
- `* chore(deps): update dependency cilium/little-vm-helper to v0.0.28 (v1.18) (cilium/cilium#42771, @cilium-renovate[bot])`
- `* chore(deps): update dependency protocolbuffers/protobuf to v33.1 (v1.18) (cilium/cilium#42805, @cilium-renovate[bot])`
- `* chore(deps): update dependency protocolbuffers/protobuf to v33.2 (v1.18) (cilium/cilium#43184, @cilium-renovate[bot])`
- `* chore(deps): update dependency protocolbuffers/protobuf-go to v1.36.11 (v1.18) (cilium/cilium#43315, @cilium-renovate[bot])`
- `* chore(deps): update docker.io/library/busybox:1.37.0 docker digest to d80cd69 (v1.18) (cilium/cilium#43312, @cilium-renovate[bot])`
- `* chore(deps): update docker.io/library/golang:1.24.10 docker digest to 7b13449 (v1.18) (cilium/cilium#42935, @cilium-renovate[bot])`
- `* chore(deps): update docker.io/library/golang:1.24.10 docker digest to 83d7392 (v1.18) (cilium/cilium#42802, @cilium-renovate[bot])`
- `* chore(deps): update docker.io/library/golang:1.24.11 docker digest to e3fb71a (v1.18) (cilium/cilium#43313, @cilium-renovate[bot])`
- `* chore(deps): update gcr.io/distroless/static:nonroot docker digest to 2b7c93f (v1.18) (cilium/cilium#43135, @cilium-renovate[bot])`
- `* chore(deps): update gcr.io/etcd-development/etcd docker tag to v3.6.6 (v1.18) (cilium/cilium#42936, @cilium-renovate[bot])`
- `* chore(deps): update go to v1.24.11 (v1.18) (cilium/cilium#43183, @cilium-renovate[bot])`
- `* chore(deps): update quay.io/cilium/certgen docker tag to v0.3.1 (v1.18) (cilium/cilium#43052, @cilium-renovate[bot])`
- `* [v1.18] proxy: Bump envoy version to v1.34.12 (cilium/cilium#43259, @sayboras)`

## Other changes (35)

- Cilium agent cluster role gains `secrets` `LIST` and `WATCH` permissions
- `CiliumEnvoyConfig` proxy ports restored across agent restarts
- Per-cluster NAT maps included in orphan cleanup
- Redirect policy reconciliation skips recomputation for unchanged backends
- BPF Masq tests for unknown and handled protocols
- Egress-gateway BPF test now defines `ENABLE_MASQUERADE_IPV4`
- BPF MASQ test added for ICMP ECHOs
- Egress-gateway XDP test sets `ENABLE_MASQUERADE_IPV6`
- Host endpoint BPF test coverage in `tc_nodeport_l3_dev.h`
- `.github/workflows/build-images-hotfixes.yaml` workflow removed
- Default connection-disruptivity checks include an IPsec error check
- IPsec end-to-end test waits four minutes before polling for key rotation
- Runner disk cleanup added to the Cluster Mesh upgrade workflow
- Self-changes included in `lint-build-commits` workflow filters
- Conformance clustermesh workflow waits for cert-manager `CRDs`
- More reliable `update-helm-values` command
- GitHub workflows reorganized
- GitHub Action dependencies updated for v1.18
- GitHub Actions dependencies updated for v1.18
- GitHub Action dependencies updated for v1.18
- GitHub Actions dependencies updated for v1.18
- GitHub Actions dependencies updated for v1.18
- GitHub Actions dependencies updated for v1.18
- GitHub Actions dependencies updated for v1.18
- GitHub artifact actions updated for v1.18
- Stable `lvh-images` updated
- Stable `lvh-images` updated
- Documentation warning about multiple VIPs or NodePorts for one backend endpoint
- Host policy emergency-recovery procedure added
- FQDN name-manager selector test now uses the real `ipcache`
- FQDN selector methods return `ipcacheRevision`
- `TestNodesStartupPruning` checkpoint-state polling
- xDS watch cancellations no longer logged as errors
- Secret-sync controller periodic resync for synced Secrets
- v1.18.4 installation image digests updated

---

Summaries are produced by AI, so they can be wrong, and they are provided without warranty.
