A vm-admin in XAPI-based hypervisors (XenServer, XCP-ng) can inject forged SCSI INQUIRY data into VDI.xenstore_data, replacing the SM-generated SCSI device identity and serial number values in the XAPI database. The scsi/0x12/0x83 (device ID) and scsi/0x12/0x80 (serial number) keys are normally generated by SM drivers via scsiutil.py:335-353 during VDI attach. By writing forged values to the database field, an attacker poisons the disk identity metadata visible to downstream consumers. Forged SCSI data propagates through snapshot and clone operations (xapi_vdi.ml:861-862), potentially causing disk misidentification in backup, disaster recovery, and inventory systems.
SM drivers generate synthetic SCSI INQUIRY pages during VDI attach. These values serve as disk identity metadata:
scsi/0x12/0x80 - SCSI page 0x80: unit serial numberscsi/0x12/0x83 - SCSI page 0x83: device identification (NAA, vendor-specific)scsi/0x12/default - default INQUIRY responseThese values are generated by scsiutil.update_XS_SCSIdata() at scsiutil.py:335-353 and flow to guest xenstore sm-data/ through the SM runtime path. The XAPI database field VDI.xenstore_data stores a separate copy that is not consulted during the active attach path.
However, the database copy is consumed by:
xenstore_data to new VDI recordsA vm-admin can forge these values:
VDI.add_to_xenstore_data(vdi, "scsi/0x12/0x83", "<forged-device-id>")
VDI.add_to_xenstore_data(vdi, "scsi/0x12/0x80", "<forged-serial>")
No key validation. The field accepts any key, including SCSI identity keys that are SM-internal metadata. There is no whitelist restricting which keys a user can set.
No provenance tracking. There is no distinction between SCSI data written by SM drivers and SCSI data written by API users. Both are stored in the same field with identical structure.
Missing RBAC protection. Zero map_keys_roles entries. A vm-admin has full write access to storage identity metadata.
Propagation without verification. Snapshot, clone, and pool join operations copy xenstore_data without re-validating the SCSI identity values against the SM driver output.
| Scenario | Impact | Pre-conditions | Status |
|---|---|---|---|
| SCSI identity forgery | Forged device ID and serial number in XAPI database | vm-admin, API client | Source-traced |
| Backup system confusion | Backup tool misidentifies disk, leading to incorrect backup associations | vm-admin, backup system reading VDI xenstore_data | Modeled |
| Inventory poisoning | Asset tracking system records forged SCSI identities | vm-admin, CMDB reading VDI records | Modeled |
| Propagation via snapshot | Forged SCSI data copies to all snapshot/clone descendants | vm-admin, snapshot trigger | Source-traced |
VDI.xenstore_data SCSI keys against SM driver output for the same VDIscsi/0x12/* keys that change outside of normal SM operations (VDI attach/create)disclosure/vendor-detection-guidance.mdVDI.xenstore_data records for unexpected scsi/0x12/* valuesvm-admin delegated access to trusted administratorsRestrict write access. Change the field write role to _R_POOL_ADMIN or _R_LOCAL_ROOT_ONLY.
Add key validation. Reject writes to SM-internal keys (scsi/*, vdi-uuid, storage-type, vdi-type) from non-SM sessions.
Tag provenance. Distinguish SM-generated vs. user-written entries in the database so consumers can verify the source.
Upstream patches exist. They are held privately pending coordinated disclosure.
Disclosure:
datamodel.ml:6352-6369 (field definition), scsiutil.py:335-353 (SM-generated SCSI identity data), xapi_vdi.ml:861-862 (snapshot/clone copies xenstore_data), xapi_pool.ml:1215 (pool join copies xenstore_data)disclosure/advisories/vxd-security-advisory.md (VXD-2)research/investigations/vdi-xenstore-data.mdDiscovered and reported by Jakob Wolffhechel, Moksha.