A vm-admin in XAPI-based hypervisors (XenServer, XCP-ng) can cause MAC address collisions by setting the mac_seed key in VM.other_config to a value copied from another VM. The MAC generation algorithm in xapi_vif_helpers.ml:212-232 uses this seed deterministically - two VMs with the same mac_seed generate identical MAC addresses for the same device IDs. Pool-level duplicate detection exists at xapi_pool.ml:3425-3456 but only runs during pool join and import operations, not during direct add_to_other_config calls. The resulting MAC collisions cause network connectivity failures, ARP table corruption, and traffic misdirection.
VM.other_config is a Map(String, String) field writable by vm-admin. The mac_seed key controls deterministic MAC address generation for VIFs. The key has partial RBAC protection via map_keys_roles for three keys (pci, folder, XenCenter.CustomFields.*), but mac_seed is not among them.
The MAC generation algorithm:
xapi_vif_helpers.ml:212-232 reads mac_seed from VM.other_configchain (dev * 2) hash seed where dev is the VIF device indexfe:ff:ff:xx:xx:xx rangemac_seed produce identical MACs for the same device indicesAttack path:
vm-admin reads the mac_seed from VM-A: VM.get_other_config(vm_a)["mac_seed"]VM.add_to_other_config(vm_b, "mac_seed", "<vm_a_seed>")Mitigating factors:
xapi_pool.ml:3425-3456) but only during pool join/importxapi_vm_clone.ml:274-292)add_to_other_config bypasses both mitigationsMissing RBAC protection. VM.other_config has map_keys_roles entries for pci, folder, and XenCenter.CustomFields.* only. The mac_seed key is writable by vm-admin without restriction.
Incomplete duplicate detection. Pool-level MAC seed validation runs during pool join and import but not during direct other_config key writes. The API path bypasses the safety check.
No write-time validation. No format validation is performed when mac_seed is set. Any string is accepted, including seeds copied from other VMs.
| Scenario | Impact | Pre-conditions | Status |
|---|---|---|---|
| Targeted MAC collision | Clone VM-A's mac_seed to VM-B, causing identical MACs and traffic misdirection | vm-admin, two VMs on same bridge | Source-traced |
| ARP table poisoning | MAC collision corrupts bridge ARP tables, redirecting traffic | vm-admin | Modeled |
| DHCP lease conflict | Duplicate MACs receive conflicting DHCP leases | vm-admin, DHCP network | Modeled |
| BOC-1 chain | vm-admin uses BOC-1 S3 to bulk-set mac_seed across all VMs | vm-admin, BOC-1 | Source-traced |
mac_seed on all VMs in the pool, causing widespread MAC collisions and network disruption.VM.other_config for writes to the mac_seed keymac_seed values across VMs in the pooldisclosure/vendor-detection-guidance.mdVM.other_config records for duplicate mac_seed valuesvm-admin delegated access to trusted administrators onlyExtend duplicate detection to API writes. Run pool-level mac_seed validation on every add_to_other_config and set_other_config call, not just during pool join/import.
Add map_keys_roles protection. Restrict mac_seed to _R_POOL_ADMIN in the VM field definition in datamodel.ml.
Validate format on write. Enforce UUID format for mac_seed values to prevent arbitrary strings.
Upstream patches exist. They are held privately pending coordinated disclosure.
Disclosure:
xapi_vif_helpers.ml:212-232 (MAC generation from mac_seed), xapi_pool.ml:3425-3456 (pool-level duplicate detection, import/join only), xapi_vm_clone.ml:274-292 (clone replaces mac_seed), datamodel.ml (VM.other_config field definition)disclosure/advisories/voc-security-advisory.md (VOC-4)research/investigations/vm-other-config.mdDiscovered and reported by Jakob Wolffhechel, Moksha.