istiod crash (DoS) when a ServiceEntry claims an IP-addressed waypoint's address
Description
A ServiceEntry that claims an IP-addressed waypoint's address crashes istiod mesh-wide (ambient mode) and it crash-loops until the ServiceEntry is removed.
Details
In ambient mode istiod resolves an IP-addressed waypoint's owning service by (network, IP), with no namespace in the key. The EDS shim uses krt.FetchOne over the ServicesByAddress index in RegisterEdsShim (pilot/pkg/serviceregistry/ambient/sidecar_interop.go); when two services share the address it panics ("FetchOne found for more than 1 item") on a krt goroutine and takes istiod down. A ServiceEntry with spec.addresses set to the waypoint ClusterIP, in any namespace, creates the collision, and it persists so istiod crash-loops until the ServiceEntry is deleted.
Patches
Fixes are available in 1.29.9, 1.30.6 and 1.31.2 Workarounds: delete the colliding ServiceEntry; restrict who may create ServiceEntry resources; or avoid IP-addressed waypoints (a waypoint reports a hostname by default, which is used instead).
Proof of concept
- Deploy an IP-addressed waypoint (annotate the Gateway networking.istio.io/address-type: IPAddress so its status shows only the ClusterIP, e.g. 10.223.9.31).
- Bind a service with istio.io/use-waypoint and istio.io/ingress-use-waypoint: "true".
- Create a ServiceEntry in any namespace with spec.addresses: ["10.223.9.31"].
- istiod panics and crash-loops within seconds; deleting the ServiceEntry recovers it.
Impact
Denial of service against the istiod control plane. A tenant with ServiceEntry-create in their own namespace can crash istiod for the whole mesh by targeting a waypoint address in another namespace, crossing a namespace boundary. Config distribution and certificate rotation stall mesh-wide until the ServiceEntry is removed. Ambient mode with an IP-addressed waypoint only.