Skip to contentSkip to conversation

CVE-2026-99587: ata: libata-scsi: reject data-in commands with a data-out buffer

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ata: libata-scsi: reject data-in commands with a data-out buffer

SG_IO can submit a data-in SCSI command with DMA_TO_DEVICE. The scatterlist can then contain pages pinned without write access. ata_scsi_rbuf_fill() writes simulated replies to that scatterlist; in the reported case, the copy tried to write the shared zero page and faulted in the kernel.

The same mismatch can affect SG_IO commands translated by libata. ZBC IN and GET PHYSICAL ELEMENT STATUS completion handlers can modify the receive buffer even if the drive aborts the command. For ATAPI, the successful INQUIRY completion also rewrites the buffer in atapi_fixup_inquiry().

Reject these mismatched commands before the buffer is written or the command is issued. Report ABORTED COMMAND / DATA IN BUFFER ERROR because the CDB itself can be valid; the supplied transfer direction is wrong.

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

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

	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.118 with commit cd77d3791e66350541f1c7c5447db2f28857bba4
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.64 with commit f4cfd238e806e6784a7b4ff609a0592382d54df3
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.3.5 with commit 10c6a917284f584162974767d4e2a0cf411db684
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.4-rc2 with commit a4845f077415ef32fe672c841e2fc58ae9e28273

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

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/ata/libata-scsi.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/cd77d3791e66350541f1c7c5447db2f28857bba4
	https://git.kernel.org/stable/c/f4cfd238e806e6784a7b4ff609a0592382d54df3
	https://git.kernel.org/stable/c/10c6a917284f584162974767d4e2a0cf411db684
	https://git.kernel.org/stable/c/a4845f077415ef32fe672c841e2fc58ae9e28273