CVE-2026-142858: ata: libata-scsi: abort multi-sector pass-through commands when multi_count is 0
In the Linux kernel, the following vulnerability has been resolved:
ata: libata-scsi: abort multi-sector pass-through commands when multicount is 0
When an ATA12, ATA16, or ATA32 pass-through command with a multi-sector PIO command opcode (ATACMDREADMULTI, ATACMDWRITEMULTI, ATACMDREADMULTIEXT, ATACMDWRITEMULTIEXT, or ATACMDWRITEMULTIFUAEXT) is submitted via SGIO on a device where multiple-sector mode is not configured (dev->multicount == 0), atascsipassthru() currently logs a warning and still dispatches the taskfile. When the DRQ interrupt fires, atapiosectors() triggers WARNONONCE(qc->dev->multicount == 0) and computes nsect = min((qc->nbytes - qc->curbytes) / qc->sectsize, 0) = 0, failing to transfer any sectors:
ata1.00: invalid multicount 1 ignored WARNING: drivers/ata/libata-sff.c:666 at atapiosectors+0x27d/0x300 Call Trace: <IRQ> atasffhsmmove+0x211/0x22e0 atasffportintr+0x1c8/0x520 atabmdmaportintr+0xa1/0x5b0 atabmdmainterrupt+0x1f5/0x550
Per ACS-3 section 7.12.7.21, if IDENTIFY DEVICE word 59 bit 8 is cleared to zero (multicount == 0) and a READ MULTIPLE or WRITE MULTIPLE command is received without a preceding successful SET MULTIPLE MODE command, the device returns command aborted (ABRT). Per the SAT specification, an ABRT error translates to the ABORTED COMMAND sense key with NO ADDITIONAL SENSE INFORMATION (0x00, 0x00).
Fail multi-sector taskfile commands in atascsipassthru() with atascsisetsense(dev, scmd, ABORTEDCOMMAND, 0, 0) when dev->multicount == 0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Compensating control
In ata_scsi_pass_thru(), fail multi-sector taskfile commands when dev->multi_count is 0 and return INFORMATION (0x00, 0x00).
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
An ATA_12, ATA_16, or ATA_32 pass-through command must be submitted through SG_IO using a multi-sector PIO opcode, such as READ MULTIPLE or WRITE MULTIPLE. The target device must have multiple-sector mode unconfigured, indicated by dev->multi_count equal to 0.
How can I determine whether a system has encountered the issue?
Affected requests can produce warnings about an invalid multi_count value and a WARN_ON_ONCE in ata_pio_sectors(). The call trace may include ata_sff_hsm_move, __ata_sff_port_intr, ata_bmdma_port_intr, and ata_bmdma_interrupt.
What happens when the affected command is dispatched?
The taskfile is dispatched despite the invalid configuration, but when the DRQ interrupt occurs the sector count is calculated as zero. As a result, no sectors are transferred for the request.
What should be done if the fix cannot be applied immediately?
Avoid submitting ATA pass-through multi-sector PIO commands through SG_IO to devices for which multiple-sector mode is not configured. The relevant commands include ATA_CMD_READ_MULTI, ATA_CMD_WRITE_MULTI, ATA_CMD_READ_MULTI_EXT, ATA_CMD_WRITE_MULTI_EXT, and ATA_CMD_WRITE_MULTI_FUA_EXT.