GitHub advisory · Go
Istio: istiod crash (DoS) via an endpointless DNS ServiceEntry attached to a waypoint
Description
In ambient mode, a DNS or DNS_ROUND_ROBIN ServiceEntry that is enrolled in a waypoint but resolves to no endpoints makes istiod panic with a nil pointer dereference while generating the waypoint's inbound clusters. Any user who can create a ServiceEntry in a namespace that uses a waypoint can trigger it with namespace-scoped permissions alone, and istiod crash-loops until the ServiceEntry is removed
For STRICT_DNS and LOGICAL_DNS clusters with no locality endpoints, buildCluster deliberately returns nil and records the DNSNoEndpointClusters metric (pilot/pkg/networking/core/cluster_builder.go). A DNS ServiceEntry maps to STRICT_DNS and DNS_ROUND_ROBIN to LOGICAL_DNS, so either builds to nil when it has no endpoints — for example when its workloadSelector matches no workloads. STATIC ServiceEntries are not affected (they map to EDS clusters).
The waypoint inbound path did not handle that nil: buildWaypointInboundVIPCluster (pilot/pkg/networking/core/cluster_waypoint.go) assigns the buildCluster result and immediately passes it to getOrCreateIstioMetadata(localCluster.cluster), dereferencing it. All append sites in buildWaypointInboundVIP, including the ambient east-west gateway path, go through this function. The equivalent outbound path already guards against the nil.
No recover() protects CDS generation, so the panic takes istiod down, and it crash-loops while the offending ServiceEntry exists.
The fix returns early when the built cluster is nil and filters nil clusters out of the inbound-VIP result. Skipping the cluster is safe for the waypoint listeners: waypoint RDS is generated with ValidateClusters: false, so the omitted cluster causes no NACK, and traffic to the (endpointless) service gets a 503 (HTTP) or a closed connection (TCP), matching outbound sidecar behavior.
Fixes are available in 1.32.1, 1.31.5 and 1.30.9.
Restrict who may create or edit ServiceEntry resources in namespaces enrolled in a waypoint…
Manual fix · Go
go get istio.io/istio@v0.0.0-20261203004151-e22a6713da06Sources