Skip to contentSkip to conversation

CVE-2026-46074: spi: ch341: fix memory leaks on probe failures

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

spi: ch341: fix memory leaks on probe failures

Make sure to deregister the controller, disable pins, and kill and free the RX URB on probe failures to mirror disconnect and avoid memory leaks and use-after-free.

Also add an explicit URB kill on disconnect for symmetry (even if that is not strictly required as USB core would have stopped it in the current setup).

The Linux kernel CVE team has assigned CVE-2026-46074 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.11 with commit 8846739f52afa07e63395c80227dc544f54bd7b1 and fixed in 6.12.86 with commit 5c6518633702d7f7b1153e9d8e042af847f11ef3
	Issue introduced in 6.11 with commit 8846739f52afa07e63395c80227dc544f54bd7b1 and fixed in 6.18.27 with commit ff8a7996dc8bf433efe2126ffdaee5b374a89e30
	Issue introduced in 6.11 with commit 8846739f52afa07e63395c80227dc544f54bd7b1 and fixed in 7.0.4 with commit 9bee2faf9e21c796d0d222c9d84a98f41bd303a0
	Issue introduced in 6.11 with commit 8846739f52afa07e63395c80227dc544f54bd7b1 and fixed in 7.1-rc1 with commit b99e3ddb91b499d920e63a2daff8880be68cfe9e

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-46074

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/spi/spi-ch341.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/5c6518633702d7f7b1153e9d8e042af847f11ef3
	https://git.kernel.org/stable/c/ff8a7996dc8bf433efe2126ffdaee5b374a89e30
	https://git.kernel.org/stable/c/9bee2faf9e21c796d0d222c9d84a98f41bd303a0
	https://git.kernel.org/stable/c/b99e3ddb91b499d920e63a2daff8880be68cfe9e