CVE-2022-50257: xen/gntdev: Prevent leaking grants
Noroxi assessment
Priority: Monitor (action score 22/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.16% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 0991028cd49567d7016d1b224fe0117c35059f86, 0bccddd9b8f03ad57bb738f0d3da8845d4e1e579, 1cb73704cb4778299609634a790a80daba582f7d.
Low priority for now. Upgrade to Linux Linux 0991028cd49567d7016d1b224fe0117c35059f86, 0bccddd9b8f03ad57bb738f0d3da8845d4e1e579, 1cb73704cb4778299609634a790a80daba582f7d or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In the Linux kernel, the following vulnerability has been resolved: xen/gntdev: Prevent leaking grants Prior to this commit, if a grant mapping operation failed partially, some of the entries in the map_ops array would be invalid, whereas all of the entries in the kmap_ops array would be valid. This in turn would cause the following logic in gntdev_map_grant_pages to become invalid: for (i = 0; i < map->count; i++) { if (map->map_ops[i].status == GNTST_okay) { map->unmap_ops[i].handle = map->map_ops[i].handle; if (!use_ptemod) alloced++; } if (use_ptemod) { if (map->kmap_ops[i].status == GNTST_okay) { if (map->map_ops[i].status == GNTST_okay) alloced++; map->kunmap_ops[i].handle = map->kmap_ops[i].handle; } } } ... atomic_add(alloced, &map->live_grants); Assume that use_ptemod is true (i.e., the domain mapping the granted pages is a paravirtualized domain). In the code excerpt above, note that the "alloced" variable is only incremented when both kmap_ops[i].status and map_ops[i].status are set to GNTST_okay (i.e., both mapping operations are successful). However, as also noted above, there are cases where a grant mapping operation fails partially, breaking the assumption of the code excerpt above. The aforementioned causes map->live_grants to be incorrectly set. In some cases, all of the map_ops mappings fail, but all of the kmap_ops mappings succeed, meaning that live_grants may remain zero. This in turn makes it impossible to unmap the successfully grant-mapped pages pointed to by kmap_ops, because unmap_grant_pages has the following snippet of code at its beginning: if (atomic_read(&map->live_grants) == 0) return; /* Nothing to do */ In other cases where only some of the map_ops mappings fail but all kmap_ops mappings succeed, live_grants is made positive, but when the user requests unmapping the grant-mapped pages, __unmap_grant_pages_done will then make map->live_grants negative, because the latter function does not check if all of the pages that were requested to be unmapped were actually unmapped, and the same function unconditionally subtracts "data->count" (i.e., a value that can be greater than map->live_grants) from map->live_grants. The side effects of a negative live_grants value have not been studied. The net effect of all of this is that grant references are leaked in one of the above conditions. In Qubes OS v4.1 (which uses Xen's grant mechanism extensively for X11 GUI isolation), this issue manifests itself with warning messages like the following to be printed out by the Linux kernel in the VM that had granted pages (that contain X11 GUI window data) to dom0: "g.e. 0x1234 still pending", especially after the user rapidly resizes GUI VM windows (causing some grant-mapping operations to partially or completely fail, due to the fact that the VM unshares some of the pages as part of the window resizing, making the pages impossible to grant-map from dom0). The fix for this issue involves counting all successful map_ops and kmap_ops mappings separately, and then adding the sum to live_grants. During unmapping, only the number of successfully unmapped grants is subtracted from live_grants. The code is also modified to check for negative live_grants values after the subtraction and warn the user.
- Published
- Sep 15, 2025
- Updated
- Jun 17, 2026
- EPSS
- 0.1% · 5th percentile
- CWE
- —
Report tools
Action score
22
Monitor
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel4.9.322 and later · before 4.9.332
- linux linux kernel4.14.287 and later · before 4.14.298
- linux linux kernel4.19.251 and later · before 4.19.264
- linux linux kernel5.4.204 and later · before 5.4.223
- linux linux kernel5.10.129 and later · before 5.10.153
- linux linux kernel5.15.51 and later · before 5.15.75
- linux linux kernel5.18.8 and later · before 5.19
- linux linux kernel5.19.1 and later · before 5.19.17
- linux linux kernel6.0 and later · before 6.0.3
- linux linux kernel5.19
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- d4a49d20cd7cdb6bd075cd04c2cd00a7eba907ed, 5.19affected
- 36cd49b071fceca70326d9db786aa15e9fffd677 and later · before b043f2cab100bed3e0a999dcf38cc05b1e4a7e41affected · git
- 2fe26a9a70482bea7827803fdec98050fec68b20 and later · before 49bb053b1ec367b6883030eb2cca696e91435679affected · git
- 73e9e72247b98da65bc32d41a961e820cca5f503 and later · before cb1ccfe7655380f77a58b340072f5f40bc285902affected · git
- ee25841221c17228cbd30262a90f3b03ad80cdf6 and later · before 3d056d81b93a787613eda44aeb21fc14c3392b34affected · git
- 79963021fd718b74bed4cbc98f5f49d3ba6fb48c and later · before 49db6cb81400ba863e1a85e55fcdf1031807c23faffected · git
- 87a54feba68f5e47925c8e49100db9b2a8add761 and later · before 1cb73704cb4778299609634a790a80daba582f7daffected · git
- dbe97cff7dd9f0f75c524afdd55ad46be3d15295 and later · before 0bccddd9b8f03ad57bb738f0d3da8845d4e1e579affected · git
- dbe97cff7dd9f0f75c524afdd55ad46be3d15295 and later · before 273f6a4f71be12e2ec80a4919837d6e4fa933a04affected · git
- dbe97cff7dd9f0f75c524afdd55ad46be3d15295 and later · before 0991028cd49567d7016d1b224fe0117c35059f86affected · git
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | before 6.0.3-1 | 6.0.3-1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-64kb | before 5.3.18-150300.59.221.1 | 5.3.18-150300.59.221.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-default-base | before 5.3.18-150300.59.221.1.150300.18.132.1 | 5.3.18-150300.59.221.1.150300.18.132.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-docs | before 5.3.18-150300.59.221.1 | 5.3.18-150300.59.221.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-obs-build | before 5.3.18-150300.59.221.1 | 5.3.18-150300.59.221.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-preempt | before 5.3.18-150300.59.221.1 | 5.3.18-150300.59.221.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-source | before 5.3.18-150300.59.221.1 | 5.3.18-150300.59.221.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-syms | before 5.3.18-150300.59.221.1 | 5.3.18-150300.59.221.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-64kb | before 5.14.21-150400.24.179.1 | 5.14.21-150400.24.179.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-docs | before 5.14.21-150400.24.179.1 | 5.14.21-150400.24.179.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-obs-build | before 5.14.21-150400.24.179.1 | 5.14.21-150400.24.179.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-source | before 5.14.21-150400.24.179.1 | 5.14.21-150400.24.179.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-syms | before 5.14.21-150400.24.179.1 | 5.14.21-150400.24.179.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | kernel-64kb | before 5.14.21-150500.55.124.1 | 5.14.21-150500.55.124.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | kernel-docs | before 5.14.21-150500.55.124.1 | 5.14.21-150500.55.124.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | kernel-obs-build | before 5.14.21-150500.55.124.1 | 5.14.21-150500.55.124.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | kernel-syms | before 5.14.21-150500.55.124.1 | 5.14.21-150500.55.124.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kernel-default | before 4.12.14-122.275.1 | 4.12.14-122.275.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_73 | before 1-8.3.1 | 1-8.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-default | before 5.3.18-150300.59.221.1 | 5.3.18-150300.59.221.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_62 | before 1-150300.7.3.1 | 1-150300.7.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_45 | before 1-150400.9.3.1 | 1-150400.9.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_31 | before 1-150500.11.3.1 | 1-150500.11.3.1 |
| SUSE:Linux Enterprise Micro 5.1 | kernel-rt | before 5.3.18-150300.223.1 | 5.3.18-150300.223.1 |
+15
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
Published before and after this one in the same product
- ← EarlierCVE-2022-50254Sep 15, 2025 · media: ov8865: Fix an error handling path in ov8865_probe()22Monitor
- ← EarlierCVE-2022-50256Sep 15, 2025 · drm/meson: remove drm bridges at aggregate driver unbind time31Monitor
- Later →CVE-2022-50260Sep 15, 2025 · drm/msm: Make .remove and .shutdown HW shutdown consistent22Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 0991028cd49567d7016d1b224fe0117c35059f86 | Vendor (CNA) |
| Linux Linux | 0bccddd9b8f03ad57bb738f0d3da8845d4e1e579 | Vendor (CNA) |
| Linux Linux | 1cb73704cb4778299609634a790a80daba582f7d | Vendor (CNA) |
| Linux Linux | 273f6a4f71be12e2ec80a4919837d6e4fa933a04 | Vendor (CNA) |
| Linux Linux | 3d056d81b93a787613eda44aeb21fc14c3392b34 | Vendor (CNA) |
| Linux Linux | 4.14.298 | Vendor (CNA) |
| Linux Linux | 4.19.264 | Vendor (CNA) |
| Linux Linux | 4.9.332 | Vendor (CNA) |
| Linux Linux | 49bb053b1ec367b6883030eb2cca696e91435679 | Vendor (CNA) |
| Linux Linux | 49db6cb81400ba863e1a85e55fcdf1031807c23f | Vendor (CNA) |
| Linux Linux | 5.10.153 | Vendor (CNA) |
| Linux Linux | 5.15.75 | Vendor (CNA) |
| Linux Linux | 5.19 | Vendor (CNA) |
| Linux Linux | 5.4.223 | Vendor (CNA) |
| Linux Linux | b043f2cab100bed3e0a999dcf38cc05b1e4a7e41 | Vendor (CNA) |
| Linux Linux | cb1ccfe7655380f77a58b340072f5f40bc285902 | Vendor (CNA) |
| debian:linux | 6.0.3-1 · Debian:12 | Package registry (OSV) |
| suse:kernel-64kb | 5.14.21-150500.55.124.1 · SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | Package registry (OSV) |
| suse:kernel-default | 4.12.14-122.275.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package registry (OSV) |
| suse:kernel-default-base | 5.14.21-150500.55.124.1.150500.6.59.1 · SUSE:Linux Enterprise Micro 5.5 | Package registry (OSV) |
| suse:kernel-docs | 5.14.21-150500.55.124.1 · SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP5_Update_31 | 1-150500.11.3.1 · SUSE:Linux Enterprise Live Patching 15 SP5 | Package registry (OSV) |
| suse:kernel-obs-build | 5.14.21-150500.55.124.1 · SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | Package registry (OSV) |
| suse:kernel-rt | 5.3.18-150300.223.1 · SUSE:Linux Enterprise Micro 5.1 | Package registry (OSV) |
| suse:kernel-source | 4.12.14-122.275.1 · SUSE:Linux Enterprise Server 12 SP5-LTSS | Package registry (OSV) |
| suse:kernel-source-rt | 5.3.18-150300.223.1 · SUSE:Linux Enterprise Micro 5.1 | Package registry (OSV) |
| suse:kernel-syms | 4.12.14-122.275.1 · SUSE:Linux Enterprise Server 12 SP5-LTSS | Package registry (OSV) |
| suse:kernel-zfcpdump | 5.14.21-150500.55.124.1 · SUSE:Linux Enterprise Server 15 SP5-LTSS | Package registry (OSV) |
| suse:kgraft-patch-SLE12-SP5_Update_73 | 1-8.3.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
—
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (8 more)Show less
- git.kernel.org/stable/c/0bccddd9b8f03ad57bb738f0d3da8845d4e1e579
- git.kernel.org/stable/c/1cb73704cb4778299609634a790a80daba582f7d
- git.kernel.org/stable/c/273f6a4f71be12e2ec80a4919837d6e4fa933a04
- git.kernel.org/stable/c/3d056d81b93a787613eda44aeb21fc14c3392b34
- git.kernel.org/stable/c/49bb053b1ec367b6883030eb2cca696e91435679
- git.kernel.org/stable/c/49db6cb81400ba863e1a85e55fcdf1031807c23f
- git.kernel.org/stable/c/b043f2cab100bed3e0a999dcf38cc05b1e4a7e41
- git.kernel.org/stable/c/cb1ccfe7655380f77a58b340072f5f40bc285902
Vendor advisories and official records. Exploit/PoC links are deliberately left out.