CVE-2024-40976
📋 TL;DR
A race condition vulnerability in the Linux kernel's Lima GPU driver allows a rendering job to complete after timeout handling begins but before hard reset, potentially causing refcount imbalances and system instability. This affects Linux systems using the Lima driver for ARM Mali GPUs. The vulnerability could lead to kernel warnings or crashes.
💻 Affected Systems
- Linux kernel with Lima GPU driver
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Kernel panic or system crash due to refcount imbalance leading to memory corruption or instability.
Likely Case
Kernel warning messages in logs and potential GPU driver instability requiring system reboot.
If Mitigated
Minor performance impact from timeout handling with no security compromise.
🎯 Exploit Status
Requires local access and ability to trigger GPU rendering operations that can timeout. More likely to be triggered accidentally than maliciously.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Linux kernel with commit 03e7b2f7ae4c0ae5fb8e4e2454ba4008877f196a or later
Vendor Advisory: https://git.kernel.org/stable/c/03e7b2f7ae4c0ae5fb8e4e2454ba4008877f196a
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commit. 2. Check distribution-specific security advisories. 3. Reboot system after kernel update.
🔧 Temporary Workarounds
Disable Lima GPU driver
linuxRemove or blacklist the Lima driver module to prevent GPU acceleration but avoid vulnerability
echo 'blacklist lima' >> /etc/modprobe.d/blacklist-lima.conf
update-initramfs -u
reboot
🧯 If You Can't Patch
- Restrict local user access to systems using Lima GPU driver
- Monitor system logs for Lima driver warnings and restart affected services
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if Lima driver is loaded: 'lsmod | grep lima' and 'uname -r'
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes fix commit or check with 'modinfo lima | grep version'
📡 Detection & Monitoring
Log Indicators:
- Kernel warnings mentioning 'lima_devfreq_record_idle'
- GPU timeout messages in dmesg
- Refcount imbalance warnings
Network Indicators:
- None - local vulnerability only
SIEM Query:
source="kernel" AND ("lima_devfreq_record_idle" OR "lima_sched_pipe_task_done" OR "WARNING: CPU:")
🔗 References
- https://git.kernel.org/stable/c/03e7b2f7ae4c0ae5fb8e4e2454ba4008877f196a
- https://git.kernel.org/stable/c/58bfd311c93d66d8282bf21ebbf35cc3bb8ad9db
- https://git.kernel.org/stable/c/70aa1f2dec46b6fdb5f6b9f37b6bfa4a4dee0d3a
- https://git.kernel.org/stable/c/9fd8ddd23793a50dbcd11c6ba51f437f1ea7d344
- https://git.kernel.org/stable/c/a421cc7a6a001b70415aa4f66024fa6178885a14
- https://git.kernel.org/stable/c/bdbc4ca77f5eaac15de7230814253cddfed273b1
- https://git.kernel.org/stable/c/03e7b2f7ae4c0ae5fb8e4e2454ba4008877f196a
- https://git.kernel.org/stable/c/58bfd311c93d66d8282bf21ebbf35cc3bb8ad9db
- https://git.kernel.org/stable/c/70aa1f2dec46b6fdb5f6b9f37b6bfa4a4dee0d3a
- https://git.kernel.org/stable/c/9fd8ddd23793a50dbcd11c6ba51f437f1ea7d344
- https://git.kernel.org/stable/c/a421cc7a6a001b70415aa4f66024fa6178885a14
- https://git.kernel.org/stable/c/bdbc4ca77f5eaac15de7230814253cddfed273b1
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html