Description
In the Linux kernel, the following vulnerability has been resolved:

xen/gntdev: fix error handling in ioctl

When gntdev_ioctl_map_grant_ref() fails to copy the operation result
back to userspace after successfully adding the mapping to the list,
the error path returns -EFAULT without releasing the reference
acquired by gntdev_alloc_map(). The mapping remains in priv->maps
with a refcount of 1, causing a memory leak and a dangling list
entry.

Additionally, gntdev_add_map() may modify map->index to avoid overlap
with existing mappings. Therefore, the index returned to userspace
must be obtained after gntdev_add_map() completes.

Fix this by holding the mutex across gntdev_add_map(), retrieving
the correct index, and copy_to_user(). If copy_to_user() fails,
remove the mapping from the list and release the reference while
still holding the lock.


Fix these issues by properly handling all error cases.
Published: 2026-08-15
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel’s Xen grant device driver, the ioctl used to map a grant reference does not properly free a reference when an error occurs after the mapping has been added to the linked list. The reference allocated by gntdev_alloc_map() remains held and the entry stays in the private map list with a refcount of one, resulting in a memory leak. If copy_to_user() fails, the entry remains dangling. Repeated failures to map a grant can therefore steadily consume kernel memory, eventually exhausting resources and potentially bringing the system to a denial‑of‑service state.

Affected Systems

The flaw affects the Linux kernel within the xen/gntdev subsystem. All kernel releases that contain Xen grant support and predate the commit that adds the missing reference release and correct index handling are vulnerable. The vendor is the Linux kernel community; any system running an unpatched kernel with Xen grant support is impacted.

Risk and Exploitability

CVSS score 5.5 reflects a moderate severity. The EPSS score of <1% indicates a very low but non‑zero likelihood of exploitation, and the vulnerability is not listed in CISA KEV. The likely attack vector is a local user with sufficient privileges to invoke the gntdev_ioctl_map_grant_ref() ioctl, such as a process running as root or a privileged guest. The attacker would trigger the ioctl in a failure path; each failure gradually leaks memory. While this does not allow arbitrary code execution, repeated exploitation could deplete resources and destabilize the host. Because the vulnerability does not require remote code execution or network interaction, the overall risk is moderate and best mitigated by applying the patch.

Generated by OpenCVE AI on August 18, 2026 at 20:27 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the fix for xen/gntdev ioctl error handling.
  • If patching is not immediately possible, monitor kernel memory usage and Xen grant mapping counters; consider restarting the Xen hypervisor or relevant guest services to clear leaked entries.
  • Configure the Xen hypervisor to disable grant device access for non-essential guests to reduce exposure.

Generated by OpenCVE AI on August 18, 2026 at 20:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 16:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-401
CWE-416

Tue, 18 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-772
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Sat, 15 Aug 2026 09:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-401
CWE-416

Sat, 15 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: xen/gntdev: fix error handling in ioctl When gntdev_ioctl_map_grant_ref() fails to copy the operation result back to userspace after successfully adding the mapping to the list, the error path returns -EFAULT without releasing the reference acquired by gntdev_alloc_map(). The mapping remains in priv->maps with a refcount of 1, causing a memory leak and a dangling list entry. Additionally, gntdev_add_map() may modify map->index to avoid overlap with existing mappings. Therefore, the index returned to userspace must be obtained after gntdev_add_map() completes. Fix this by holding the mutex across gntdev_add_map(), retrieving the correct index, and copy_to_user(). If copy_to_user() fails, remove the mapping from the list and release the reference while still holding the lock. Fix these issues by properly handling all error cases.
Title xen/gntdev: fix error handling in ioctl
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:08:56.108Z

Reserved: 2026-08-09T03:40:39.908Z

Link: CVE-2026-72138

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:21:31.337

Modified: 2026-08-17T06:18:13.703

Link: CVE-2026-72138

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-15T00:00:00Z

Links: CVE-2026-72138 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T20:30:17Z

Weaknesses
  • CWE-772

    Missing Release of Resource after Effective Lifetime