Linux Kernel ext4 Filesystem Use-After-Free Vulnerability in Directory Rename Operation

Vulnerability

A use-after-free vulnerability has been identified in the ext4 filesystem component of the Linux kernel. This issue arises during the directory renaming process, specifically in the 'ext4_rename_dir_prepare' function. The vulnerability occurs when the filesystem is mounted without a journal, leading to improper handling of directory entries. As a result, an illegal parent entry can be accessed, causing a memory corruption issue.

Impact

Exploitation of this vulnerability leads to a use-after-free condition, which can commonly result in arbitrary code execution or memory corruption.

Reproduction

The vulnerability can be reproduced by mounting an ext4 filesystem without a journal and then performing a rename operation that triggers the 'ext4_rename_dir_prepare' function. This sequence of actions will expose the use-after-free flaw by accessing a freed memory address, as indicated by the kernel's AddressSanitizer (KASAN) error report.

Remediation

Users should ensure that ext4 filesystems are mounted with journaling enabled to prevent this vulnerability. Additionally, updating to a patched version of the Linux kernel is recommended.

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.