drm/panfrost: Fix GEM handle creation ref-counting
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.163, 5.15.87, 6.0.19, 6.1.5
- CVEs
- CVE-2022-50417
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 03:46 UTC · Revision 1
Source evidence
drm/panfrost: Fix GEM handle creation ref-counting
core-osv · Original sourcePublished 18 Sept 2025, 16:04 UTC
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.
osv:CVE-2022-50417
Kernel
Fixed versions: 5.10.163, 5.15.87, 6.0.19, 6.1.5
Complete source record
{
"id": "c7f31c23e1fe6bc89aad1b0059f3900597332b83345fcc3c50754ac8a7bca4ed",
"url": "https://osv.dev/vulnerability/CVE-2022-50417",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "drm/panfrost: Fix GEM handle creation ref-counting",
"summary": "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.",
"evidence": "osv:CVE-2022-50417",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.163",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.87",
"evidence": "/affected/1/ranges"
},
{
"value": "6.0.19",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.5",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2022-50417",
"aliases": [
"CVE-2022-50417"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "f3ba91228e8e917e5bd6c4b72bfe846933d17370"
},
{
"fixed": "0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c"
},
{
"fixed": "4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a"
},
{
"fixed": "3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2"
},
{
"fixed": "ba3d2c2380e7129b525a787489c0b7e819a3b898"
},
{
"fixed": "4217c6ac817451d5116687f3cc6286220dc43d49"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50417.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.2.0"
},
{
"fixed": "5.10.163"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.87"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.0.19"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.1.0"
},
{
"fixed": "6.1.5"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50417.json"
}
}
],
"modified": "2026-10-28T02:30:25.718921426Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/0b70f6ea4d4f2b4d4b291d86ab76b4d07394932c",
"https://git.kernel.org/stable/c/3f9feffa8a5ab08b4e298a27b1aa7204a7d42ca2",
"https://git.kernel.org/stable/c/4217c6ac817451d5116687f3cc6286220dc43d49",
"https://git.kernel.org/stable/c/4f1105ee72d8c7c35d90e3491b31b2d9d6b7e33a",
"https://git.kernel.org/stable/c/ba3d2c2380e7129b525a787489c0b7e819a3b898",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50417.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50417",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50417.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50417",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 492260,
"published_at": "2025-09-18T16:04:00.512+00:00"
}