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

Summary

CVECVE-2023-52486
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-03-11 18:15:16 UTC
Updated2026-08-04 10:18:30 UTC
DescriptionIn 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


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary5.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
3.1416baaa9-dc9f-4396-8d5f-8c081fb06d67Secondary7.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
3.1CNADECLARED7.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS: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)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Linux Linux Kernel All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
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

ReferenceSourceLinkTags
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

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report