Bug 2116175 (CVE-2022-2590)

Summary: CVE-2022-2590 kernel: unprivileged tampering of shmem files
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bdettelb, bhu, brdeoliv, bskeggs, chwhite, crwood, ddepaula, debarbos, dhoward, dvlasenk, fhrbata, hdegoede, hkrzesin, hpa, jarod, jarodwilson, jburrell, jfaracco, jferlan, jforbes, jglisse, jlelli, joe.lawrence, jonathan, josef, jshortt, jstancek, jwboyer, jwyatt, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, lzampier, masami256, mchehab, nmurray, ptalbert, qzhao, rvrbovsk, scweaver, security-response-team, steved, 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 race condition was found in the way the Linux kernel's memory subsystem handled the copy-on-write (COW) breakage of private read-only shared memory mappings. This flaw allows an unprivileged, local user to gain write access to read-only memory mappings, increasing their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-31 22:55:53 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: 2116176, 2116177, 2116178, 2116179, 2116301, 2116469    
Bug Blocks: 2112587    

Description Alex 2022-08-07 19:16:44 UTC
A race condition was found in the way Linux kernel's memory subsystem handled breakage of the read only private mappings COW (copy-on-write mapping) situation on write access.
This is new privilege escalation issue, similar to Dirty COW (CVE-2016-5195), but it's limited to shmem only.
The user can corrupt only shared memory (shmem / tmpfs), so this issue could be considered less severe, than CVE-2016-5195.

An unprivileged local user could use this flaw to gain write access to otherwise read only memory mappings and thus increase their privileges on the system.

Fixes: 9ae0f87d009c ("mm/shmem: unconditionally set pte dirty in mfill_atomic_install_pte").
that is part of upstream Linux since v5.16.

Comment 6 Alex 2022-08-08 14:58:23 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2116469]

Comment 9 Product Security DevOps Team 2022-08-31 22:55:48 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-2590

Comment 10 Justin M. Forbes 2022-09-20 14:33:34 UTC
This is fixed for Fedora in the 5.19.6 stable kernel updates.