Use-After-Free Vulnerability in libsubcmd

Kernel Updated 02 Oct 2025

Summary

27/02/2022
N/A
No i
Unrated
Not published

GSD-2022-1000468: libsubcmd: Fix use-after-free for realloc(..., 0). Affects Kernel versions >= 2f4ce5ec1d447beb42143a9653716a2ab025161e, < f8ba235c4927b5f970c868ac101ec42ca16c183a. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libsubcmd is a library used in the Linux Kernel for handling subcommands. It provides functions for parsing and executing subcommands within a larger command-line interface. The library is an integral part of the Linux Kernel and is widely used in various Linux distributions. However, a use-after-free vulnerability has been discovered in libsubcmd, which can lead to potential security issues.

Vulnerability Detail

The use-after-free vulnerability in libsubcmd occurs when the realloc function is called with a size of 0. This can result in a use-after-free condition, where a pointer to a previously freed memory block is still being accessed. An attacker could potentially exploit this vulnerability to execute arbitrary code, escalate privileges, or cause a denial-of-service condition. The vulnerability was introduced in version 4.5 of the Linux Kernel and has been fixed in version 5.15.25.

How To Fix

No fixed version is published for this vulnerability.

To fix this vulnerability, it is recommended to update the Linux Kernel to version 5.15.25 or later. This can be done by applying the necessary patches or upgrading to a Linux distribution that includes the fixed version of the Kernel. It is important to keep the Kernel up to date to ensure the security and stability of the system.

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

Workaround

There is no known workaround for this vulnerability. It is essential to apply the fix by updating the Linux Kernel.

Conclusion

The use-after-free vulnerability in libsubcmd can pose a significant security risk to systems running the affected versions of the Linux Kernel. It is crucial to update the Kernel to version 5.15.25 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

libsubcmd is a library used in the Linux Kernel for handling subcommands within a command-line interface.

A use-after-free vulnerability occurs when a program continues to use a pointer to a memory block that has already been freed. This can lead to various security issues.

An attacker can exploit this vulnerability by crafting malicious input that triggers the use-after-free condition. This can allow them to execute arbitrary code, escalate privileges, or cause a denial-of-service condition.

This vulnerability was introduced in version 4.5 of the Linux Kernel.

Yes, this vulnerability has been fixed in version 5.15.25 of the Linux Kernel.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

To fix this vulnerability, it is recommended to update the Linux Kernel to version 5.15.25 or later. This can be done by applying the necessary patches or upgrading to a Linux distribution that includes the fixed version of the Kernel. It is important to keep the Kernel up to date to ensure the security and stability of the system.

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

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.