CVE-2022-50577
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-22

Last updated on: 2025-10-22

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: ima: Fix memory leak in __ima_inode_hash() Commit f3cc6b25dcc5 ("ima: always measure and audit files in policy") lets measurement or audit happen even if the file digest cannot be calculated. As a result, iint->ima_hash could have been allocated despite ima_collect_measurement() returning an error. Since ima_hash belongs to a temporary inode metadata structure, declared at the beginning of __ima_inode_hash(), just add a kfree() call if ima_collect_measurement() returns an error different from -ENOMEM (in that case, ima_hash should not have been allocated).
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-22
Last Modified
2025-10-22
Generated
2026-05-07
AI Q&A
2025-10-22
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a memory leak in the Linux kernel's Integrity Measurement Architecture (IMA) subsystem. Specifically, in the __ima_inode_hash() function, a memory allocation for ima_hash could occur even when the measurement collection function (ima_collect_measurement()) returns an error. This leads to allocated memory not being freed properly, causing a memory leak. The fix involves adding a call to free the allocated memory when an error occurs, except in the case of an out-of-memory error where the allocation should not have happened.


How can this vulnerability impact me? :

The memory leak caused by this vulnerability can lead to increased memory usage in the kernel over time, potentially degrading system performance or causing resource exhaustion. This could affect system stability and reliability, especially on systems with heavy file measurement or auditing activity.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart