# CVE-2022-50417: drm/panfrost: Fix GEM handle creation ref-counting

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-09-18T16:04:00.512Z
- **Modified:** 2026-08-05T08:58:42.522Z

## Who should check

- Anyone running Linux \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< ba3d2c2380e7129b525a787489c0b7e819a3b898; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 4217c6ac817451d5116687f3cc6286220dc43d49
- Anyone running Linux 5.2

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

## Affected and fixed versions

- Linux: \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< ba3d2c2380e7129b525a787489c0b7e819a3b898; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 4217c6ac817451d5116687f3cc6286220dc43d49 (cvelist)
- Linux: 5.2 (cvelist)

## Mitigation

- Upgrade Linux to 4217c6ac817451d5116687f3cc6286220dc43d49 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50417. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50417.md
Affected: Linux >= f3ba91228e8e917e5bd6c4b72bfe846933d17370, < 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c; >= f3ba91228e8e917e5bd6c4b72bfe846933d17370, < 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a; >= f3ba91228e8e917e5bd6c4b72bfe846933d17370, < 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2; >= f3ba91228e8e917e5bd6c4b…
Fixed in: Linux 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c, Linux 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a, Linux 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2, Linux 4217c6ac817451d5116687f3cc6286220dc43d49

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50417 being exploited?

There is no confirmed exploitation: CVE-2022-50417 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50417?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50417?

Linux \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< ba3d2c2380e7129b525a787489c0b7e819a3b898; \>= f3ba91228e8e917e5bd6c4b72bfe846933d17370, \< 4217c6ac817451d5116687f3cc6286220dc43d49; Linux 5.2.

### Is there a fix for CVE-2022-50417?

Yes. Fixed in Linux 0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c, Linux 4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a, Linux 3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2, Linux 4217c6ac817451d5116687f3cc6286220dc43d49. Upgrade Linux to 4217c6ac817451d5116687f3cc6286220dc43d49 or later.

### How do I check if I'm affected by CVE-2022-50417?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c>
- patch: <https://git.kernel.org/stable/c/4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a>
- patch: <https://git.kernel.org/stable/c/3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2>
- patch: <https://git.kernel.org/stable/c/ba3d2c2380e7129b525a787489c0b7e819a3b898>
- patch: <https://git.kernel.org/stable/c/4217c6ac817451d5116687f3cc6286220dc43d49>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50417>

HTML: <https://flawdb.com/CVE-2022-50417> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50417>
