CVE-2026-74372: raid1: fix nr_pending leak in REQ_ATOMIC bad-block error path
Greg Kroah-Hartman <[email protected]>
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026081503-CVE-2026-74372-0ee5@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: raid1: fix nr_pending leak in REQ_ATOMIC bad-block error path In raid1_write_request(), each per-mirror loop iteration begins by incrementing rdev->nr_pending. If a REQ_ATOMIC write encounters a badblock within the requested range, the code jumps to err_handle without dropping the reference taken for the current mirror. err_handle's cleanup loop will only decrements for k < i and r1_bio->bios[k] is non-NULL. The current slot is therefore skipped, leaving its nr_pending reference leaked permanently. The reference prevents the rdev from ever being removed, since raid1_remove_conf() refuses to remove an rdev with nr_pending > 0. Fix this by calling rdev_dec_pending() before jumping to err_handle. The Linux kernel CVE team has assigned CVE-2026-74372 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit f2a38abf5f1c5aeb3be8e9f4d3d815c867fff7ca and fixed in 6.18.40 with commit 5ac9e793ba2583d72740d929e7858a6c82e22ed5 Issue introduced in 6.13 with commit f2a38abf5f1c5aeb3be8e9f4d3d815c867fff7ca and fixed in 7.1.5 with commit 731485617bf862f1289c3f40ed1f800d0475826f Issue introduced in 6.13 with commit f2a38abf5f1c5aeb3be8e9f4d3d815c867fff7ca and fixed in 7.2-rc1 with commit 909d9dc3b5730c8ed7b764c68bc788342df2a07b 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-74372 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/5ac9e793ba2583d72740d929e7858a6c82e22ed5 https://git.kernel.org/stable/c/731485617bf862f1289c3f40ed1f800d0475826f https://git.kernel.org/stable/c/909d9dc3b5730c8ed7b764c68bc788342df2a07b