Skip to main content

CVE-2022-48791: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-48791cvecve-2022-48791
Published: Tue Jul 16 2024 (07/16/2024, 11:43:47 UTC)
Source: CVE
Vendor/Project: Linux
Product: 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.

AI-Powered Analysis

AILast updated: 06/30/2025, 21:27:22 UTC

Technical Analysis

CVE-2022-48791 is a use-after-free vulnerability identified in the Linux kernel's SCSI subsystem, specifically within the pm8001 driver which handles SAS (Serial Attached SCSI) devices. The flaw arises when a Task Management Function (TMF) sas_task is aborted due to a timeout before the I/O completion handler mpi_ssp_completion() processes the completion event. When the timeout occurs, the SAS_TASK_STATE_ABORTED flag is set and the sas_task structure is freed in the function pm8001_exec_internal_tmf_task(). However, if the I/O completion event arrives after the sas_task has been freed, the completion handler still attempts to access the now-invalid sas_task pointer, leading to a use-after-free condition. This can cause undefined behavior including kernel crashes or potential escalation of privileges if exploited. The fix involves clearing the ccb->task pointer when the TMF times out, ensuring that the I/O completion handler does not operate on a freed sas_task. This vulnerability affects Linux kernel versions containing the specified commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and is relevant to systems using the pm8001 SAS driver for storage devices. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to servers and infrastructure running Linux kernels with the pm8001 SAS driver enabled, which is common in enterprise storage environments. Exploitation could lead to kernel crashes causing denial of service or potentially allow attackers to execute arbitrary code with kernel privileges, compromising system confidentiality, integrity, and availability. This is particularly critical for data centers, cloud service providers, and industries relying on high-availability storage systems such as finance, healthcare, and telecommunications. The use-after-free condition could be triggered remotely if an attacker can induce TMF aborts and I/O completions, but exploitation complexity is moderate due to the need for specific hardware and timing conditions. Nonetheless, the impact on critical infrastructure and sensitive data could be significant if exploited.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel to a version that includes the patch fixing CVE-2022-48791. Since no patch links are provided, monitoring official Linux kernel repositories and vendor advisories for updates to the pm8001 driver is essential. Additionally, organizations should audit their systems to identify the presence of pm8001 SAS devices and assess exposure. Implementing kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and enabling kernel lockdown modes can reduce exploitation risk. Monitoring system logs for unusual TMF aborts or kernel errors related to SAS tasks can provide early detection. In environments where immediate patching is not feasible, isolating affected systems or limiting access to storage management interfaces may reduce attack surface. Collaboration with hardware vendors for firmware updates and guidance is also recommended.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-07-16T11:38:08.893Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982ec4522896dcbe619e

Added to database: 5/21/2025, 9:09:02 AM

Last enriched: 6/30/2025, 9:27:22 PM

Last updated: 7/29/2025, 3:59:19 AM

Views: 9

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats