# CVE-2022-48791: scsi: pm8001: Fix use-after-free for aborted TMF sas_task

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-07-16T11:43:47.211Z
- Modified: 2026-08-05T08:52:21.770Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

scsi: pm8001: Fix use-after-free for aborted TMF sas_task

Currently a use-after-free may occur if a TMF sas_task is aborted before we
handle the IO completion in mpi_ssp_completion(). The abort occurs due to
timeout.

When the timeout occurs, the SAS_TASK_STATE_ABORTED flag is set and the
sas_task is freed in pm8001_exec_internal_tmf_task().

However, if the I/O completion occurs later, the I/O completion still
thinks that the sas_task is available. Fix this by clearing the ccb->task
if the TMF times out - the I/O completion handler does nothing if this
pointer is cleared.

(As written by CVE List.)

## Affected

- Linux Linux: from 968ee9176a4489ce6d5ee54ff88dadfbff9b95f4 before d872e7b5fe38f325f5206b6872746fa02c2b4819; from d712d3fb484b7fa8d1d57e9ca6f134bb9d8c18b1 before 3c334cdfd94945b8edb94022a0371a8665b17366; from d712d3fb484b7fa8d1d57e9ca6f134bb9d8c18b1 before 510b21442c3a2e3ecc071ba3e666b320e7acdd61; from d712d3fb484b7fa8d1d57e9ca6f134bb9d8c18b1 before 61f162aa4381845acbdc7f2be4dfb694d027c018; fa3c19ceaa8b4b7c29d710c2c407df57d256a6c5; from 5.10.61 before 5.10.102; from 5.13.13 before 5.14; 5.14 (not affected: before 5.14; from 5.10.102 up to 5.10.*; from 5.15.25 up to 5.15.*; from 5.16.11 up to 5.16.*; from 5.17 up to *)
- linux linux_kernel: before 5.10.102; from 5.11 before 5.15.25; from 5.16 before 5.16.11

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/d872e7b5fe38f325f5206b6872746fa02c2b4819> (patch)
- <https://git.kernel.org/stable/c/3c334cdfd94945b8edb94022a0371a8665b17366> (patch)
- <https://git.kernel.org/stable/c/510b21442c3a2e3ecc071ba3e666b320e7acdd61> (patch)
- <https://git.kernel.org/stable/c/61f162aa4381845acbdc7f2be4dfb694d027c018> (patch)

## Sources

- CVE List: [CVE-2022-48791](https://www.cve.org/CVERecord?id=CVE-2022-48791), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2022-48791](https://nvd.nist.gov/vuln/detail/CVE-2022-48791), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2022-48791 · Whole record: https://cve.day/CVE-2022-48791.json · Rebuilt by cve.day 2026-11-25T22:58:19.883Z
