// For flags

CVE-2023-46835

x86/AMD: mismatch in IOMMU quarantine page table levels

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

The current setup of the quarantine page tables assumes that the
quarantine domain (dom_io) has been initialized with an address width
of DEFAULT_DOMAIN_ADDRESS_WIDTH (48) and hence 4 page table levels.

However dom_io being a PV domain gets the AMD-Vi IOMMU page tables
levels based on the maximum (hot pluggable) RAM address, and hence on
systems with no RAM above the 512GB mark only 3 page-table levels are
configured in the IOMMU.

On systems without RAM above the 512GB boundary
amd_iommu_quarantine_init() will setup page tables for the scratch
page with 4 levels, while the IOMMU will be configured to use 3 levels
only, resulting in the last page table directory (PDE) effectively
becoming a page table entry (PTE), and hence a device in quarantine
mode gaining write access to the page destined to be a PDE.

Due to this page table level mismatch, the sink page the device gets
read/write access to is no longer cleared between device assignment,
possibly leading to data leaks.

La configuración actual de las tablas de páginas de cuarentena supone que el dominio de cuarentena (dom_io) se ha inicializado con un ancho de dirección de DEFAULT_DOMAIN_ADDRESS_WIDTH (48) y, por lo tanto, 4 niveles de tabla de páginas. Sin embargo, al ser dom_io un dominio PV, los niveles de tablas de páginas IOMMU AMD-Vi se basan en la dirección RAM máxima (conectable en caliente) y, por lo tanto, en sistemas sin RAM por encima de la marca de 512 GB, solo se configuran 3 niveles de tablas de páginas en IOMMU. En sistemas sin RAM por encima del límite de 512 GB, amd_iommu_quarantine_init() configurará tablas de páginas para la página temporal con 4 niveles, mientras que IOMMU se configurará para usar solo 3 niveles, lo que dará como resultado que el último directorio de la tabla de páginas (PDE) se convierta efectivamente en una entrada de la tabla de páginas (PTE) y, por lo tanto, un dispositivo en modo de cuarentena obtiene acceso de escritura a la página destinada a ser una PDE. Debido a esta discrepancia en el nivel de la tabla de páginas, la página receptora a la que el dispositivo tiene acceso de lectura/escritura ya no se borra entre las asignaciones de dispositivos, lo que posiblemente provoque fugas de datos.

*Credits: This issue was discovered by Roger Pau Monné of XenServer.
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2023-10-27 CVE Reserved
  • 2024-01-05 CVE Published
  • 2024-01-10 EPSS Updated
  • 2024-09-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
References (1)
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Xen
Search vendor "Xen"
Xen
Search vendor "Xen" for product "Xen"
*-
Affected