{"id":"CVE-2026-99956","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:20:33.097","lastModified":"2026-11-30T14:20:33.097","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nata: libata-sff: fix race between IRQ deferral and ata_sff_flush_pio_task()\n\nCommit 4a2e5409472e (\"ata: libata-sff: don't busy-wait for PIO data-in\ncommand completion\") allowed the interrupt handler to queue\nap->sff_pio_task from ata_sff_hsm_move() when a PIO data-in command is\nstill busy after its final data block.\n\nata_sff_flush_pio_task(), however, was written under the assumption that\ncancel_delayed_work_sync() is enough to prevent sff_pio_task from being\nqueued again before the HSM state is reset to HSM_ST_IDLE and\nsff_pio_task_link is cleared.\n\nThe flush runs early during error handling, at a point where the timed\nout command is still active, the port is not frozen yet, and interrupts\nare still being serviced.  If the final data-block interrupt of a PIO\ndata-in command is serviced in the window between\ncancel_delayed_work_sync() and the reset of hsm_task_state, the\ninterrupt handler queues sff_pio_task after the cancel has completed.\nWhen that work item then executes on ata_sff_wq after the flush cleared\nap->sff_pio_task_link, ata_sff_pio_task() hits\nBUG_ON(ap->sff_pio_task_link == NULL) while holding the host lock with\ninterrupts disabled; alternatively it proceeds on a stale link while\nerror handling owns the port.\n\nFix this by resetting hsm_task_state to HSM_ST_IDLE before cancelling\nthe work item.  Once the state is IDLE, __ata_sff_port_intr() can no\nlonger enter ata_sff_hsm_move(), so the interrupt handler can no longer\nqueue the pio task, and cancel_delayed_work_sync() drains whatever was\nqueued before the reset.\n\nAlso make ata_sff_pio_task() bail out quietly when the HSM state was\nmarked idle by the flush, both at entry and after re-acquiring the port\nlock following ata_msleep(), since a work item can already be running\nwhen the flush resets the state."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/ata/libata-sff.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"4a2e5409472e8a0e3e2817e149c55c1d5f803742","lessThan":"6ff5288c7a5da4cd792383144f91e584d291ca2f","versionType":"git","status":"affected"},{"version":"4a2e5409472e8a0e3e2817e149c55c1d5f803742","lessThan":"69be770908ae57354a41d7e1cc99ab46278d2e86","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/ata/libata-sff.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"7.3","status":"affected"},{"version":"0","lessThan":"7.3","versionType":"semver","status":"unaffected"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/69be770908ae57354a41d7e1cc99ab46278d2e86","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/6ff5288c7a5da4cd792383144f91e584d291ca2f","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}