CVE-2021-47200
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
10/04/2024
Last modified:
07/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
drm/prime: Fix use after free in mmap with drm_gem_ttm_mmap<br />
<br />
drm_gem_ttm_mmap() drops a reference to the gem object on success. If<br />
the gem object&#39;s refcount == 1 on entry to drm_gem_prime_mmap(), that<br />
drop will free the gem object, and the subsequent drm_gem_object_get()<br />
will be a UAF. Fix by grabbing a reference before calling the mmap<br />
helper.<br />
<br />
This issue was forseen when the reference dropping was adding in<br />
commit 9786b65bc61ac ("drm/ttm: fix mmap refcounting"):<br />
"For that to work properly the drm_gem_object_get() call in<br />
drm_gem_ttm_mmap() must be moved so it happens before calling<br />
obj->funcs->mmap(), otherwise the gem refcount would go down<br />
to zero."
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.15.5 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



