Linux Kernel Btrfs Tree Modification Log Vulnerability Leading to Kernel Panic

Vulnerability

A vulnerability in the Linux kernel's Btrfs file system has been identified, related to improper handling of reallocated nodes in the tree modification log. This issue can cause a kernel panic, with the error 'kernel BUG at fs/btrfs/tree-mod-log.c:677' indicating an invalid opcode. The vulnerability arises when the system incorrectly replays tree modification operations for a block that should not have been processed, particularly during 'KEY_REPLACE' and 'KEY_REMOVE_WHILE_FREEING' operations. This mismanagement can lead to a crash by triggering a bug in the tree modification log handling.

Impact

Exploitation of this vulnerability causes a kernel panic, leading to a system crash.

Reproduction

The vulnerability can be reproduced by performing a sequence of operations that involve modifying Btrfs tree roots and reallocating nodes. This process should include removing items from a root node, triggering 'KEY_REPLACE' operations, and then reallocating nodes to a different root, which causes the tree modification log to mishandle the reallocated nodes, ultimately leading to a kernel panic.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
4.3
remediation
0.0
relevance
0.0
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.