Use-after-free vulnerability in libsubcmd

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1000296: libsubcmd: Fix use-after-free for realloc(..., 0). Affects Kernel versions >= 2f4ce5ec1d447beb42143a9653716a2ab025161e, < 3c5ba8d82f5c4df4fbe30e6c5fff49853dad19d1. 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 the kernel. 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 could potentially lead to security breaches and system instability.

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 exploit this vulnerability to execute arbitrary code, escalate privileges, or cause a denial-of-service condition. The vulnerability was introduced in version v4.5 of the Linux Kernel and has been fixed in version v4.9.303.

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

There is no known workaround for this vulnerability. It is crucial to apply the fix by updating the Linux Kernel to a version that includes the patch.

Conclusion

The use-after-free vulnerability in libsubcmd can have serious security implications and system instability. It is crucial to update the Linux Kernel to a version that includes the fix to mitigate the risk. For further support and assistance in 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. It provides functions for parsing and executing subcommands within the kernel.

A use-after-free vulnerability occurs when a program continues to use a pointer to a memory block after it has been freed. This can lead to memory corruption, crashes, and potential security vulnerabilities.

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.

The vulnerability was introduced in version v4.5 of the Linux Kernel.

Yes, the vulnerability has been fixed in version v4.9.303 of the Linux Kernel.

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