CVE-2026-23434: mtd: rawnand: serialize lock/unlock against other NAND operations
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mtd: rawnand: serialize lock/unlock against other NAND operations
nand_lock() and nand_unlock() call into chip->ops.lock_area/unlock_area without holding the NAND device lock. On controllers that implement SET_FEATURES via multiple low-level PIO commands, these can race with concurrent UBI/UBIFS background erase/write operations that hold the device lock, resulting in cmd_pending conflicts on the NAND controller.
Add nand_get_device()/nand_release_device() around the lock/unlock operations to serialize them against all other NAND controller access.
The Linux kernel CVE team has assigned CVE-2026-23434 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.7 with commit 92270086b7e5ada7ab381c06cc3da2e95ed17088 and fixed in 6.1.167 with commit ce5229e78078e437704157eb542f43a6f83b429b Issue introduced in 5.7 with commit 92270086b7e5ada7ab381c06cc3da2e95ed17088 and fixed in 6.6.130 with commit a80291e577b44593a724d6cd64c14337c78f194d Issue introduced in 5.7 with commit 92270086b7e5ada7ab381c06cc3da2e95ed17088 and fixed in 6.12.78 with commit f71ce0ae5aefe39dd5b2f996c0e08550d2153ad2 Issue introduced in 5.7 with commit 92270086b7e5ada7ab381c06cc3da2e95ed17088 and fixed in 6.18.20 with commit 5fd5c078af23cb353507aa522e09d557d7eaef04 Issue introduced in 5.7 with commit 92270086b7e5ada7ab381c06cc3da2e95ed17088 and fixed in 6.19.10 with commit f25446e2c28939753d3b62d34dfda49952b2557d Issue introduced in 5.7 with commit 92270086b7e5ada7ab381c06cc3da2e95ed17088 and fixed in 7.0-rc5 with commit bab2bc6e850a697a23b9e5f0e21bb8c187615e95
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-23434
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/mtd/nand/raw/nand_base.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/ce5229e78078e437704157eb542f43a6f83b429b https://git.kernel.org/stable/c/a80291e577b44593a724d6cd64c14337c78f194d https://git.kernel.org/stable/c/f71ce0ae5aefe39dd5b2f996c0e08550d2153ad2 https://git.kernel.org/stable/c/5fd5c078af23cb353507aa522e09d557d7eaef04 https://git.kernel.org/stable/c/f25446e2c28939753d3b62d34dfda49952b2557d https://git.kernel.org/stable/c/bab2bc6e850a697a23b9e5f0e21bb8c187615e95