xds/rbac: avoid nil deref on unset CidrRange prefix_len (#9250)
`newRemoteIPMatcher` and `newLocalIPMatcher` build the CIDR string from `cidrRange.PrefixLen.Value`, dereferencing the `PrefixLen` wrapper field directly. An RBAC policy from the control plane whose `destination_ip`/`direct_remote_ip`/`source_ip`/`remote_ip` CidrRange sets `address_prefix` but leaves `prefix_len` unset makes `PrefixLen == nil`, so `NewChainEngine` panics while the resource is parsed. Nothing recovers on the xdsclient decode path, so the process goes down. RELEASE NOTES: - xds/rbac: Fix a potential panic when parsing a CIDR range that does not contain a prefix length.
N
Naveed committed
4fdb83e4a48b3a29b8d9b592fc20362b80da9cfb
Parent: 89d4d61
Committed by GitHub <noreply@github.com>
on 7/30/2026, 4:38:28 AM