ata: libata: cancel pending work after clearing deferred_qc
Summary
ata: libata: cancel pending work after clearing deferred_qc
Original description
The description as published by the source.
In the Linux kernel, the following vulnerability has been resolved:
ata: libata: cancel pending work after clearing deferred_qc
Syzbot reported a WARN_ON() in ata_scsi_deferred_qc_work(), caused by
ap->ops->qc_defer() returning non-zero before issuing the deferred qc.
ata_scsi_schedule_deferred_qc() is called during each command completion.
This function will check if there is a deferred QC, and if
ap->ops->qc_defer() returns zero, meaning that it is possible to queue the
deferred qc at this time (without being deferred), then it will queue the
work which will issue the deferred qc.
Once the work get to run, which can potentially be a very long time after
the work was scheduled, there is a WARN_ON() if ap->ops->qc_defer() returns
non-zero.
While we hold the ap->lock both when assigning and clearing deferred_qc,
and the work itself holds the ap->lock, the code currently does not cancel
the work after clearing the deferred qc.
This means that the following scenario can happen:
- One or several NCQ commands are queued.
- A non-NCQ command is queued, gets stored in ap->deferred_qc.
- Last NCQ command gets completed, work is queued to issue the deferred
qc. - Timeout or error happens, ap->deferred_qc is cleared. The queued work is
currently NOT canceled. - Port is reset.
- One or several NCQ commands are queued.
- A non-NCQ command is queued, gets stored in ap->deferred_qc.
- Work is finally run. Yet at this time, there is still NCQ commands in
flight.
The…
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- BellSoft Alpaquita BELL-CVE-2026-23355 linux-lts Fixed in: 6.18.35-r1
- Debian DEBIAN-CVE-2026-23355 linux Fixed in: 6.19.8-1
References
- advisory github.com
- advisory nvd.nist.gov
- package git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org