Bug 2348002 (CVE-2022-49053)

Summary: CVE-2022-49053 kernel: scsi: target: tcmu: Fix possible page UAF
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel’s SCSI target core, specifically in the TCMU (Target Core User) subsystem. The function tcmu_try_get_data_page() failed to increment the reference count on memory pages it retrieves. This allowed a use-after-free condition if another thread freed the page via tcmu_blocks_release() while it was still in use. A local, unprivileged user could exploit this flaw to trigger kernel memory corruption or a system crash. Systems using TCMU-backed SCSI targets are affected. The highest threat from this vulnerability is to system availability, with a potential risk to confidentiality and integrity depending on exploitation context.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-02-26 03:14:11 UTC
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().

Comment 1 Avinash Hanwate 2025-02-26 14:17:35 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022652-CVE-2022-49053-a1fe@gregkh/T

Comment 4 Avinash Hanwate 2025-02-26 18:27:47 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022652-CVE-2022-49053-a1fe@gregkh/T