You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Low] NetworkPolicyName keeps only 20 bits of hash, so two WorkerPools can map to the same NetworkPolicy #2934
resources.NetworkPolicyName truncates the WorkerPool name to 30 characters and appends the first 5 hex characters of its SHA-256 (20 bits). The controller applies the policy with client.ForceOwnership, so a second WorkerPool in the same namespace whose name collides takes over the first pool's NetworkPolicy and rewrites its pod selector.
Two names that share their first 30 characters only need a 20-bit collision, which takes about a million SHA-256 attempts.
Impact
Low: it needs permission to create WorkerPools in the victim pool's namespace. That is already a highly privileged capability (#2084), and NetworkPolicies are namespace-scoped. Accidental collisions are also possible with long, similar pool names. Either way, the result is that the victim pool's workers lose router-only ingress isolation.
Suggested fix
Use at least 10 hex characters (40 bits) of the hash, or derive the name from the WorkerPool UID. Before applying, refuse to take over a NetworkPolicy whose ate.dev/worker-pool label or owner reference names a different pool.
Activity