ima: Potential Memory Leak in ima_init_crypto() in Kernel
Summary
GSD-2022-1004174: ima: Fix potential memory leak in ima_init_crypto(). Affects Kernel versions >= 6d94809af6b0830c4dfcad661535a5939bcb8a7d, < 830de9667b3ada0a75a3f098dfc7159709fe397b. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
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 functionalities such as process management, memory management, and device drivers. The ima_init_crypto() function is part of the Integrity Measurement Architecture (IMA) subsystem in the Kernel. IMA ensures the integrity of files and processes by measuring and verifying their signatures. However, a potential memory leak has been identified in the ima_init_crypto() function, which could lead to resource exhaustion and system instability.
Vulnerability Detail
The vulnerability arises from a memory leak in the ima_init_crypto() function. When this function is called, it may allocate memory but fail to deallocate it properly under certain conditions. This can result in a gradual depletion of available memory resources, potentially leading to system crashes or denial-of-service attacks. Attackers could exploit this vulnerability to exhaust system resources and disrupt normal system operation. The vulnerability was introduced in version v5.8 of the Linux Kernel and has been fixed in version v5.18.13.
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 temporary workaround, users can disable the IMA subsystem by modifying the Kernel configuration. This can be achieved by removing the 'CONFIG_IMA' option from the Kernel configuration file and recompiling the Kernel. However, disabling IMA will result in the loss of file integrity measurement and verification capabilities.
Conclusion
The ima_init_crypto() function in the Kernel is susceptible to a potential memory leak, which can lead to resource exhaustion and system instability. It is crucial to update the Linux Kernel to version v5.18.13 or later to mitigate this vulnerability. Alternatively, users can apply the temporary workaround of disabling the IMA subsystem, although this will result in the loss of file integrity measurement and verification capabilities. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to memory exhaustion and system instability, potentially resulting in system crashes or denial-of-service attacks.
You can check the version of your Linux Kernel. If it is v5.8 or later and does not include the fix commit (830de9667b3ada0a75a3f098dfc7159709fe397b), your system may be affected.
At the time of this report, no known exploits have been identified. However, it is important to apply the recommended fix or workaround to mitigate the risk.
Yes, you can apply the temporary workaround of disabling the IMA subsystem by modifying the Kernel configuration. However, this will result in the loss of file integrity measurement and verification capabilities.
You can find more information about the fix commit (830de9667b3ada0a75a3f098dfc7159709fe397b) in the official Linux Kernel Git repository.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.