CVE-2026-90267: scsi: sd: Fix special_vec mempool leak when scsi_alloc_sgtables() fails
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
scsi: sd: Fix special_vec mempool leak when scsi_alloc_sgtables() fails
sd_set_special_bvec() allocates a special payload page for UNMAP and WRITE SAME commands. If scsi_alloc_sgtables() fails afterward in sd_setup_unmap_cmnd() or sd_setup_write_same{10,16}_cmnd(), the SCSI midlayer does not call uninit_command() because RQF_DONTPREP is not set yet, leaking the page.
Call sd_uninit_command() on error, and clear RQF_SPECIAL_PAYLOAD after freeing the page.
The Linux kernel CVE team has assigned CVE-2026-90267 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.12 with commit 81d926e8b5520e38f1f72dd7bb7cfc81c1a69d87 and fixed in 7.2.6 with commit 5d7d1b8b525e5eff33a01d07dfcf7bdd3b6d790d Issue introduced in 4.12 with commit 81d926e8b5520e38f1f72dd7bb7cfc81c1a69d87 and fixed in 7.3-rc1 with commit bb31844d88b77138b67aa20c3600203baff40140
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-90267
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/scsi/sd.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/5d7d1b8b525e5eff33a01d07dfcf7bdd3b6d790d https://git.kernel.org/stable/c/bb31844d88b77138b67aa20c3600203baff40140