CVE-2022-48792 scsi: pm8001: Fix use-after-free for aborted SSP/STP sas_task
A use-after-free in the Linux kernel's pm8001 SCSI driver allows attackers to potentially execute code or escalate privileges via aborted SAS tasks.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-48792?
CVE-2022-48792 is a high-severity use after free vulnerability in Linux kernel, published on 16 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
scsi: pm8001: Fix use-after-free for aborted SSP/STP sas_task
Currently a use-after-free may occur if a sas_task is aborted by the upper layer before we handle the I/O completion in mpi_ssp_completion() or mpi_sata_completion().
In this case, the following are the two steps in handling those I/O completions:
- Call complete() to inform the upper layer handler of completion of the I/O.
- Release driver resources associated with the sas_task in pm8001_ccb_task_free() call.
When complete() is called, the upper layer may free the sas_task. As such, we should not touch the associated sas_task afterwards, but we do so in the pm8001_ccb_task_free() call.
Fix by swapping the complete() and pm8001_ccb_task_free() calls ordering.
Weakness: CWE-416
Which versions are affected by CVE-2022-48792?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-48792?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2022-48792 being exploited?
There is no known exploitation of CVE-2022-48792 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-48792, GHSA-x9wp-3948-xg4x, UBUNTU-CVE-2022-48792.