Use-after-free vulnerability in libsubcmd

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1000313: libsubcmd: Fix use-after-free for realloc(..., 0). Affects Kernel versions >= 2f4ce5ec1d447beb42143a9653716a2ab025161e, < e89bb266b710ce056f141f29f091fd468a4a8185. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The libsubcmd package is a library that provides subcommand handling functionality for various applications. It is commonly used in the Linux Kernel. This vulnerability affects the package and can lead to a use-after-free scenario when reallocating memory with a size of 0.

Vulnerability Detail

The use-after-free vulnerability in libsubcmd occurs when reallocating memory with a size of 0. This can result in a dangling pointer, where the memory is freed but still accessible. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial-of-service by manipulating the freed memory. The vulnerability was introduced in version v4.5 of the Linux Kernel and is fixed in version v4.14.268.

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 specific workaround available for this vulnerability. Updating to the patched version of the Linux Kernel is the recommended solution.

Conclusion

The use-after-free vulnerability in libsubcmd can be mitigated by updating the Linux Kernel to version v4.14.268 or later. This update includes the necessary fix for the 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 that provides subcommand handling functionality for various applications, including the Linux Kernel.

A use-after-free vulnerability occurs when memory is freed but still accessed, leading to potential exploitation or crashes.

An attacker could exploit this vulnerability by manipulating the freed memory to execute arbitrary code or cause a denial-of-service.

The vulnerability was introduced in version v4.5 of the Linux Kernel and is fixed in version v4.14.268.

No, updating to the patched version of the Linux Kernel is the recommended solution.

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