Vulnerability · Published Feb 29, 2024 · Assigned by Linux

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

High 7.8

In plain English

A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 86.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8bpftool4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-abi-stablelists4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-core4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-cross-headers4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-core4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-modules4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-debug-modules-extra4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-doc4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-headers4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-modules4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-modules-extra4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-rt4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-core4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-core4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-devel4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-kvm4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-modules4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-debug-modules-extra4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-devel4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-kvm4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-modules4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-rt-modules-extra4.18.0-553.16.1.rt7.357.el8_10ALSA-2024:5102
AlmaLinux:8kernel-tools4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-tools-libs4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-tools-libs-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-core4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-devel4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-modules4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8kernel-zfcpdump-modules-extra4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8perf4.18.0-553.16.1.el8_10ALSA-2024:5101
AlmaLinux:8python3-perf4.18.0-553.16.1.el8_10ALSA-2024:5101
Debian:12linux6.1.76-1DEBIAN-CVE-2023-52486
Debian:13linux6.6.15-1DEBIAN-CVE-2023-52486
Debian:14linux6.6.15-1DEBIAN-CVE-2023-52486
Rocky Linux:8kernel0:4.18.0-553.16.1.el8_10.cloud.0.1RXSA-2024:5101
Rocky Linux:8kernel0:4.18.0-553.16.1.el8_10RLSA-2024:5101
Rocky Linux:8kernel-rt0:4.18.0-553.16.1.rt7.357.el8_10RLSA-2024:5102
Ubuntu:22.04:LTSlinux5.15.0-106.116USN-6766-1
Ubuntu:22.04:LTSlinux5.15.0-106.116UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-aws5.15.0-1061.67UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-aws5.15.0-1061.67USN-6766-3
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-azure5.15.0-1063.72UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-azure5.15.0-1063.72USN-6766-1
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1022.23~22.04.1UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1022.23~22.04.1USN-6819-1
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1063.72.1UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1063.72.1USN-6766-1
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-gcp5.15.0-1059.67USN-6766-1
Ubuntu:22.04:LTSlinux-gcp5.15.0-1059.67UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1022.24~22.04.1UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1022.24~22.04.1USN-6818-1
Ubuntu:22.04:LTSlinux-gke5.15.0-1058.63UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-gke5.15.0-1058.63USN-6766-1
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1044.51USN-6766-1
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1044.51UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-41.41~22.04.2UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-41.41~22.04.2USN-6818-4
Ubuntu:22.04:LTSlinux-ibm5.15.0-1054.57USN-6766-1
Ubuntu:22.04:LTSlinux-ibm5.15.0-1054.57UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1057.63USN-6795-1
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1057.63UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-kvm5.15.0-1058.63USN-6766-1
Ubuntu:22.04:LTSlinux-kvm5.15.0-1058.63UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-106.116UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-106.116USN-6766-1
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-41.41.1~22.04.1USN-6818-1
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-41.41.1~22.04.1UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1054.55UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1054.55USN-6766-1
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1021.22UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1021.22USN-6818-3
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1026.26UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1015.15UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1024.25USN-6819-3
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1024.25UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-oracle5.15.0-1059.65USN-6766-1
Ubuntu:22.04:LTSlinux-oracle5.15.0-1059.65UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1024.24~22.04.1UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1024.24~22.04.1USN-6819-4
Ubuntu:22.04:LTSlinux-raspi5.15.0-1054.57USN-6766-2
Ubuntu:22.04:LTSlinux-raspi5.15.0-1054.57UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-riscv-6.56.5.0-40.40.1~22.04.1UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1015.16~22.04.1USN-6819-1
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1015.16~22.04.1UBUNTU-CVE-2023-52486
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2023-52486

Affected products (as reported)

VendorProductVersions
Linux Linux 29dc0d1de18239cf3ef8bab578b8321ed340d81c – before 376e21a9e4c2c63ee5d8d3aa74be5082c388222929dc0d1de18239cf3ef8bab578b8321ed340d81c – before 9dd334a8245011ace45e53298175c7b659edb3e729dc0d1de18239cf3ef8bab578b8321ed340d81c – before f55261469be87c55df13db76dc945f6bcd82510529dc0d1de18239cf3ef8bab578b8321ed340d81c – before b4af63da9d94986c529d74499fdfe44289acd55129dc0d1de18239cf3ef8bab578b8321ed340d81c – before 62f2e79cf9f4f47cc9dea9cebdf58d9f7b5695e029dc0d1de18239cf3ef8bab578b8321ed340d81c – before d7afdf360f4ac142832b098b4de974e867cc063c29dc0d1de18239cf3ef8bab578b8321ed340d81c – before bfd0feb1b109cb63b87fdcd00122603787c75a1a29dc0d1de18239cf3ef8bab578b8321ed340d81c – before cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c
Linux Linux 4.12

References