Bug 2164424 (CVE-2022-4696)

Summary: CVE-2022-4696 kernel: user-after-free during IORING_OP_SPLICE operation
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, bhu, chwhite, crwood, ddepaula, debarbos, dfreiber, dhoward, dvlasenk, ezulian, fhrbata, hkrzesin, jarod, jburrell, jfaracco, jferlan, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, kernel-mgr, lgoncalv, lleshchi, lzampier, nmurray, ptalbert, qzhao, rogbas, rvrbovsk, scweaver, tyberry, vkumar, walters, williams
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 use-after-free flaw was found in the io_uring subsystem of the Linux kernel. This issue occurs during the IORING_OP_SPLICE operation due to a missing IO_WQ_WORK_FILES flag, leading to an invalid decrease of its reference counter and later causing the use-after-free vulnerability. This flaw allows a local user to crash or potentially escalate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-27 23:52:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2164425    
Bug Blocks: 2160255    

Description Mauro Matteo Cascella 2023-01-25 14:13:04 UTC
A use-after-free vulnerability was found in the Linux kernel through io_uring and the IORING_OP_SPLICE operation. IORING_OP_SPLICE is missing the IO_WQ_WORK_FILES flag, which signals that the operation won't use current->nsproxy, so its reference counter is not increased. This assumption is not always true as calling io_splice on specific files will call the get_uts function which will use current->nsproxy leading to invalidly decreasing its reference counter later causing the use-after-free vulnerability.

Upstream commit:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=75454b4bbfc7e6a4dd8338556f36ea9107ddf61a

Comment 1 Mauro Matteo Cascella 2023-01-25 14:13:33 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2164425]

Comment 3 Justin M. Forbes 2023-01-25 14:40:09 UTC
This was fixed for Fedora with the 5.12 rebases.

Comment 4 Product Security DevOps Team 2023-01-27 23:52:09 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-4696