Bug 2065662 (CVE-2021-45868)

Summary: CVE-2021-45868 kernel: fs/quota/quota_tree.c does not validate the block number in the quota tree
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bhu, bskeggs, chwhite, crwood, dhoward, dvlasenk, fhrbata, hdegoede, hkrzesin, jarod, jarodwilson, jburrell, jeremy, jfaracco, 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, steved, 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 vulnerability was found in the Linux kernel. The quota mechanism doesn't properly validate the quota block number, triggering a use-after-free bug in the RWSem code, leading to a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-19 13:56:20 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: 2103252    
Bug Blocks: 2065663    

Description Pedro Sampaio 2022-03-18 12:38:11 UTC
In the Linux kernel before 5.15.3, fs/quota/quota_tree.c does not validate the block number in the quota tree (on disk). This can, for example, lead to a kernel/locking/rwsem.c use-after-free if there is a corrupted quota file.

References:

https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.3
https://www.openwall.com/lists/oss-security/2022/03/17/2
https://www.openwall.com/lists/oss-security/2022/03/17/1
https://bugzilla.kernel.org/show_bug.cgi?id=214655
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9bf3d20331295b1ecb81f4ed9ef358c51699a050

Comment 2 Marco Benatto 2022-07-01 19:58:44 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2103252]

Comment 3 Justin M. Forbes 2022-07-01 21:24:16 UTC
This was fixed for Fedora with the 5.14.19 stable kernel updates.