
Cloud Vulnerability DB
A community-led vulnerabilities database
A vulnerability was discovered in the Linux kernel's Xen grant device (xen/gntdev) implementation that could lead to grant reference leaks. The vulnerability, identified as CVE-2022-50257, was related to partial failures in grant mapping operations where some entries in the map_ops array would be invalid while all entries in the kmap_ops array remained valid (NVD).
The vulnerability occurs when a grant mapping operation fails partially, causing a mismatch between map_ops and kmap_ops arrays. In cases where use_ptemod is true (for paravirtualized domains), the 'alloced' variable is only incremented when both kmap_ops[i].status and map_ops[i].status are GNTST_okay. This leads to incorrect setting of map->live_grants, making it impossible to unmap successfully grant-mapped pages in some scenarios. The issue manifests when all map_ops mappings fail but kmap_ops mappings succeed, resulting in live_grants remaining zero (NVD).
The vulnerability primarily affects systems using Xen's grant mechanism, particularly impacting Qubes OS v4.1 which uses this mechanism extensively for X11 GUI isolation. The issue manifests with warning messages like 'g.e. 0x1234 still pending' being printed by the Linux kernel in VMs that had granted pages containing X11 GUI window data to dom0. This occurs especially after rapid GUI window resizing operations (NVD).
The fix involves modifying the code to count all successful map_ops and kmap_ops mappings separately, then adding their sum to live_grants. During unmapping, only the number of successfully unmapped grants is subtracted from live_grants. The fix also includes additional checks for negative live_grants values and warning mechanisms (NVD).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."