CVE-2022-50417
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-18

Last updated on: 2025-12-12

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: drm/panfrost: Fix GEM handle creation ref-counting panfrost_gem_create_with_handle() previously returned a BO but with the only reference being from the handle, which user space could in theory guess and release, causing a use-after-free. Additionally if the call to panfrost_gem_mapping_get() in panfrost_ioctl_create_bo() failed then a(nother) reference on the BO was dropped. The _create_with_handle() is a problematic pattern, so ditch it and instead create the handle in panfrost_ioctl_create_bo(). If the call to panfrost_gem_mapping_get() fails then this means that user space has indeed gone behind our back and freed the handle. In which case just return an error code.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-18
Last Modified
2025-12-12
Generated
2026-05-27
AI Q&A
2025-09-18
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 6 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 5.2 (inc) to 5.10.163 (exc)
linux linux_kernel From 5.11 (inc) to 5.15.87 (exc)
linux linux_kernel From 5.16 (inc) to 6.0.19 (exc)
linux linux_kernel From 6.1 (inc) to 6.1.5 (exc)
linux linux_kernel 6.2
linux linux_kernel 6.2
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is in the Linux kernel's Panfrost DRM driver. It involves improper reference counting when creating GEM handles for buffer objects (BOs). Specifically, panfrost_gem_create_with_handle() returned a BO with only a single reference from the handle, which user space could guess and release, leading to a use-after-free condition. Additionally, if panfrost_gem_mapping_get() failed during BO creation, an extra reference was dropped incorrectly. The fix involved removing the problematic _create_with_handle() pattern and creating the handle in panfrost_ioctl_create_bo(), returning an error if user space had already freed the handle.


How can this vulnerability impact me? :

This vulnerability can lead to a use-after-free condition in the kernel, which may cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or escalate privileges by exploiting the freed memory.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability has been fixed in the Linux kernel by modifying the panfrost driver to properly handle GEM handle creation and reference counting. To mitigate this vulnerability, you should update your Linux kernel to a version that includes this fix.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart