Linux Kernel ext4 Preallocation Management Rbtree Traversal Bug

Vulnerability

A bug in the Linux kernel's ext4 file system has been fixed, addressing an issue with how preallocations were managed in the per-inode red-black tree. During allocation, the system couldn't traverse the tree directly because the 'ext4_mb_discard_group_preallocation()' function could simultaneously mark preallocations as deleted, causing some entries to be skipped. This oversight led to a 'BUG_ON()' error when a needed preallocation was missed, forcing the system to create a new one that overlapped with the missed entry. The fix involves a more reliable traversal method that maintains performance while ensuring no preallocations are overlooked.

Impact

The vulnerability could cause the system to miss important preallocation entries, leading to overlapping allocations and potential data management issues.

Reproduction

The vulnerability could be reproduced by triggering the 'ext4_mb_use_preallocated' function during file allocations, while the 'ext4_mb_discard_group_preallocation' function is also running. This would cause the red-black tree traversal to skip over some preallocation entries, leading to the 'BUG_ON()' error when a needed preallocation was missed.

Remediation

Users can update to the latest version of the Linux kernel where this bug has been fixed.

Added: Dec 9, 2025, 1:29 AM
Updated: Dec 9, 2025, 1:29 AM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
5.7
remediation
7.7
relevance
1.3
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.