Skip to content
Noroxi
NVD / CVE Program· CNA Linux

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.

MediumCVSS 5.5 · v3.1—No exploit Fix available
Published
Sep 15, 2025
Updated
Jun 17, 2026
EPSS
0.1% · 5th percentile
CWE
—

Report tools

JSON

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.

Follow CVE-2022-50257

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits instantly.

Your free account also gets you

Running WordPress? Scan your site free with WP Lens

  • Stack alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Running WordPress? Scan your site free with WP Lens

Is your version affected? Check it

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 help

Affected 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.

VendorProduct
linuxlinux 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.

EcosystemPackageAffected rangeFix
Debian:12linuxbefore 6.0.3-16.0.3-1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-64kbbefore 5.3.18-150300.59.221.15.3.18-150300.59.221.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-default-basebefore 5.3.18-150300.59.221.1.150300.18.132.15.3.18-150300.59.221.1.150300.18.132.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-docsbefore 5.3.18-150300.59.221.15.3.18-150300.59.221.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-obs-buildbefore 5.3.18-150300.59.221.15.3.18-150300.59.221.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-preemptbefore 5.3.18-150300.59.221.15.3.18-150300.59.221.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-sourcebefore 5.3.18-150300.59.221.15.3.18-150300.59.221.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-symsbefore 5.3.18-150300.59.221.15.3.18-150300.59.221.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-64kbbefore 5.14.21-150400.24.179.15.14.21-150400.24.179.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-docsbefore 5.14.21-150400.24.179.15.14.21-150400.24.179.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-obs-buildbefore 5.14.21-150400.24.179.15.14.21-150400.24.179.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-sourcebefore 5.14.21-150400.24.179.15.14.21-150400.24.179.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-symsbefore 5.14.21-150400.24.179.15.14.21-150400.24.179.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSkernel-64kbbefore 5.14.21-150500.55.124.15.14.21-150500.55.124.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSkernel-docsbefore 5.14.21-150500.55.124.15.14.21-150500.55.124.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSkernel-obs-buildbefore 5.14.21-150500.55.124.15.14.21-150500.55.124.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSkernel-symsbefore 5.14.21-150500.55.124.15.14.21-150500.55.124.1
SUSE:Linux Enterprise Live Patching 12 SP5kernel-defaultbefore 4.12.14-122.275.14.12.14-122.275.1
SUSE:Linux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_73before 1-8.3.11-8.3.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-defaultbefore 5.3.18-150300.59.221.15.3.18-150300.59.221.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_62before 1-150300.7.3.11-150300.7.3.1
SUSE:Linux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_45before 1-150400.9.3.11-150400.9.3.1
SUSE:Linux Enterprise Live Patching 15 SP5kernel-livepatch-SLE15-SP5_Update_31before 1-150500.11.3.11-150500.11.3.1
SUSE:Linux Enterprise Micro 5.1kernel-rtbefore 5.3.18-150300.223.15.3.18-150300.223.1

+15

Other highest-scoring records for the same primary product.

  • CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV
    90Now
  • 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 KEV
    89Now
  • CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV
    85Now

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 time
    31Monitor
  • Later →CVE-2022-50260Sep 15, 2025 · drm/msm: Make .remove and .shutdown HW shutdown consistent
    22Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
Linux Linux0991028cd49567d7016d1b224fe0117c35059f86Vendor (CNA)
Linux Linux0bccddd9b8f03ad57bb738f0d3da8845d4e1e579Vendor (CNA)
Linux Linux1cb73704cb4778299609634a790a80daba582f7dVendor (CNA)
Linux Linux273f6a4f71be12e2ec80a4919837d6e4fa933a04Vendor (CNA)
Linux Linux3d056d81b93a787613eda44aeb21fc14c3392b34Vendor (CNA)
Linux Linux4.14.298Vendor (CNA)
Linux Linux4.19.264Vendor (CNA)
Linux Linux4.9.332Vendor (CNA)
Linux Linux49bb053b1ec367b6883030eb2cca696e91435679Vendor (CNA)
Linux Linux49db6cb81400ba863e1a85e55fcdf1031807c23fVendor (CNA)
Linux Linux5.10.153Vendor (CNA)
Linux Linux5.15.75Vendor (CNA)
Linux Linux5.19Vendor (CNA)
Linux Linux5.4.223Vendor (CNA)
Linux Linuxb043f2cab100bed3e0a999dcf38cc05b1e4a7e41Vendor (CNA)
Linux Linuxcb1ccfe7655380f77a58b340072f5f40bc285902Vendor (CNA)
debian:linux6.0.3-1 · Debian:12Package registry (OSV)
suse:kernel-64kb5.14.21-150500.55.124.1 · SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSPackage registry (OSV)
suse:kernel-default4.12.14-122.275.1 · SUSE:Linux Enterprise Live Patching 12 SP5Package registry (OSV)
suse:kernel-default-base5.14.21-150500.55.124.1.150500.6.59.1 · SUSE:Linux Enterprise Micro 5.5Package registry (OSV)
suse:kernel-docs5.14.21-150500.55.124.1 · SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSPackage registry (OSV)
suse:kernel-livepatch-SLE15-SP5_Update_311-150500.11.3.1 · SUSE:Linux Enterprise Live Patching 15 SP5Package registry (OSV)
suse:kernel-obs-build5.14.21-150500.55.124.1 · SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOSPackage registry (OSV)
suse:kernel-rt5.3.18-150300.223.1 · SUSE:Linux Enterprise Micro 5.1Package registry (OSV)
suse:kernel-source4.12.14-122.275.1 · SUSE:Linux Enterprise Server 12 SP5-LTSSPackage registry (OSV)
suse:kernel-source-rt5.3.18-150300.223.1 · SUSE:Linux Enterprise Micro 5.1Package registry (OSV)
suse:kernel-syms4.12.14-122.275.1 · SUSE:Linux Enterprise Server 12 SP5-LTSSPackage registry (OSV)
suse:kernel-zfcpdump5.14.21-150500.55.124.1 · SUSE:Linux Enterprise Server 15 SP5-LTSSPackage registry (OSV)
suse:kgraft-patch-SLE12-SP5_Update_731-8.3.1 · SUSE:Linux Enterprise Live Patching 12 SP5Package 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.

Finders, 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

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records