CVE-2022-50471
BaseFortify
Publication date: 2025-10-04
Last updated on: 2025-10-06
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| xen | xen | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in the Linux kernel's xen/gntdev driver occurs when a user process sets up a gntdev mapping composed of two grant mappings shared by another Xen domain, then unmaps these pages one by one and exits. The driver did not correctly handle this scenario, leading to kernel log errors and, if Xen is built with CONFIG_DEBUG, a general protection fault in the affected paravirtualized Xen domain. The root cause is improper handling of split VMAs (virtual memory areas) and reuse of gntdev mappings, which could cause bad page mappings and faults during munmap() calls.
How can this vulnerability impact me? :
This vulnerability can cause kernel errors and crashes (general protection faults) in paravirtualized Xen domains when unmapping shared grant pages. This can lead to instability or denial of service in affected virtual machines running on Xen hypervisors with the vulnerable gntdev driver, especially if Xen is built with debugging enabled.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring the kernel logs (dmesg) for specific error messages related to gntdev mappings and munmap calls. Look for messages such as 'BUG: Bad page map in process', 'page dumped because: bad pte', and Xen hypervisor messages like '(XEN) Attempt to implicitly unmap d0's grant PTE'. You can use the command 'dmesg | grep -i gntdev' or 'dmesg | grep -E "BUG: Bad page map|Attempt to implicitly unmap"' to find these logs.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves updating the Linux kernel to a version that includes the fix for this vulnerability, which properly handles VMA splitting in the gntdev driver. Until then, avoid using gntdev mappings in paravirtualized Xen domains in the problematic manner described (e.g., avoid munmap() calls on split grant mappings and repeated mmap() with MAP_FIXED over the same address range).