Skip to contentSkip to conversation

CVE-2026-45888: md/raid1: fix memory leak in raid1_run()

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:

md/raid1: fix memory leak in raid1_run()

raid1_run() calls setup_conf() which registers a thread via md_register_thread(). If raid1_set_limits() fails, the previously registered thread is not unregistered, resulting in a memory leak of the md_thread structure and the thread resource itself.

Add md_unregister_thread() to the error path to properly cleanup the thread, which aligns with the error handling logic of other paths in this function.

Compile tested only. Issue found using a prototype static analysis tool and code review.

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

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

	Issue introduced in 6.9 with commit 97894f7d3c2966164516a8a5109674763d3a55e1 and fixed in 6.12.75 with commit c94fd6e8a71efd047ff36930e840f3c25679e136
	Issue introduced in 6.9 with commit 97894f7d3c2966164516a8a5109674763d3a55e1 and fixed in 6.18.14 with commit ec10e3dc93994b87adf7c759a4639fe34013989a
	Issue introduced in 6.9 with commit 97894f7d3c2966164516a8a5109674763d3a55e1 and fixed in 6.19.4 with commit b37588b0282a2b3cdda9db1d53712745ce66dea0
	Issue introduced in 6.9 with commit 97894f7d3c2966164516a8a5109674763d3a55e1 and fixed in 7.0 with commit 6abc7d5dcf0ee0f85e16e41c87fbd06231f28753

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

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/md/raid1.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/c94fd6e8a71efd047ff36930e840f3c25679e136
	https://git.kernel.org/stable/c/ec10e3dc93994b87adf7c759a4639fe34013989a
	https://git.kernel.org/stable/c/b37588b0282a2b3cdda9db1d53712745ce66dea0
	https://git.kernel.org/stable/c/6abc7d5dcf0ee0f85e16e41c87fbd06231f28753