CVE-2022-50021 Information
Description
In the Linux kernel the following vulnerability has been resolved:
ext4: block range must be validated before use in ext4_mb_clear_bb()
Block range to free is validated in ext4_free_blocks() using ext4_inode_block_valid() and then it’s passed to ext4_mb_clear_bb(). However in some situations on bigalloc file system the range might be adjusted after the validation in ext4_free_blocks() which can lead to troubles on corrupted file systems such as one found by syzkaller that resulted in the following BUG
kernel BUG at fs/ext4/ext4.h:3319!
PREEMPT SMP NOPTI
CPU: 28 PID: 4243 Comm: repro Kdump: loaded Not tainted 5.19.0-rc6+ 1
Hardware name: QEMU Standard PC (Q35 + ICH9 2009) BIOS 1.15.0-1.fc35 04/01/2014
RIP: 0010:ext4_free_blocks+0x95e/0xa90
Call Trace:
Fix it by making sure that the block range is properly validated before used every time it changes in ext4_free_blocks() or ext4_mb_clear_bb().
Reference
https://git.kernel.org/stable/c/1e1c2b86ef86a8477fd9b9a4f48a6bfe235606f6 https://git.kernel.org/stable/c/560a2744cbbf03cac65a6394f9b0d99aa437c867 https://git.kernel.org/stable/c/7550aade978371ac582f6d43b14c4cb89ca54463 https://git.kernel.org/stable/c/a2522041d248a8c969cbbc97e1fc2cd8b4de120d
Related CNNVD
CNNVD-202506-2308 (Published: 2025-06-18)
Share on: