CVE-2022-50818
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
30/12/2025
Last modified:
31/12/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
scsi: pm8001: Fix running_req for internal abort commands<br />
<br />
Disabling the remote phy for a SATA disk causes a hang:<br />
<br />
root@(none)$ more /sys/class/sas_phy/phy-0:0:8/target_port_protocols<br />
sata<br />
root@(none)$ echo 0 > sys/class/sas_phy/phy-0:0:8/enable<br />
root@(none)$ [ 67.855950] sas: ex 500e004aaaaaaa1f phy08 change count has changed<br />
[ 67.920585] sd 0:0:2:0: [sdc] Synchronizing SCSI cache<br />
[ 67.925780] sd 0:0:2:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=0x04 driverbyte=DRIVER_OK<br />
[ 67.935094] sd 0:0:2:0: [sdc] Stopping disk<br />
[ 67.939305] sd 0:0:2:0: [sdc] Start/Stop Unit failed: Result: hostbyte=0x04 driverbyte=DRIVER_OK<br />
...<br />
[ 123.998998] INFO: task kworker/u192:1:642 blocked for more than 30 seconds.<br />
[ 124.005960] Not tainted 6.0.0-rc1-205202-gf26f8f761e83 #218<br />
[ 124.012049] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.<br />
[ 124.019872] task:kworker/u192:1 state:D stack:0 pid: 642 ppid: 2 flags:0x00000008<br />
[ 124.028223] Workqueue: 0000:04:00.0_event_q sas_port_event_worker<br />
[ 124.034319] Call trace:<br />
[ 124.036758] __switch_to+0x128/0x278<br />
[ 124.040333] __schedule+0x434/0xa58<br />
[ 124.043820] schedule+0x94/0x138<br />
[ 124.047045] schedule_timeout+0x2fc/0x368<br />
[ 124.051052] wait_for_completion+0xdc/0x200<br />
[ 124.055234] __flush_workqueue+0x1a8/0x708<br />
[ 124.059328] sas_porte_broadcast_rcvd+0xa8/0xc0<br />
[ 124.063858] sas_port_event_worker+0x60/0x98<br />
[ 124.068126] process_one_work+0x3f8/0x660<br />
[ 124.072134] worker_thread+0x70/0x700<br />
[ 124.075793] kthread+0x1a4/0x1b8<br />
[ 124.079014] ret_from_fork+0x10/0x20<br />
<br />
The issue is that the per-device running_req read in<br />
pm8001_dev_gone_notify() never goes to zero and we never make progress.<br />
This is caused by missing accounting for running_req for when an internal<br />
abort command completes.<br />
<br />
In commit 2cbbf489778e ("scsi: pm8001: Use libsas internal abort support")<br />
we started to send internal abort commands as a proper sas_task. In this<br />
when we deliver a sas_task to HW the per-device running_req is incremented<br />
in pm8001_queue_command(). However it is never decremented for internal<br />
abort commnds, so decrement in pm8001_mpi_task_abort_resp().



