Skip to contentSkip to conversation

CVE-2026-98227: memstick: ms_block: destroy io_queue workqueue on removal

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 6

lore
Share & tools
lore
#0 lore raw

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

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

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

memstick: ms_block: destroy io_queue workqueue on removal

msb_init_disk() creates the per-card ordered workqueue msb->io_queue with alloc_ordered_workqueue(). It is torn down with destroy_workqueue() only on the init error path; msb_remove() never destroys it. msb_stop() merely flushes the queue, and neither msb_data_clear() nor put_disk() free it. As a result every card insert/remove cycle leaks the workqueue and its kworker, exhausting kernel memory over repeated cycles.

Destroy the workqueue in msb_remove() after the disk has been removed and the queue drained.

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

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

	Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 6.1.189 with commit 0ff795163f37109a134b5a421558530f8d091544
	Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 6.6.158 with commit 19c3da6621a253f1f8b937ed91bc22330a930d9c
	Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 6.12.112 with commit 9a2e7cdc0880e735aff0968ee402f2c92a992b9b
	Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 6.18.54 with commit 6611f78ec3fd4b33a00bfda20725b254a22979f6
	Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 7.2.8 with commit f222bb8c30cf5699c560b29179ff2bddcac1f950
	Issue introduced in 3.12 with commit 0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 and fixed in 7.3-rc4 with commit 90af7fde083e1b22c349c3a8b1626728e44e474c

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

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/memstick/core/ms_block.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/0ff795163f37109a134b5a421558530f8d091544
	https://git.kernel.org/stable/c/19c3da6621a253f1f8b937ed91bc22330a930d9c
	https://git.kernel.org/stable/c/9a2e7cdc0880e735aff0968ee402f2c92a992b9b
	https://git.kernel.org/stable/c/6611f78ec3fd4b33a00bfda20725b254a22979f6
	https://git.kernel.org/stable/c/f222bb8c30cf5699c560b29179ff2bddcac1f950
	https://git.kernel.org/stable/c/90af7fde083e1b22c349c3a8b1626728e44e474c