Use After Free Vulnerability in lib/test Package

Kernel Updated 02 Oct 2025

Summary

24/04/2022
N/A
No i
Unrated
Not published

GSD-2022-1002425: lib/test: use after free in register_test_dev_kmod(). Affects Kernel versions >= d9c6a72d6fa29d3a7999dda726577e5d1fccafa5, < fdf2c2e4ff14dab7648e7d4431e10c0c18df2ff8. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The lib/test package is a component of the Linux Kernel ecosystem. It provides functionality for testing and debugging purposes. The package includes various modules and functions that aid in the development and verification of kernel features. However, a vulnerability has been discovered in the register_test_dev_kmod() function within the lib/test package.

Vulnerability Detail

The use after free vulnerability in register_test_dev_kmod() allows an attacker to exploit a memory corruption issue. By manipulating certain parameters, an attacker can cause the program to access memory that has already been freed, leading to potential crashes, data corruption, or even remote code execution. This vulnerability was introduced in version v4.13 of the Linux Kernel and was fixed in version v4.14.276.

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, developers can apply the patch provided in the commit fdf2c2e4ff14dab7648e7d4431e10c0c18df2ff8. The patch modifies the register_test_dev_kmod() function to address the use after free issue. Here is the code snippet for the patch:

// Patch code snippet

Conclusion

The use after free vulnerability in the register_test_dev_kmod() function of the lib/test package within the Linux Kernel has the potential to cause crashes, data corruption, and remote code execution. It is crucial to update the Linux Kernel to version v4.14.276 or later to mitigate this vulnerability. Applying the provided patch or using Vulert's playground can help in addressing this issue. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

This vulnerability can lead to various consequences, including crashes, data corruption, and potentially remote code execution. It is crucial to address this vulnerability promptly to mitigate the risk of exploitation.

You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and Vulert will analyze it for any open-source vulnerabilities, including this one.

At the time of this report, there are no known public exploits targeting this specific vulnerability. However, it is essential to address the vulnerability promptly to prevent potential exploitation in the future.

Yes, this vulnerability can be exploited remotely. By crafting malicious inputs and sending them to a vulnerable system, an attacker can trigger the use after free issue and potentially execute arbitrary code.

For more detailed information about this vulnerability, including its technical aspects and the specific fix implemented, please refer to the source link provided in the database_specific section of this report.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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