# CVE-2023-52486: drm: Don't unref the same fb many times by mistake due to deadlock handling

> 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.26% (percentile 11, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-02-29T15:52:06.888Z
- **Modified:** 2026-08-05T09:10:12.791Z

## Who should check

- Anyone running Linux \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 376e21a9e4c2c63ee5d8d3aa74be5082c3882229; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 9dd334a8245011ace45e53298175c7b659edb3e7; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< f55261469be87c55df13db76dc945f6bcd825105; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< b4af63da9d94986c529d74499fdfe44289acd551; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< d7afdf360f4ac142832b098b4de974e867cc063c; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< bfd0feb1b109cb63b87fdcd00122603787c75a1a; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c
- Anyone running Linux 4.12

## 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 and fixed versions

- Linux: \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 376e21a9e4c2c63ee5d8d3aa74be5082c3882229; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 9dd334a8245011ace45e53298175c7b659edb3e7; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< f55261469be87c55df13db76dc945f6bcd825105; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< b4af63da9d94986c529d74499fdfe44289acd551; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< d7afdf360f4ac142832b098b4de974e867cc063c; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< bfd0feb1b109cb63b87fdcd00122603787c75a1a; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c (cvelist)
- Linux: 4.12 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52486.md
Affected: Linux >= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, < 376e21a9e4c2c63ee5d8d3aa74be5082c3882229; >= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, < 9dd334a8245011ace45e53298175c7b659edb3e7; >= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, < f55261469be87c55df13db76dc945f6bcd825105; >= 29dc0d1de18239cf3ef8bab…
Fixed in: Linux 376e21a9e4c2c63ee5d8d3aa74be5082c3882229, Linux 9dd334a8245011ace45e53298175c7b659edb3e7, Linux 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0

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-2023-52486 being exploited?

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

### How serious is CVE-2023-52486?

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

### Which versions are affected by CVE-2023-52486?

Linux \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 376e21a9e4c2c63ee5d8d3aa74be5082c3882229; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 9dd334a8245011ace45e53298175c7b659edb3e7; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< f55261469be87c55df13db76dc945f6bcd825105; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< b4af63da9d94986c529d74499fdfe44289acd551; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< d7afdf360f4ac142832b098b4de974e867cc063c; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< bfd0feb1b109cb63b87fdcd00122603787c75a1a; \>= 29dc0d1de18239cf3ef8bab578b8321ed340d81c, \< cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c; Linux 4.12.

### Is there a fix for CVE-2023-52486?

Yes. Fixed in Linux 376e21a9e4c2c63ee5d8d3aa74be5082c3882229, Linux 9dd334a8245011ace45e53298175c7b659edb3e7, Linux 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52486?

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/376e21a9e4c2c63ee5d8d3aa74be5082c3882229>
- patch: <https://git.kernel.org/stable/c/9dd334a8245011ace45e53298175c7b659edb3e7>
- patch: <https://git.kernel.org/stable/c/f55261469be87c55df13db76dc945f6bcd825105>
- patch: <https://git.kernel.org/stable/c/b4af63da9d94986c529d74499fdfe44289acd551>
- patch: <https://git.kernel.org/stable/c/62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0>
- patch: <https://git.kernel.org/stable/c/d7afdf360f4ac142832b098b4de974e867cc063c>
- patch: <https://git.kernel.org/stable/c/bfd0feb1b109cb63b87fdcd00122603787c75a1a>
- patch: <https://git.kernel.org/stable/c/cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>

## 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-2023-52486>

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