drm: Don't unref the same fb many times by mistake due to deadlock handling
Summary
| CVE | CVE-2023-52486 |
|---|---|
| State | PUBLISHED |
| Assigner | Linux |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2024-03-11 18:15:16 UTC |
| Updated | 2026-08-04 10:18:30 UTC |
| Description | In the Linux kernel, the following vulnerability has been resolved: drm: Don't unref the same fb many times by mistake due to deadlock handling If we get a deadlock after the fb lookup in drm_mode_page_flip_ioctl() we proceed to unref the fb and then retry the whole thing from the top. But we forget to reset the fb pointer back to NULL, and so if we then get another error during the retry, before the fb lookup, we proceed the unref the same fb again without having gotten another reference. The end result is that the fb will (eventually) end up being freed while it's still in use. Reset fb to NULL once we've unreffed it to avoid doing it again until we've done another fb lookup. This turned out to be pretty easy to hit on a DG2 when doing async flips (and CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y). The first symptom I saw that drm_closefb() simply got stuck in a busy loop while walking the framebuffer list. Fortunately I was able to convince it to oops instead, and from there it was easier to track down the culprit. |
Risk And Classification
Primary CVSS: v3.1 5.5 MEDIUM from [email protected]
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Problem Types: CWE-667
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 5.5 | MEDIUM | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| 3.1 | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | Secondary | 7.8 | HIGH | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | CNA | DECLARED | 7.8 | HIGH | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
LocalAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Operating System | Linux | Linux Kernel | All | All | All | All |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c 376e21a9e4c2c63ee5d8d3aa74be5082c3882229 git | Not specified |
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c 9dd334a8245011ace45e53298175c7b659edb3e7 git | Not specified |
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c f55261469be87c55df13db76dc945f6bcd825105 git | Not specified |
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c b4af63da9d94986c529d74499fdfe44289acd551 git | Not specified |
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0 git | Not specified |
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c d7afdf360f4ac142832b098b4de974e867cc063c git | Not specified |
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c bfd0feb1b109cb63b87fdcd00122603787c75a1a git | Not specified |
| CNA | Linux | Linux | affected 29dc0d1de18239cf3ef8bab578b8321ed340d81c cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c git | Not specified |
| CNA | Linux | Linux | affected 4.12 | Not specified |
| CNA | Linux | Linux | unaffected 4.12 semver | Not specified |
| CNA | Linux | Linux | unaffected 4.19.307 4.19.* semver | Not specified |
| CNA | Linux | Linux | unaffected 5.4.269 5.4.* semver | Not specified |
| CNA | Linux | Linux | unaffected 5.10.210 5.10.* semver | Not specified |
| CNA | Linux | Linux | unaffected 5.15.149 5.15.* semver | Not specified |
| CNA | Linux | Linux | unaffected 6.1.76 6.1.* semver | Not specified |
| CNA | Linux | Linux | unaffected 6.6.15 6.6.* semver | Not specified |
| CNA | Linux | Linux | unaffected 6.7.3 6.7.* semver | Not specified |
| CNA | Linux | Linux | unaffected 6.8 * original_commit_for_fix | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| git.kernel.org/stable/c/376e21a9e4c2c63ee5d8d3aa74be5082c3882229 | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| lists.debian.org/debian-lts-announce/2024/06/msg00017.html | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | Mailing List |
| git.kernel.org/stable/c/cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| git.kernel.org/stable/c/d7afdf360f4ac142832b098b4de974e867cc063c | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| git.kernel.org/stable/c/bfd0feb1b109cb63b87fdcd00122603787c75a1a | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| git.kernel.org/stable/c/f55261469be87c55df13db76dc945f6bcd825105 | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| git.kernel.org/stable/c/b4af63da9d94986c529d74499fdfe44289acd551 | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| git.kernel.org/stable/c/9dd334a8245011ace45e53298175c7b659edb3e7 | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| git.kernel.org/stable/c/62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0 | af854a3a-2127-422b-91ae-364da2661108 | git.kernel.org | Patch |
| lists.debian.org/debian-lts-announce/2024/06/msg00020.html | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | Mailing List |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.