A pool-operator in XAPI-based hypervisors (XenServer, XCP-ng) can corrupt storage provisioning behavior by modifying or removing the allocation key in SR.sm_config after SR creation. The key controls whether LVHD SRs use thin or thick provisioning. Changing allocation from thin to thick (or removing the key) causes new VDIs to pre-allocate their full logical volume size instead of thin-provisioning. On overcommitted SRs, this causes immediate storage exhaustion with SR_BACKEND_FAILURE_44 errors. Restoring the key does not shrink already-inflated LVs - recovery requires storage migration (export, destroy, recreate, reimport). The sm_config field has zero map_keys_roles entries, and the allocation key is intended to be set once by the SM driver during SR.create but remains writable through the API.
SR.sm_config is a Map(String, String) field writable by pool-operator. The allocation key is set by LVHDSR.create() during SR creation and controls the provisioning strategy for all subsequent VDI operations.
The code path:
SR.create, the SM driver sets sm_config:allocation = "thin" (or "thick")LVHDSR.__init__() reads PROVISIONING_TYPES = ["thin", "thick"] (LVHDSR.py:94)pool-operator calls SR.remove_from_sm_config(sr, "allocation") or SR.add_to_sm_config(sr, "allocation", "thick")allocation valuethin to thick: VDI LVs are created at full logical size instead of minimum allocationLive-tested results:
allocation key caused the next VDI to pre-allocate the full LV sizeSR_BACKEND_FAILURE_44allocation=thin did not shrink the already-inflated LVsMissing field immutability. SR.sm_config is qualifier:RW despite containing keys that should be immutable after driver initialization. The allocation key is set by the SM driver during SR.create but is modifiable by any pool-operator at any time.
Missing RBAC protection. SR.sm_config has zero map_keys_roles entries. Every key is writable by pool-operator.
No write-time validation. XAPI does not validate allocation against PROVISIONING_TYPES. Any string is accepted, including empty string and non-existent values.
Irreversible damage. LVs inflated under thick mode do not shrink when the key is restored. The damage requires storage migration to remediate.
| Scenario | Impact | Pre-conditions | Status |
|---|---|---|---|
| Thin-to-thick corruption | VDIs pre-allocate full size, exhausting overcommitted SR | pool-operator, thin-provisioned LVHD SR | Confirmed (live-tested, 18/18 PASS) |
| Allocation key removal | Driver falls back to default behavior, disrupting provisioning | pool-operator, LVHD SR | Confirmed (live-tested) |
| Silent storage exhaustion | SR fills during normal VDI operations after corruption | pool-operator, overcommitted thin SR | Confirmed (live-tested) |
| BOC-1 chain | vm-admin uses BOC-1 S3 to self-grant pool-operator, then corrupts allocation | vm-admin, BOC-1 + LVHD SR | Source-traced |
SR.sm_config for modifications after SR creation - any change to allocation is suspiciousSR.sm_config:allocation against expected provisioning type for each SRSR_BACKEND_FAILURE_44 errors (space exhaustion) on thin-provisioned SRsdisclosure/vendor-detection-guidance.mdSR.sm_config records: verify allocation matches the intended provisioning typeSR.sm_config to detect driftEnforce sm_config immutability. Once set by the SM driver during SR.create, driver-written keys should not be modifiable via the API. Implement a StaticRO equivalent for driver-set keys in sm_config.
Add map_keys_roles. Protect all driver-written keys (allocation, use_vhd, targetIQN, etc.) at _R_LOCAL_ROOT_ONLY in datamodel.ml.
Validate allocation. At write time, validate the value against PROVISIONING_TYPES (["thin", "thick"]). Reject any other value.
Upstream patches exist. They are held privately pending coordinated disclosure.
Disclosure:
datamodel.ml:4949-4953 (SR.sm_config field definition), LVHDSR.py:94 (PROVISIONING_TYPES), LVHDSR.py:205-206 (allocation read during init)disclosure/advisories/ssmc-security-advisory.md (SSMC-1)research/investigations/sr-sm-config.mdresearch/smc-1/poc/evidence/smc-1-s8-iscsi-thin-20260214.log, smc-1-s8-iscsi-thick-20260214.logDiscovered and reported by Jakob Wolffhechel, Moksha.