Skip to contentSkip to conversation

CVE-2026-90278: md: wait for behind writes before destroying bitmap

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

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: wait for behind writes before destroying bitmap

__md_stop() destroyed the bitmap before calling mddev_detach(). That made mddev_detach() skip bitmap_ops->wait_behind_writes(), because the bitmap was already disconnected from mddev.

This was still safe for the legacy bitmap because bitmap_destroy() waits for behind writes itself. llbitmap keeps that wait in its ->wait_behind_writes() operation instead, while ->destroy() tears down the llbitmap storage. With the old ordering, RAID1 behind-write completions could still run after llbitmap storage had been freed.

Call mddev_detach() before md_bitmap_destroy() so the common detach path can wait for behind writes while the bitmap is still alive. Only destroy the bitmap after those users are gone.

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

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

	Issue introduced in 6.18 with commit 5ab829f1971dc99f2aac10846c378e67fc875abc and fixed in 6.18.52 with commit 73881ff7a75913f919a1ce9d9571bfaab8e8588d
	Issue introduced in 6.18 with commit 5ab829f1971dc99f2aac10846c378e67fc875abc and fixed in 7.2.6 with commit 4224dccd325a9380e8edfb66aad8bb5771c94222
	Issue introduced in 6.18 with commit 5ab829f1971dc99f2aac10846c378e67fc875abc and fixed in 7.3-rc1 with commit 2a79365b2278f16e163e4024086105693b421601

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

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/md.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/73881ff7a75913f919a1ce9d9571bfaab8e8588d
	https://git.kernel.org/stable/c/4224dccd325a9380e8edfb66aad8bb5771c94222
	https://git.kernel.org/stable/c/2a79365b2278f16e163e4024086105693b421601