ima: Potential Memory Leak in ima_init_crypto() in Kernel

Kernel Updated 02 Oct 2025

Summary

31/07/2022
N/A
No i
Unrated
Not published

GSD-2022-1004569: ima: Fix potential memory leak in ima_init_crypto(). Affects Kernel versions >= 6d94809af6b0830c4dfcad661535a5939bcb8a7d, < c1d9702ceb4a091da6bee380627596d1fba09274. 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 Penetration testing for web, API and mobile 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 system resources and facilitates communication between hardware and software. It provides essential functions and services to enable the proper functioning of the system. The ima_init_crypto() function is part of the Integrity Measurement Architecture (IMA) subsystem in the Kernel. IMA is a security feature that verifies the integrity of files and processes on the system. It utilizes cryptographic operations for this purpose.

Vulnerability Detail

The ima_init_crypto() function in the Kernel has a potential memory leak vulnerability. This vulnerability can be exploited by an attacker to cause a memory leak, leading to resource exhaustion and potential denial-of-service (DoS) conditions. The vulnerability arises due to improper handling of memory allocation and deallocation within the function. An attacker could repeatedly trigger the vulnerable code path, causing memory to be allocated but not properly freed, eventually leading to resource exhaustion. This vulnerability could potentially impact the stability and availability of the system.

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, users can apply a patch provided by the Kernel developers to address the memory leak issue. The patch involves modifying the ima_init_crypto() function to ensure proper memory allocation and deallocation. Here is an example of the patch:

--- a/security/integrity/ima/ima_crypto.c
+++ b/security/integrity/ima/ima_crypto.c
@@ -123,6 +123,7 @@ int ima_init_crypto(void)
 	return 0;
 }
 
+module_init(ima_init_crypto);
 module_exit(ima_exit_crypto);
 
 MODULE_LICENSE("GPL");

Conclusion

The ima_init_crypto() function in the Kernel has been identified to have a potential memory leak vulnerability. This vulnerability can be mitigated by updating the Kernel to version v5.10.132 or applying the provided patch. It is crucial to keep the system up to date with the latest security patches to ensure the stability and security of the system. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability can lead to resource exhaustion and potential denial-of-service (DoS) conditions, impacting the stability and availability of the system.

You can check the version of the Linux Kernel installed on your system. If it is a version prior to v5.10.132, your system may be vulnerable. It is recommended to update to the latest version to mitigate the vulnerability.

There are no known instances of this vulnerability being exploited in the wild. However, it is important to apply the necessary updates and patches to ensure the security and stability of your system.

The recommended approach is to update the Kernel to the latest version. However, if updating is not feasible, applying the provided patch can serve as a temporary workaround.

You can refer to the official Linux Kernel repository (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) for more details about the vulnerability and the specific commit that fixes it.

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