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

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-02-29T15:52:06.888Z
- Modified: 2026-08-05T09:10:12.791Z
- Weaknesses: CWE-667
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before 376e21a9e4c2c63ee5d8d3aa74be5082c3882229; from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before 9dd334a8245011ace45e53298175c7b659edb3e7; from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before f55261469be87c55df13db76dc945f6bcd825105; from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before b4af63da9d94986c529d74499fdfe44289acd551; from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e0; from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before d7afdf360f4ac142832b098b4de974e867cc063c; from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before bfd0feb1b109cb63b87fdcd00122603787c75a1a; from 29dc0d1de18239cf3ef8bab578b8321ed340d81c before cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c; 4.12 (not affected: before 4.12; from 4.19.307 up to 4.19.*; from 5.4.269 up to 5.4.*; from 5.10.210 up to 5.10.*; from 5.15.149 up to 5.15.*; from 6.1.76 up to 6.1.*; from 6.6.15 up to 6.6.*; from 6.7.3 up to 6.7.*; from 6.8 up to *)
- linux linux_kernel: before 4.19.307; from 4.20 before 5.4.269; from 5.5 before 5.10.210; from 5.11 before 5.15.149; from 5.16 before 6.1.76; from 6.2 before 6.6.15; from 6.7 before 6.7.3

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <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> (patch)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html> (mailing-list)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html> (mailing-list)

## Sources

- CVE List: [CVE-2023-52486](https://www.cve.org/CVERecord?id=CVE-2023-52486), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2023-52486](https://nvd.nist.gov/vuln/detail/CVE-2023-52486), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2023-52486 · Whole record: https://cve.day/CVE-2023-52486.json · Rebuilt by cve.day 2026-11-25T22:58:33.301Z
