Vulnerability · Published Jul 12, 2024 · Assigned by Linux
CVE-2024-40976drm/lima: mask irqs in timeout path before hard reset
Medium 5.5
In plain English
A medium-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 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: drm/lima: mask irqs in timeout path before hard reset There is a race condition in which a rendering job might take just long enough to trigger the drm sched job timeout handler but also still complete before the hard reset is done by the timeout handler. This runs into race conditions not expected by the timeout handler. In some very specific cases it currently may result in a refcount imbalance on lima_pm_idle, with a stack dump such as: [10136.669170] WARNING: CPU: 0 PID: 0 at drivers/gpu/drm/lima/lima_devfreq.c:205 lima_devfreq_record_idle+0xa0/0xb0 ... [10136.669459] pc : lima_devfreq_record_idle+0xa0/0xb0 ... [10136.669628] Call trace: [10136.669634] lima_devfreq_record_idle+0xa0/0xb0 [10136.669646] lima_sched_pipe_task_done+0x5c/0xb0 [10136.669656] lima_gp_irq_handler+0xa8/0x120 [10136.669666] __handle_irq_event_percpu+0x48/0x160 [10136.669679] handle_irq_event+0x4c/0xc0 We can prevent that race condition entirely by masking the irqs at the beginning of the timeout handler, at which point we give up on waiting for that job entirely. The irqs will be enabled again at the next hard reset which is already done as a recovery by the timeout handler.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.99-1 | DEBIAN-CVE-2024-40976 |
| Debian:13 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40976 |
| Debian:14 | linux | 6.9.7-1 | DEBIAN-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux | 5.15.0-121.131 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux | 6.8.0-44.44 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1069.75 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1015.16 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1015.16~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1072.81 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1014.16 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1072.81.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1068.76 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1014.16 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1014.16~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1066.72 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1010.13 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1052.59 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-45.45~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1062.65 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1012.12 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1064.70 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1066.71 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-121.131 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1064.65 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1013.14 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1013.14.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1028.28 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1016.16 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1012.12 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1067.73 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1012.12 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1012.12~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1062.65 | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1011.12 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-44.44.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-44.44.1~22.04.1 | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-40976 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1035.39 | UBUNTU-CVE-2024-40976 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | a1d2a6339961efc078208dc3b2f006e9e9a8e119 – before 03e7b2f7ae4c0ae5fb8e4e2454ba4008877f196aa1d2a6339961efc078208dc3b2f006e9e9a8e119 – before 70aa1f2dec46b6fdb5f6b9f37b6bfa4a4dee0d3aa1d2a6339961efc078208dc3b2f006e9e9a8e119 – before 9fd8ddd23793a50dbcd11c6ba51f437f1ea7d344a1d2a6339961efc078208dc3b2f006e9e9a8e119 – before bdbc4ca77f5eaac15de7230814253cddfed273b1a1d2a6339961efc078208dc3b2f006e9e9a8e119 – before 58bfd311c93d66d8282bf21ebbf35cc3bb8ad9dba1d2a6339961efc078208dc3b2f006e9e9a8e119 – before a421cc7a6a001b70415aa4f66024fa6178885a14 |
| Linux | Linux | 5.2 |
References
- https://git.kernel.org/stable/c/03e7b2f7ae4c0ae5fb8e4e2454ba4008877f196a
- https://git.kernel.org/stable/c/70aa1f2dec46b6fdb5f6b9f37b6bfa4a4dee0d3a
- https://git.kernel.org/stable/c/9fd8ddd23793a50dbcd11c6ba51f437f1ea7d344
- https://git.kernel.org/stable/c/bdbc4ca77f5eaac15de7230814253cddfed273b1
- https://git.kernel.org/stable/c/58bfd311c93d66d8282bf21ebbf35cc3bb8ad9db
- https://git.kernel.org/stable/c/a421cc7a6a001b70415aa4f66024fa6178885a14
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html