CVE-2026-99202: scsi: libsas: Fix SMP IO deadlock during HA resume
In the Linux kernel, the following vulnerability has been resolved:
scsi: libsas: Fix SMP IO deadlock during HA resume
smpexecutetasksg() calls pmruntimegetsync() on the host before issuing an SMP command. When that command is itself issued from the HA resume path, the getsync() deadlocks: it waits for the ongoing resume (the device is RPMRESUMING), while the resume is blocked in sasdrainwork() waiting for that same SMP IO to complete.
The deadlock needs an expander-attached SATA disk. During sasresumeha() -> sasdrainwork(), DISCERESUME -> sasresumesata() -> atasasportresume() requests ATAEHRESET, and the hard reset for such a disk is done via SMP PHY CONTROL (sasatahardreset() -> sasphyreset() -> sassmpphycontrol() -> smpexecutetasksg()). Direct-attached SATA resets through llddcontrolphy() and SSP devices use TMFs, so neither hits this.
Replace the getsync()/putsync() pair with pmruntimegetnoresume()/pmruntimeput(). smpexecutetasksg() only needs to hold off autosuspend while the SMP is in flight, and it must not try to resume the host: a sync resume issued from the HA resume path itself is what deadlocks, and by the time sasresumeha() runs, hwinit has already reinitialized the hardware, so the device is accessible without one.
The usage reference is still required. Discovery work normally runs inside an event worker's PM reference, taken at sasnotifyportevent() notify time and held until the handler has flushed the disco queue. sasrediscoverexphy() however requeues DISCEREVALIDATEDOMAIN from within the revalidation worker itself, and flushworkqueue() does not wait for work items queued during execution, so that chained revalidation runs with no outer PM reference - without the getnoresume(), its SMP could race autosuspend.
For the BSG path, sassmphandler() is the only caller which may find the host autosuspended: expander SMP requests do not go through any SCSI device request queue, so nothing else in that path holds the host awake. Resume it there with pmruntimeresumeandget() and check the result.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel libsas SMP handling, replace the get_sync()/put_sync() pair with pm_runtime_get_noresume()/pm_runtime_put(), and resume the host with pm_runtime_resume_and_get() before issuing the SMP command so autosuspend is held off without synchronously resuming from the HA resume path.