In the Linux kernel, the following vulnerability has been resolved:
xen/gntdev: fix error handling in ioctl
When gntdevioctlmapgrantref() 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 gntdevallocmap(). The mapping remains in priv->maps with a refcount of 1, causing a memory leak and a dangling list entry.
Additionally, gntdevaddmap() may modify map->index to avoid overlap with existing mappings. Therefore, the index returned to userspace must be obtained after gntdevaddmap() completes.
Fix this by holding the mutex across gntdevaddmap(), retrieving the correct index, and copytouser(). If copytouser() 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.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72138.json"
}