ext4: Fix Use-After-Free in ext4_rename_dir_prepare

Kernel Updated 02 Oct 2025

Summary

28/06/2022
N/A
No i
Unrated
Not published

GSD-2022-1004047: ext4: fix use-after-free in ext4_rename_dir_prepare. Affects Kernel versions < 1a3a15bf6f9963d755270cbdb282863b84839195. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The ext4 package is a file system driver for the Linux Kernel. It provides support for the fourth extended file system (ext4) and is widely used in Linux distributions. The ext4 file system is known for its performance, scalability, and reliability. However, a vulnerability has been discovered in the ext4_rename_dir_prepare function, which can lead to a use-after-free condition. This vulnerability can potentially be exploited by an attacker to execute arbitrary code or cause a denial-of-service (DoS) attack.

Vulnerability Detail

The vulnerability in ext4_rename_dir_prepare arises from a use-after-free condition. This occurs when the function attempts to rename a directory and encounters an error during the process. If the error occurs after the function has already freed the memory associated with the directory, it may result in a use-after-free vulnerability. An attacker can potentially exploit this vulnerability by carefully crafting a malicious input that triggers the error condition and then manipulating the freed memory to execute arbitrary code or disrupt the normal operation of the system. The impact of this vulnerability can range from privilege escalation to system crashes or even remote code execution.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, users can apply patches or backports provided by their Linux distribution to address the vulnerability without updating the entire kernel. The specific steps for applying patches or backports may vary depending on the Linux distribution being used. Users are advised to consult the documentation and support channels of their Linux distribution for guidance on applying patches or backports.

Conclusion

The ext4 package in the Linux Kernel is vulnerable to a use-after-free vulnerability in the ext4_rename_dir_prepare function. This vulnerability can be exploited by an attacker to execute arbitrary code or cause a denial-of-service attack. Users are strongly recommended to update their Linux Kernel to version v4.9.318 or later to mitigate this vulnerability. Alternatively, they can apply patches or backports provided by their Linux distribution. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

ext4 is a file system driver for the Linux Kernel that provides support for the fourth extended file system (ext4). It is widely used in Linux distributions due to its performance, scalability, and reliability.

A use-after-free vulnerability occurs when a program or function continues to use a memory address after it has been freed. This can lead to memory corruption, crashes, or the execution of arbitrary code.

An attacker can exploit this vulnerability by triggering the error condition in the ext4_rename_dir_prepare function and manipulating the freed memory to execute arbitrary code or disrupt the normal operation of the system.

The impact of this vulnerability can range from privilege escalation to system crashes or even remote code execution.

To fix this vulnerability, users are advised to update their Linux Kernel to version v4.9.318 or later. Alternatively, they can apply patches or backports provided by their Linux distribution.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback