CVE-2026-43319: spi: spidev: fix lock inversion between spi_lock and buf_lock
In the Linux kernel, the following vulnerability has been resolved:
spi: spidev: fix lock inversion between spilock and buflock
The spidev driver previously used two mutexes, spilock and buflock, but acquired them in different orders depending on the code path:
write()/read(): buflock -> spilock ioctl(): spilock -> buflock
This AB-BA locking pattern triggers lockdep warnings and can cause real deadlocks:
WARNING: possible circular locking dependency detected spidevioctl() -> mutexlock(&spidev->buflock) spidevsyncwrite() -> mutexlock(&spidev->spilock) DEADLOCK
The issue is reproducible with a simple userspace program that performs write() and SPIIOCWRMAXSPEEDHZ ioctl() calls from separate threads on the same spidev file descriptor.
Fix this by simplifying the locking model and removing the lock inversion entirely. spidevsync() no longer performs any locking, and all callers serialize access using spilock.
buflock is removed since its functionality is fully covered by spilock, eliminating the possibility of lock ordering issues.
This removes the lock inversion and prevents deadlocks without changing userspace ABI or behaviour.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43319?
CVE-2026-43319 has a moderate severity level due to the potential for deadlocks.
How do I fix CVE-2026-43319?
To fix CVE-2026-43319, upgrade your Linux kernel to a version that includes the patch for the spidev driver.
What versions of the Linux kernel are affected by CVE-2026-43319?
CVE-2026-43319 affects Linux kernel versions from 6.2 up to but not including 6.12.75, as well as specific 7.0 release candidates.
What is the impact of CVE-2026-43319 on system performance?
The impact of CVE-2026-43319 can lead to performance issues due to the possibility of deadlocks under certain conditions.
Who is responsible for patching CVE-2026-43319?
The responsibility for patching CVE-2026-43319 lies with the system administrators who manage the Linux kernel in their environments.