A hostname allowlist can compare every pair of labels correctly and still accept the wrong host. The missing check is whether both names ended at the same place.
The Puppet/OpenVox hostname-authorization advisory, published on 3 November, is a useful example. Its practical lesson reaches beyond hostnames: pairwise agreement over a truncated sequence is not equality.
Where the comparison loses information
The vulnerable matcher lowercases a hostname, splits it on dots and reverses the labels. That is convenient for domain-suffix rules:
target.lab.local → ["local" "lab" "target"]
evil.target.lab.local → ["local" "lab" "target" "evil"]For non-regex rules, it then uses this Clojure expression:
(every? (fn [[a b]] (= a b))
(map vector value match-split-domain))With multiple input sequences, map stops at the shortest. The comparison sees three equal pairs; the extra "evil" never reaches every?. Reversing which name is shorter does not repair that missing length check.
The advisory describes a client certificate for the extended name being accepted for another node's catalog. The attacker still needs a CA-signed certificate carrying a colliding name. Non-default autosigning makes obtaining one easier; turning autosign off is not the same as correcting the matcher.
Exact identity and wildcard scope need separate rules
The upstream correction and regression tests separate wildcard entries from exact-name entries. Exact-domain matching compares the complete normalized label sequences. Wildcards deliberately compare a suffix.
The added tests specify these outcomes for the corrected matcher:
| Rule | Candidate name | Matches? |
|---|---|---|
foo.test |
foo.test |
Yes |
foo.test |
child.foo.test |
No |
foo.test |
test |
No |
*.domain.com |
domain.com |
Yes |
*.domain.com |
test.domain.com |
Yes |
*.domain.com |
sub.test.domain.com |
Yes |
*.domain.com |
com |
No |
That wildcard includes the apex and multiple subdomain levels. It is not the familiar TLS-certificate interpretation of “exactly one extra label.” Fixing the accidental suffix match does not mean removing the intentional one.
What to carry into an authorization review
For an exact identity, compare the entire representation after the intended normalization. For a suffix policy, make the label boundary and permitted depth explicit. Test an equal name, an extra label, a missing label and a different label—not just a completely unrelated hostname.
For this project, the advisory lists OpenVox Server and OpenVoxDB 8.18.0 and 9.2.0 as patched releases on their respective branches. Do not replace an exact rule with a wildcard merely to restore access after upgrading; first establish which identities should actually share that permission.
My preference is to keep exact and subtree authorization visibly distinct in both configuration and tests. A shared helper is fine; silently sharing the policy is where things get interesting.
For an ACL that intentionally authorizes a subtree, would you include the apex and arbitrary depth as this matcher does, or require separate apex and depth controls? Which real access requirement would decide it?
