CVE-2022-49053
Published: 26 February 2025
Description
In the Linux kernel, the following vulnerability has been resolved: scsi: target: tcmu: Fix possible page UAF tcmu_try_get_data_page() looks up pages under cmdr_lock, but it does not take refcount properly and just returns page pointer. When tcmu_try_get_data_page() returns, the returned page may have been freed by tcmu_blocks_release(). We need to get_page() under cmdr_lock to avoid concurrent tcmu_blocks_release().
Security Summary
CVE-2022-49053 is a use-after-free (UAF) vulnerability in the Linux kernel's SCSI target tcmu (target core multi-user) component. The issue arises in the tcmu_try_get_data_page() function, which looks up pages under cmdr_lock but fails to properly increment the page refcount before returning the page pointer. As a result, the page may be concurrently freed by tcmu_blocks_release() after the function returns, leading to a potential UAF condition. This flaw is classified under CWE-416 and carries a CVSS v3.1 base score of 7.8.
A local attacker with low privileges can exploit this vulnerability due to its low attack complexity, local access vector, and lack of required user interaction. Successful exploitation could result in high impacts on confidentiality, integrity, and availability, potentially allowing arbitrary code execution, data corruption, or system crashes within the kernel context.
Mitigation involves applying the relevant stable kernel patches, as detailed in the provided commit references. These patches resolve the issue by ensuring get_page() is called under cmdr_lock to properly handle refcounts and prevent concurrent freeing by tcmu_blocks_release(). Systems running affected Linux kernel versions with tcmu enabled should update to a patched kernel.
Details
- CWE(s)