Linux Kernel ext2 DAX Handling Vulnerability Leading to Kernel Panic

Vulnerability

A vulnerability in the Linux kernel's ext2 file system handling with DAX (Direct Access) enabled has been identified. When the 'ext2_setsize' function receives a length that is page-aligned, it incorrectly processes the zero-length range, leading to a kernel panic. This issue arises because the 'dax_zero_range' function is called with a length of zero, causing the 'ext2_get_blocks' function to encounter a 'BUG_ON' condition. The vulnerability can be triggered by creating a file with a specific block size and then truncating it to zero, which exploits the misalignment in DAX operations.

Impact

Exploiting this vulnerability causes a kernel panic, disrupting system operations and potentially leading to a denial of service.

Reproduction

The vulnerability can be reproduced on a file system that has DAX enabled, particularly on a persistent memory device. First, create a file by writing from '/dev/zero' with a block size of 512 bytes. After the file is created, truncate its size to zero. This sequence of actions will trigger the vulnerability, as the 'ext2_setsize' function will receive a page-aligned length, causing the kernel to panic.

Remediation

Users can upgrade to the latest stable version of the Linux kernel where this vulnerability has been addressed. Instructions for downloading the patched version are available on the official Linux kernel website.

Added: Sep 16, 2025, 5:42 PM
Updated: Sep 16, 2025, 5:42 PM

Vulnerability Rating

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