Memory Leak Vulnerability in tracing/histogram Package

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1000606: tracing/histogram: Fix a potential memory leak for kstrdup(). Affects Kernel versions >= d380dcde9a07ca5de4805dee11f58a98ec0ad6ff, < df86e2fe808c3536a9dba353cc2bebdfea00d0cf. 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 tracing/histogram package is a component of the Linux Kernel, which is responsible for collecting and analyzing various system events. It provides functionality for creating histograms to visualize the distribution of event data. The package is widely used in Linux-based systems and plays a crucial role in performance monitoring and debugging. However, a vulnerability has been discovered in the package that can lead to a memory leak.

Vulnerability Detail

The vulnerability in the tracing/histogram package arises from a potential memory leak when using the kstrdup() function. This function is used to duplicate a string in kernel space, but it fails to release the allocated memory in certain scenarios. As a result, repeated invocations of kstrdup() without freeing the memory can lead to a gradual depletion of system resources. If exploited, this vulnerability could cause system instability, performance degradation, and potentially even denial-of-service conditions.

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 manually release the allocated memory by calling the kfree() function after each invocation of kstrdup(). Here is an example code snippet:

char *duplicate_string(const char *str) {
    char *dup_str = kstrdup(str, GFP_KERNEL);
    if (dup_str) {
        // Use the duplicated string
        ...
        // Free the allocated memory
        kfree(dup_str);
    }
    return dup_str;
}

Conclusion

In conclusion, the tracing/histogram package in the Linux Kernel is vulnerable to a memory leak issue when using the kstrdup() function. This vulnerability can have significant impacts on system stability and performance. It is crucial to update the kernel to version v5.16.5 or later to fix the issue. Additionally, developers can apply a temporary workaround by manually freeing the allocated memory. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

If exploited, this vulnerability can lead to a gradual depletion of system resources, causing system instability, performance degradation, and potentially even denial-of-service conditions.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it in real-time.

Yes, the vulnerability has been fixed in Linux Kernel version v5.16.5. It is recommended to update your kernel to this version or a later one to mitigate the issue.

Yes, a temporary workaround is to manually release the allocated memory by calling the kfree() function after each invocation of kstrdup(). However, it is still recommended to update the kernel to the fixed version.

This vulnerability was discovered by an automated security analysis tool and reported to the Linux Kernel security team.

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