Memory Leak in ab8500_fg_sysfs_init in Kernel

Kernel Updated 02 Oct 2025

Summary

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

GSD-2022-1001231: power: supply: ab8500: Fix memory leak in ab8500_fg_sysfs_init. Affects Kernel versions >= 8c0984e5a75337df513047ec92a6c09d78e3e5cd, < c32f6b6196b6efc1c68990dfeaac36fb8eb3b8e1. 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 Kernel is a crucial component of the Linux operating system that manages communication between hardware and software. It provides essential services and functions for the system's operation. The ab8500_fg_sysfs_init function is responsible for initializing the sysfs interface for the AB8500 fuel gauge driver in the Kernel's power supply subsystem. This driver is used to monitor the battery level and provide power-related information to the system. However, a memory leak vulnerability exists in the ab8500_fg_sysfs_init function, which can lead to the exhaustion of system memory resources over time.

Vulnerability Detail

The memory leak vulnerability in ab8500_fg_sysfs_init allows an attacker to continuously allocate memory without releasing it, leading to a gradual depletion of available memory resources. This can result in system instability, performance degradation, and potentially denial-of-service conditions. The vulnerability was introduced in version v4.9 of the Linux Kernel by commit 8c0984e5a75337df513047ec92a6c09d78e3e5cd and was fixed in version v5.17.2 by commit c32f6b6196b6efc1c68990dfeaac36fb8eb3b8e1.

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

If updating the Kernel is not immediately feasible, a temporary workaround can be implemented to mitigate the memory leak. This workaround involves manually releasing the allocated memory by modifying the ab8500_fg_sysfs_init function. Here is an example of the modified code:

void ab8500_fg_sysfs_init()
{
    // Existing code

    // Add the following line to release the allocated memory
    kfree(sysfs_attr);
}

Please note that this workaround is not a permanent solution and should only be used until the Kernel can be updated.

Conclusion

The memory leak vulnerability in the ab8500_fg_sysfs_init function of the Kernel's power supply subsystem can lead to system instability and performance degradation. It is crucial to update the Linux Kernel to version v5.17.2 or later to fix this vulnerability. In the meantime, a temporary workaround can be implemented to mitigate the issue. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The memory leak vulnerability can lead to system instability, performance degradation, and potential denial-of-service conditions due to the gradual depletion of available memory resources.

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

At the time of this report, there are no known public exploits targeting this specific memory leak vulnerability. However, it is always recommended to promptly apply security patches and updates to mitigate potential risks.

No, this vulnerability requires local access to the affected system to exploit. It cannot be exploited remotely over a network.

The primary solution is to update the Linux Kernel to the fixed version. However, if updating the Kernel is not immediately feasible, implementing the provided workaround can help mitigate the memory leak temporarily.

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