MOKSHA-2026-0055: set_other_config RBAC Bypass for PCI Passthrough Key

Advisory IDMOKSHA-2026-0055
Semantic IDVOC-5
Published2026-04-24
CVSS 3.15.3 Medium
CVSS 3.1 VectorAV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
CVSS 4.07.1 High
CVSS 4.0 VectorAV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:L/SA:N
XAPI ObjectVM
XAPI Fieldother_config:pci (via set_other_config bypass)
Entry Rolevm-admin
ResearcherJakob Wolffhechel, Moksha

Affected Products

VendorProductVersions
Citrix / Cloud Software GroupXenServer / Citrix Hypervisorall versions (shared XAPI codebase)
VatesXCP-ng8.3.0

Summary

A vm-admin in XAPI-based hypervisors (XenServer, XCP-ng) can bypass the pool-admin-restricted pci key in VM.other_config by using the VM.set_other_config method instead of VM.add_to_other_config. The pci key is protected by map_keys_roles at _R_POOL_ADMIN for per-key operations, but set_other_config replaces the entire map atomically without checking per-key RBAC. This allows a vm-admin to assign PCI devices to a VM, granting the guest direct DMA access to host memory regions - an operation that should require pool-admin privileges. The set_other_config bypass is acknowledged in datamodel.ml:614-624 as a known architectural limitation.

Vulnerability Description

VM.other_config implements partial per-key RBAC via map_keys_roles: the pci key requires _R_POOL_ADMIN, while folder and XenCenter.CustomFields.* require _R_VM_OP. The add_to_other_config and remove_from_other_config methods enforce these per-key checks. However, set_other_config replaces the entire map in a single operation and bypasses all per-key RBAC.

The bypass:

  1. vm-admin reads the current VM.other_config map: VM.get_other_config(vm)
  2. Modifies the pci key in the local copy (normally restricted to pool-admin)
  3. Calls VM.set_other_config(vm, modified_map) - this succeeds because the method-level RBAC only requires vm-admin
  4. The pci key now contains the attacker's value

The pci key is consumed at xapi_xenops.ml:499,520 to determine PCI device passthrough assignments. PCI passthrough gives the guest direct hardware access including DMA, bypassing the IOMMU in some configurations.

The bypass is documented in XAPI's own source code at datamodel.ml:614-624:

(* set_other_config replaces the entire map and bypasses map_keys_roles *)

Root Causes

  1. Architectural RBAC bypass. set_other_config replaces the entire map without enforcing map_keys_roles. This is a known design limitation shared by all XAPI objects with map_keys_roles entries.

  2. Security-critical key in user-writable map. The pci key controls hardware passthrough - a security-critical operation that grants DMA access. Storing it in other_config rather than a dedicated field creates a mixed-privilege map where RBAC granularity is insufficient.

  3. Insufficient method-level RBAC. set_other_config inherits the class default role (_R_VM_ADMIN) rather than requiring the highest privilege level of any protected key in the map.

Affected Systems

Directly Affected

Indirectly Affected

Exploitation Scenarios

Scenario Impact Pre-conditions Status
PCI passthrough assignment vm-admin assigns PCI devices via set_other_config, gaining DMA access vm-admin, VM not running Source-traced
IOMMU bypass PCI device with DMA access reads host or other VM memory vm-admin, misconfigured IOMMU Modeled
RBAC audit evasion The set_other_config path does not log a per-key RBAC failure vm-admin Source-traced

Chaining Analysis

Detection

Remediation

Short-Term Mitigations

Long-Term Fix

Fix set_other_config RBAC enforcement. Enforce map_keys_roles checks on set_other_config by comparing the incoming map against the current map and verifying per-key RBAC for any changed keys.

Move PCI configuration to a dedicated field. The pci key controls hardware passthrough and should be a first-class, RBAC-protected field rather than a key in other_config.

Upstream patches exist. They are held privately pending coordinated disclosure.

Disclosure

Disclosure:

References

Credits

Discovered and reported by Jakob Wolffhechel, Moksha.

Jakob Wolffhechel · Moksha · Copenhagen
jakob@wolffhechel.dk · +45 3170 7337
Published 2026-04-24 08:00 CEST · cna.moksha.dk · shittrix.moksha.dk