Bug 2026487 (CVE-2021-4148)

Summary: CVE-2021-4148 kernel: Improper implementation of block_invalidatepage() allows users to crash the kernel
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, aquini, bhu, brdeoliv, bskeggs, chwhite, crwood, dhoward, dvlasenk, fhrbata, fpacheco, hdegoede, hkrzesin, jarod, jarodwilson, jburrell, jeremy, jforbes, jglisse, jlelli, jonathan, josef, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, masami256, mchehab, nmurray, ptalbert, qzhao, rkeshri, rvrbovsk, steved, vkumar, walters, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.14.16 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in the Linux kernel's block_invalidatepage in fs/buffer.c in the filesystem. A missing sanity check may allow a local attacker with user privilege to cause a denial of service (DOS) problem.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-18 06:02:46 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: 2034507, 2034508, 2034509, 2034510    
Bug Blocks: 2026492, 2034660    

Description Pedro Sampaio 2021-11-24 20:06:50 UTC
In the Linux kernel before 5.15, improper implementation of block_invalidatepage() allows users to crash the kernel. As long as the page passed to block_invalidatepage() is a huge page and the length is the size of the huge page instead of a single page due to read-only FS THP support, the operation would throw BUG if the size is greater than a single page. Furthermore, all the implementations that are *NOT* THP aware and hardcoded PAGE_SIZE can trigger BUG(), like block_invalidatepage().

References:

https://lkml.org/lkml/2021/9/17/1037
https://lkml.org/lkml/2021/9/12/323

Comment 4 Rohit Keshri 2021-12-21 07:45:11 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2034507]

Comment 11 Justin M. Forbes 2022-03-16 16:28:28 UTC
This issue was fixed for Fedora with the 5.14.16 stable kernel updates.