CVE-2024-41036: net: ks8851: Fix deadlock with the SPI chip variant
In the Linux kernel, the following vulnerability has been resolved:
net: ks8851: Fix deadlock with the SPI chip variant
When SMP is enabled and spinlocks are actually functional then there is a deadlock with the 'statelock' spinlock between ks8851startxmitspi and ks8851irq:
watchdog: BUG: soft lockup - CPU#0 stuck for 27s! call trace: queuedspinlockslowpath+0x100/0x284 dorawspinlock+0x34/0x44 ks8851startxmitspi+0x30/0xb8 ks8851startxmit+0x14/0x20 netdevstartxmit+0x40/0x6c devhardstartxmit+0x6c/0xbc schdirectxmit+0xa4/0x22c qdiscrun+0x138/0x3fc qdiscrun+0x24/0x3c nettxaction+0xf8/0x130 handlesoftirqs+0x1ac/0x1f0 dosoftirq+0x14/0x20 dosoftirq+0x10/0x1c callonirqstack+0x3c/0x58 dosoftirqownstack+0x1c/0x28 irqexitrcu+0x54/0x9c irqexitrcu+0x10/0x1c el1interrupt+0x38/0x50 el1h64irqhandler+0x18/0x24 el1h64irq+0x64/0x68 netifschedule+0x6c/0x80 netiftxwakequeue+0x38/0x48 ks8851irq+0xb8/0x2c8 irqthreadfn+0x2c/0x74 irqthread+0x10c/0x1b0 kthread+0xc8/0xd8 retfromfork+0x10/0x20
This issue has not been identified earlier because tests were done on a device with SMP disabled and so spinlocks were actually NOPs.
Now use spin(un)lockbh for TX queue related locking to avoid execution of softirq work synchronously that would lead to a deadlock.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.106-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.9.10-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
ubuntu/linux-aws-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1018.19~22.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1017.20~22.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1017.19~22.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-48.48~22.04.1 - Upgrade
Upgrade
ubuntu/linux-ibm-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1015.15~22.04.1 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-48.48.3~22.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1017.19~22.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1015.15~22.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-48.48.1~22.04.2 - Upgrade
Upgrade
ubuntu/linux-realtime-6.8to a version that resolves this vulnerability.Fixed in 6.8.1-1011.11~22.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.8.0-48.48 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.8.0-1018.20 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 6.8.0-1017.20 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.8.0-1017.19 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 6.8.0-1013.17 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 6.8.0-1002.4 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 6.8.0-1015.15 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 6.8.0-48.48.3 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 6.8.0-1017.19 - Upgrade
Upgrade
ubuntu/linux-nvidia-lowlatencyto a version that resolves this vulnerability.Fixed in 6.8.0-1017.19.1 - Upgrade
Upgrade
ubuntu/linux-oem-6.8to a version that resolves this vulnerability.Fixed in 6.8.0-1016.16 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 6.8.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 6.8.0-1014.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 6.8.0-48.48.1 - Upgrade
Upgrade
ubuntu/linux-xilinxto a version that resolves this vulnerability.Fixed in 6.8.0-1009.10 - Upgrade
Upgrade
ubuntu/linux-raspi-realtimeto a version that resolves this vulnerability.Fixed in 6.8.0-2013.14 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 6.8.1-1011.11 - Upgrade
Upgrade
ubuntu/linux-fipsto a version that resolves this vulnerability.Fixed in 6.8.0-78.78+fips1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.11 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.16 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.100 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.41 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.9.10 - Compensating control
In the Linux kernel ks8851 SPI driver, use spin_lock_bh() and spin_unlock_bh() for TX queue-related locking to prevent softirq work from executing synchronously and causing a deadlock.
Event History
Frequently Asked Questions
What is the severity of CVE-2024-41036?
CVE-2024-41036 has a moderate severity rating due to its potential for deadlock in the kernel.
What systems are affected by CVE-2024-41036?
CVE-2024-41036 affects various versions of the Linux kernel, including versions ranging from 6.1.70 to 6.6.41 and any 6.10 release candidates.
How do I fix CVE-2024-41036?
To fix CVE-2024-41036, users should update to patched kernel versions such as 6.1.123-1 or 6.12.12-1.
What is the impact of not addressing CVE-2024-41036?
Failure to address CVE-2024-41036 may result in system instability or deadlocks during operation.
Is CVE-2024-41036 related to specific hardware?
Yes, CVE-2024-41036 specifically pertains to the ks8851 SPI chip variant in the Linux kernel.