CVE-2022-50818
Race Condition in Linux pm8001 SCSI Driver Causing System Hang
Publication date: 2025-12-30
Last updated on: 2025-12-30
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is in the Linux kernel's SCSI pm8001 driver. It occurs because the running_req counter, which tracks active commands per device, is not properly decremented when internal abort commands complete. This causes the system to hang when disabling the remote phy for a SATA disk, as the running_req never reaches zero and the system cannot make progress, leading to blocked tasks and potential system hangs.
How can this vulnerability impact me? :
The vulnerability can cause the Linux system to hang or become unresponsive when disabling the remote phy for a SATA disk. This happens because the internal abort commands do not properly decrement the running_req counter, causing tasks to block indefinitely and potentially leading to system instability or downtime.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by observing system logs for hangs or blocked tasks related to SATA disks when disabling the remote phy. Specifically, checking the contents of /sys/class/sas_phy/phy-0:0:8/target_port_protocols to see if it shows 'sata', and then disabling the phy by echoing 0 to /sys/class/sas_phy/phy-0:0:8/enable. Afterwards, monitor the kernel logs (e.g., using dmesg) for messages indicating synchronization failures, disk stopping errors, and hung tasks such as 'task kworker/u192:1 blocked for more than 30 seconds'. Example commands include: more /sys/class/sas_phy/phy-0:0:8/target_port_protocols echo 0 > /sys/class/sas_phy/phy-0:0:8/enable dmesg | tail -n 50
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves avoiding disabling the remote phy for SATA disks, as this triggers the hang condition. Additionally, updating the Linux kernel to a version that includes the fix for the pm8001 driver (which properly decrements running_req for internal abort commands) will resolve the issue.