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.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.13-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.3.0-10.10 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.3.0-1004.5 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.192-2Fixed in 6.12.117-1Fixed in 7.2.15-1Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.117-1~deb12u1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.161 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.115 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.59 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.13 - Compensating control
In smp_execute_task_sg(), replace the pm_runtime_get_sync()/pm_runtime_put() pair with pm_runtime_get_noresume()/pm_runtime_put() to prevent autosuspend during SMP I/O without triggering a synchronous resume.
- Compensating control
In sas_smp_handler(), resume the host with pm_runtime_resume_and_get() and check the result before issuing the BSG SMP request.
Event History
Frequently Asked Questions
Which systems are affected by this deadlock path?
The affected path requires an expander-attached SATA disk. It occurs during host adapter resume when the SATA disk reset is performed through SMP PHY CONTROL.
Are direct-attached SATA disks or SSP devices affected?
No. Direct-attached SATA resets use lldd_control_phy(), while SSP devices use task management functions; neither reaches the SMP I/O path that deadlocks.
When can the issue be triggered?
It can occur during HA resume, when sas_resume_ha() drains work and a resumed SATA device requires an ATA error-handling reset. The reset issues SMP I/O while runtime PM resume is already in progress, causing each operation to wait on the other.
What is the relevant remediation described by the fix?
The fix replaces pm_runtime_get_sync()/pm_runtime_put_sync() in smp_execute_task_sg() with pm_runtime_get_noresume()/pm_runtime_put(). This prevents the SMP command from attempting a synchronous host resume while still preventing autosuspend during the command.