CVE-2026-72138

xen/gntdev: fix error handling in ioctl

State
Published
Severity
Not scored
Published
Aug 15, 2026
Updated
Aug 17, 2026
Reserved
Aug 9, 2026

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 52dc40ef0cfee6ae89b7524967e73f0ba37906d7Affected
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 1dd9cb98fe228e017fff9efb33862ff38c741b65Affected
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 6df926130aee6cab9b5d2e5b7862e49ccac348dcAffected
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 311011f8cc206c5af2877b03e3f627ee1b8fe024Affected
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 18a693733f7ad004e1ab0466693121ca70cd95ddAffected
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 16d3ccdabb8dee9be2cdcd6d3f9a125572ec0454Affected
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 6883269a323609f68f6faa903f8f8ff3d191cec8Affected
  • 68b025c813c2eb41ff25628e3d4952d5185eb1a4 to before 45ca1afe2fd14c04e37227e79d3f8455831d8408Affected
LinuxLinux
  • 2.6.39Affected
  • before 2.6.39Not affected
  • 5.10.261 through 5.10.*Not affected
  • 5.15.212 through 5.15.*Not affected
  • 6.1.178 through 6.1.*Not affected
  • 6.6.145 through 6.6.*Not affected
  • 6.12.97 through 6.12.*Not affected
  • 6.18.40 through 6.18.*Not affected
  • 7.1.5 through 7.1.*Not affected
  • 7.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.