{"id":"CVE-2026-99956","aliases":["CVE-2026-99956"],"related":[],"kind":"vulnerability","state":"published","title":"ata: libata-sff: fix race between IRQ deferral and ata_sff_flush_pio_task()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-30T13:18:37.303Z","modified":"2026-11-30T14:20:33.097Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"4a2e5409472e8a0e3e2817e149c55c1d5f803742","fixed":"6ff5288c7a5da4cd792383144f91e584d291ca2f","status":"affected"},{"type":"git","introduced":"4a2e5409472e8a0e3e2817e149c55c1d5f803742","fixed":"69be770908ae57354a41d7e1cc99ab46278d2e86","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.3","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/6ff5288c7a5da4cd792383144f91e584d291ca2f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/69be770908ae57354a41d7e1cc99ab46278d2e86","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99956","url":"https://www.cve.org/CVERecord?id=CVE-2026-99956","licence":"CVE Terms of Use","modified":"2026-11-30T13:18:37.303Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99956","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99956","licence":"Public domain","modified":"2026-11-30T14:20:33.097Z"}],"updatedAt":"2026-11-30T14:33:34.543Z","epss":{"score":0.00286,"percentile":0.22767,"date":"2026-12-01T12:00:22.000Z"}}