A pool-operator can corrupt storage protocol metadata by modifying targetIQN, target, datatype, or LUNid keys in SR.sm_config on iSCSI and HBA storage repositories. These keys are written by the SM driver during SR.create and read back during subsequent operations - but the field remains writable after creation. Modifying LUNid causes VDI operations to target the wrong LUN, enabling cross-SR data corruption. Modifying targetIQN or target causes SR misidentification and connection failures. This is an SR-level variant of the SMC-1 storage protocol injection - same architectural root cause, but at the SR level affecting all VDIs in the repository.
SR.sm_config is a Map(String, String) field described as "SM dependent data" that serves as the primary configuration channel between XAPI and the SMAPIv1 storage driver framework. The field requires pool-operator to write and has zero map_keys_roles entries.
The data flow:
targetIQN, target, datatype, LUNid during SR.create (e.g., BaseISCSI.py:507-513)SR.load() / SR.attach(), the driver reads these keys backpool-operator can modify the keys at any time via SR.set_sm_config or SR.add_to_sm_config| Key | Impact |
|---|---|
targetIQN |
SR targets wrong iSCSI initiator group - connection to wrong storage target |
target |
Changes iSCSI target address - could redirect to attacker-controlled target |
LUNid |
VDI operations target wrong LUN - cross-SR data corruption |
datatype |
SR type misidentification during scans |
Missing immutability enforcement. SR.sm_config keys set by the SM driver during SR.create remain writable via the API after creation. No immutability mechanism exists.
Missing RBAC protection. SR.sm_config has zero map_keys_roles entries. All driver-written keys are writable by pool-operator.
Backend trust assumption. SM drivers assume sm_config values are authoritative and have not been tampered with since creation.
| Driver | Keys | Impact |
|---|---|---|
| BaseISCSI (lvmoiscsi) | targetIQN, target, LUNid |
Target/LUN poisoning, cross-SR corruption |
| HBASR | targetIQN, datatype, LUNid |
HBA type corruption, LUN mismatch |
| Scenario | Impact | Pre-conditions | Status |
|---|---|---|---|
| LUNid redirection | VDI operations target wrong LUN - cross-SR data corruption | pool-operator, iSCSI SR | Source-traced |
| Target IQN manipulation | SR connects to wrong iSCSI target group | pool-operator, iSCSI SR | Source-traced |
| Target address change | SR redirected to different iSCSI target server | pool-operator, iSCSI SR | Source-traced |
| Via BOC-1 chain | vm-admin escalates to pool-operator via BOC-1 S3, then corrupts SR metadata | BOC-1 available | Modeled (chained) |
SR.sm_config for modifications after SR creationtargetIQN, target, LUNid, datatype key changesdisclosure/vendor-detection-guidance.mdsm_config for unexpected values in targetIQN, target, LUNidsm_config values against known-good baselinesEnforce sm_config immutability. Once set by the SM driver during SR.create, driver-written keys should not be modifiable via API. Implement a mechanism to distinguish driver-set keys from user-set keys.
Add map_keys_roles. Protect targetIQN, target, LUNid, datatype at _R_LOCAL_ROOT_ONLY.
Upstream patches exist. They are held privately pending coordinated disclosure.
Disclosure:
vendor/sm/drivers/BaseISCSI.py:507-513 (driver writes keys during create), SR.py (sm_config read path)disclosure/advisories/ssmc-security-advisory.md (SSMC-3)research/investigations/sr-sm-config.mdDiscovered and reported by Jakob Wolffhechel, Moksha.