CVE-2026-138861

xen/gntdev: prevent private mappings from becoming writable

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

xen/gntdev: prevent private mappings from becoming writable

gntdev_mmap() rejects writable private (non-shared) mappings of foreign
grant pages, because a private writable mapping takes the COW path on
pages that have no proper struct-page backing. However, VM_MAYWRITE is
left set, so userspace can map the grant read-only and then upgrade the
mapping to writable with mprotect(), hitting the same COW path the
check was written to prevent.

Clear VM_MAYWRITE for private mappings, as i915 does for its read-only
objects and as fixed in drm/vc4 (CVE-2026-68445) and drm/panthor
(CVE-2024-53071) and ptp: vmclock (commit
a5edadbae57e2298a56cf7a4e774a027905a331f).

Analysis

AI-generated

Technical impact

The defect in the gntdev component allows an attacker to create a private mapping of a foreign grant page as read‑only and subsequently upgrade it to read‑write using mprotect. Because the original mapping leaves the VM_MAYWRITE flag set, the kernel incorrectly allows a copy‑on‑write path that writes through the grant page, giving the attacker write access to a victim’s memory in the kernel and enabling arbitrary code execution or privilege escalation.

Affected Systems

The flaw resides in all Linux kernel releases that include the Xen guest device driver (gntdev) prior to the patch referenced by commit 021d9c95a79b55cd21ae085a8e919b251a329b3d. No specific version numbers are listed in the advisory, so all kernels that use this driver without the patch are potentially vulnerable.

Risk and Exploitability

No EPSS or KEV data are provided, and the CVSS score is not listed, but the nature of the bug – a kernel write that could bypass host controls – suggests a high severity risk. An attacker with the ability to map a remote grant page from a guest VM can likely exploit the flaw without external network interaction, so the local privilege escalation path is the most plausible attack vector.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch from commit 021d9c95a79b55cd21ae085a8e919b251a329b3d to the Xen gntdev driver and rebuild the kernel.
  • Validate that the VM_MAYWRITE flag is cleared for private mappings by auditing the driver or using kernel debug logs.
  • In environments where patching cannot be performed immediately, limit guest domains to read‑only grant mappings or configure SELinux/AppArmor to prevent mprotect on grant pages.

Generated by OpenCVE AI on November 30, 2026 at 17:07 UTC.

Tracking

Sign in to view the affected projects.

Exploits

Explore public exploit intelligence with OpenCVE Pro.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-269
CWE-284
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: xen/gntdev: prevent private mappings from becoming writable gntdev_mmap() rejects writable private (non-shared) mappings of foreign grant pages, because a private writable mapping takes the COW path on pages that have no proper struct-page backing. However, VM_MAYWRITE is left set, so userspace can map the grant read-only and then upgrade the mapping to writable with mprotect(), hitting the same COW path the check was written to prevent. Clear VM_MAYWRITE for private mappings, as i915 does for its read-only objects and as fixed in drm/vc4 (CVE-2026-68445) and drm/panthor (CVE-2024-53071) and ptp: vmclock (commit a5edadbae57e2298a56cf7a4e774a027905a331f).
Title xen/gntdev: prevent private mappings from becoming writable
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-269

    Improper Privilege Management

  • CWE-284

    Improper Access Control

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:25 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM