CVE-2026-90389: md: scope memalloc_noio to allocation critical sections
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
md: scope memalloc_noio to allocation critical sections
Storing a memalloc_noio_save() token in mddev->noio_flags lets one task save the token and another task restore it. With concurrent suspend sysfs writes, task A can enter PF_MEMALLOC_NOIO, return to userspace still in that scope, and later task B can restore A's saved token.
Avoid tying the token lifetime to mddev. Keep mddev_suspend() and mddev_resume() only responsible for array suspension, and enter PF_MEMALLOC_NOIO only in the MD paths that allocate memory after the array has been suspended. Restore the token before resuming the array.
A reproducer repeatedly writes suspend_lo and suspend_hi from concurrent workers and checks each worker's /proc/self/stat flags before and after the sysfs write.
The Linux kernel CVE team has assigned CVE-2026-90389 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.8 with commit 78f57ef9d50a75326da73d352d7c27828495229a and fixed in 6.12.110 with commit 72ebfdf507ede7d7f2b7ca0a5634811a0e4bf045 Issue introduced in 5.8 with commit 78f57ef9d50a75326da73d352d7c27828495229a and fixed in 6.18.52 with commit 28fdea874f68cac6c36651b1fc7272fd2199c48d Issue introduced in 5.8 with commit 78f57ef9d50a75326da73d352d7c27828495229a and fixed in 7.2.6 with commit a58923756b0f8e71032070c23ae0b167e46731da Issue introduced in 5.8 with commit 78f57ef9d50a75326da73d352d7c27828495229a and fixed in 7.3-rc1 with commit bace2010dd7ac07bc980575afb135c406730a7fe
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-90389
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-bitmap.c
drivers/md/md.c
drivers/md/md.h
drivers/md/raid5.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/72ebfdf507ede7d7f2b7ca0a5634811a0e4bf045 https://git.kernel.org/stable/c/28fdea874f68cac6c36651b1fc7272fd2199c48d https://git.kernel.org/stable/c/a58923756b0f8e71032070c23ae0b167e46731da https://git.kernel.org/stable/c/bace2010dd7ac07bc980575afb135c406730a7fe