A vm-admin in XAPI-based hypervisors (XenServer, XCP-ng) can inject vm-data/* keys into VM.xenstore_data that modify guest behavior across trust boundaries in delegated VM administration environments. The injected keys are written to guest xenstore at /local/domain/<domid>/vm-data/ with read-write permissions for the guest domain (domain.ml:604-624). Guest operating systems and agents treat all data under vm-data/ as trusted hypervisor-provided configuration - there is no mechanism for the guest to distinguish legitimate hypervisor data from vm-admin-injected data. This enables supply chain attacks via installation source redirection, configuration endpoint hijacking, and credential injection.
VM.xenstore_data is a Map(String, String) field writable by vm-admin with zero per-key RBAC. In multi-tenant XAPI deployments, the vm-admin role is delegated to tenant administrators who manage a subset of VMs. The vm-data/ xenstore namespace is designed as a hypervisor-to-guest communication channel.
The trust confusion:
vm-admin writes attacker-controlled configuration: VM.add_to_xenstore_data(vm, "vm-data/install/repo", "evil.example.com")message_forwarding.ml:2092-2099)filtered_xsdata prefix check at domain.ml:164-170/local/domain/<domid>/vm-data/install/repoThe guest has no cryptographic or structural mechanism to verify the provenance of vm-data/* keys. The hypervisor provides no signing, no source attribution, and no access control metadata. From the guest's perspective, all vm-data/ entries are equally trusted.
No trust boundary in xenstore. The vm-data/ namespace is a flat, unauthenticated communication channel. The guest cannot distinguish between keys set by a pool administrator, a delegated vm-admin, or the hypervisor itself.
Missing RBAC protection. VM.xenstore_data has zero map_keys_roles entries. A delegated vm-admin has the same write access to vm-data/ as a pool administrator.
Delegated administration assumption. The XAPI RBAC model assumes that vm-admin is a trusted role for VM management. In multi-tenant environments, vm-admin is a tenant-level role that should not have unrestricted write access to guest configuration channels.
No write-time validation. XAPI accepts any key name and value for vm-data/* keys without format, length, or content validation.
| Scenario | Impact | Pre-conditions | Status |
|---|---|---|---|
| Installation source redirection | Guest installs from attacker-controlled repository | vm-admin, guest OS install | Source-traced |
| Configuration endpoint hijacking | Guest agent connects to attacker-controlled management server | vm-admin, guest agent using vm-data | Modeled |
| Credential injection | Inject SSH keys or credentials via vm-data for guest consumption | vm-admin, guest reads credentials from vm-data | Modeled |
| Cross-tenant poisoning | Delegated admin poisons vm-data on VMs managed by another tenant (via set_xenstore_data) | vm-admin, multi-tenant pool | Source-traced |
| BOC-1 chain | vm-admin uses BOC-1 S3 to inject malicious vm-data across all VMs in the pool | vm-admin, BOC-1 | Source-traced |
vm-data/ configuration into all VMs in the pool, creating a pool-wide supply chain attack.VM.xenstore_data for writes to vm-data/* keys that match known configuration paths (install sources, update repos, management endpoints)vm-data/* changes outside of normal provisioning workflowsdisclosure/vendor-detection-guidance.mdVM.xenstore_data records for unexpected vm-data/* entriesAdd map_keys_roles protection. Restrict sensitive vm-data/* key prefixes (installation sources, configuration endpoints) to _R_POOL_ADMIN.
Add provenance metadata. Include source attribution (session, role, timestamp) for xenstore data so guests can verify the trust level of injected configuration.
Separate tenant namespaces. In multi-tenant environments, partition vm-data/ by tenant so delegated administrators can only write to their own namespace.
Upstream patches exist. They are held privately pending coordinated disclosure.
Disclosure:
domain.ml:164-170 (allowed_xsdata_prefixes), domain.ml:604-624 (vm-data dir created with rwperm), message_forwarding.ml:2092-2099 (zero validation), datamodel_vm.ml:2818-2831 (VM.xenstore_data field definition)disclosure/advisories/xsd-security-advisory.md (XSD-5)research/investigations/vm-xenstore-data.mdDiscovered and reported by Jakob Wolffhechel, Moksha.