A vm-admin in XAPI-based hypervisors (XenServer, XCP-ng) can spoof the task_id and related_to keys in VBD.other_config to evade leaked VBD detection. These keys are used internally by XAPI to track which task created a VBD and which control domain it belongs to. By injecting false values, an attacker can make malicious VBDs (including those created via BOC-1) appear as legitimate control-domain VBDs, causing the cleanup subsystem to skip them. VBD.other_config has zero map_keys_roles entries - no key is protected at the RBAC level.
VBD.other_config is a Map(String, String) field writable by vm-admin with zero per-key RBAC protection. The task_id and related_to keys are XAPI-internal metadata used for VBD lifecycle tracking.
The code path:
task_id to the creating task's OpaqueRef and related_to to the associated VM or control domain referencevm-admin sets these keys on a malicious VBD: VBD.add_to_other_config(vbd, "task_id", "<valid_task_ref>") and VBD.add_to_other_config(vbd, "related_to", "<control_domain_ref>")No validation occurs. XAPI does not verify that the task_id corresponds to an actual task or that related_to points to a real control domain.
Missing RBAC protection. VBD.other_config has zero map_keys_roles entries in datamodel.ml. The task_id and related_to keys are writable by vm-admin via add_to_other_config.
No reference validation. XAPI does not verify that the task_id value corresponds to a real task or that related_to points to an existing control domain. OpaqueRef strings are accepted without validation.
Security-relevant metadata in user-writable field. Internal tracking data (task_id, related_to) is stored in a field accessible to delegated administrators rather than in a protected internal field.
set_other_config RBAC bypass. The set_other_config method replaces the entire map atomically and bypasses map_keys_roles per-key checks entirely.
| Scenario | Impact | Pre-conditions | Status |
|---|---|---|---|
| Leak detection evasion | Spoofed task_id/related_to causes cleanup to skip malicious VBD | vm-admin | Source-traced |
| BOC-1 persistence | After exploiting BOC-1 (backend-local mount), spoof tracking keys to avoid detection | vm-admin, BOC-1 VBD | Source-traced |
| Audit trail spoofing | Forge task_id to attribute VBD creation to a different task or administrator | vm-admin | Source-traced |
task_id and related_to to make the VBD appear as a legitimate control-domain attachment. The VBD leak detector skips it, allowing the backdoor to persist undetected.VBD.other_config for writes to task_id and related_to keys from non-internal sessionstask_id values against the actual task databaserelated_to values pointing to control domains when the VBD was not created by an internal operationdisclosure/vendor-detection-guidance.mdVBD.other_config records for unexpected task_id and related_to entriesvm-admin delegated access to trusted administrators onlyAdd map_keys_roles protection. Restrict task_id and related_to to _R_POOL_ADMIN in the VBD field definition in datamodel.ml.
Validate references. When task_id or related_to is set, verify that the OpaqueRef corresponds to a real object in the database.
Upstream patches exist. They are held privately pending coordinated disclosure.
Disclosure:
datamodel.ml:6815-6818 (VBD.other_config field definition, zero map_keys_roles)disclosure/advisories/boc-1-security-advisory.md (V4)research/investigations/vbd-other-config.mdDiscovered and reported by Jakob Wolffhechel, Moksha.