CVE-2023-52486

drm: Don't unref the same fb many times by mistake due to deadlock handling

MEDIUM
5.5
CVSS Score
Published: February 29, 2024 at 03:52 PM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.19.3074.12 ≤ v < 4.19.3074.12 ≤ v < 5.10.2104.12 ≤ v < 5.15.1494.12 ≤ v < 5.4.2694.12 ≤ v < 6.1.764.12 ≤ v < 6.6.154.12 ≤ v < 6.7.34.12 ≤ v < 6.84.20 ≤ v < 5.4.2695.11 ≤ v < 5.15.1495.16 ≤ v < 6.1.765.5 ≤ v < 5.10.2106.2 ≤ v < 6.6.156.7 ≤ v < 6.7.329dc0d1de18239cf3ef8bab578b8321ed340d81c4.12
Vendor states this is fixed in 376e21a9e4c2c63ee5d8d3aa74be5082c3882229 (fixed)
Vendor states this is fixed in 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0 (fixed)
Vendor states this is fixed in 9dd334a8245011ace45e53298175c7b659edb3e7 (fixed)
Vendor states this is fixed in b4af63da9d94986c529d74499fdfe44289acd551 (fixed)
Vendor states this is fixed in bfd0feb1b109cb63b87fdcd00122603787c75a1a (fixed)
Vendor states this is fixed in cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c (fixed)
Vendor states this is fixed in d7afdf360f4ac142832b098b4de974e867cc063c (fixed)
Vendor states this is fixed in f55261469be87c55df13db76dc945f6bcd825105 (fixed)
Vendor states this is fixed in 4.12 (unaffected)
Vendor states this is fixed in 4.19.307 (unaffected)
Vendor states this is fixed in 5.10.210 (unaffected)
Vendor states this is fixed in 5.15.149 (unaffected)
Vendor states this is fixed in 5.4.269 (unaffected)
Vendor states this is fixed in 6.1.76 (unaffected)
Vendor states this is fixed in 6.6.15 (unaffected)
Vendor states this is fixed in 6.7.3 (unaffected)
Vendor states this is fixed in 6.8 (unaffected)

References (10)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/376e21a9e4c2c63ee5d8d3aa74be5082c3882229
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9dd334a8245011ace45e53298175c7b659edb3e7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b4af63da9d94986c529d74499fdfe44289acd551
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/bfd0feb1b109cb63b87fdcd00122603787c75a1a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d7afdf360f4ac142832b098b4de974e867cc063c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f55261469be87c55df13db76dc945f6bcd825105

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-667

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card