A pool-operator in XAPI-based hypervisors (XenServer, XCP-ng) can inject arbitrary DNS search domains into the host's resolver configuration by writing to PIF.other_config:domain. The nm.ml:655-659 function reads this key, splits it on commas, and passes the resulting domain list directly to xcp-networkd for inclusion in the host's DNS search path. No validation is performed on domain names. Injected search domains cause unqualified hostname lookups to resolve through attacker-controlled domains, enabling DNS hijack of internal service discovery.
PIF.other_config is a Map(String, String) field writable by pool-operator with zero map_keys_roles entries. The domain key controls the DNS search domain list for the host.
The code path:
pool-operator calls PIF.add_to_other_config(pif, "domain", "evil.com,attacker.net")bring_pif_up, nm.ml:655-659 reads the domain keyxcp-networkd, which writes them to /etc/resolv.confldap resolves to ldap.evil.com; ntp resolves to ntp.evil.comPIF.other_config has the highest merge precedence in the other_config merge chain (nm.ml:112-120). DNS search domains set at the PIF level override pool-wide and network-level settings.
Missing input validation. The nm.ml:655-659 function accepts any comma-separated string as DNS search domains. No validation against RFC 1035 domain name format is performed.
Missing RBAC protection. PIF.other_config has zero map_keys_roles entries. The domain key is writable by any pool-operator.
Scope change. DNS search domain injection on the host affects all services that perform unqualified DNS lookups - including storage (iSCSI by name), authentication (LDAP/AD), time synchronization (NTP), and management tools. The impact crosses the hypervisor trust boundary into infrastructure services.
No logging of DNS configuration changes. No security-level log event is generated when DNS search domains are modified.
| Scenario | Impact | Pre-conditions | Status |
|---|---|---|---|
| Internal service hijack | Unqualified ldap, smtp, ntp lookups resolve to attacker domains |
pool-operator | Source-traced |
| Credential interception | LDAP/AD authentication to attacker-controlled server, credential capture | pool-operator, AD-joined environment | Modeled |
| Storage redirection | iSCSI targets by hostname resolve to attacker IP, storage operations redirected | pool-operator, hostname-based iSCSI | Modeled |
| BOC-1 chain | vm-admin uses BOC-1 S3 to self-grant pool-operator, then injects DNS search domains | vm-admin, BOC-1 | Source-traced |
PIF.other_config for changes to the domain key/etc/resolv.conf for unexpected search domain entriesdisclosure/vendor-detection-guidance.mdPIF.other_config entries for unexpected domain values/etc/resolv.conf contains only expected search domainsValidate DNS search domains. Enforce RFC 1035 domain name format validation on the domain key at write time.
Add map_keys_roles. Protect the domain key at _R_POOL_ADMIN in the PIF field definition.
Use FQDN for internal services. Reduce reliance on search domains for service discovery.
Upstream patches exist. They are held privately pending coordinated disclosure.
Disclosure:
nm.ml:655-659 (domain key read, comma split, no validation), nm.ml:112-120 (merge precedence), datamodel.ml:2784-2788 (PIF.other_config field definition)disclosure/advisories/poc-security-advisory.md (POC-5)research/investigations/pif-other-config.mdDiscovered and reported by Jakob Wolffhechel, Moksha.