VYPR
Unrated severityNVD Advisory· Published Oct 22, 2025· Updated Apr 15, 2026

CVE-2022-50577

CVE-2022-50577

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).

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A memory leak in the Linux kernel's IMA subsystem occurs when ima_collect_measurement() fails but iint->ima_hash was already allocated.

Vulnerability

Overview

In the Linux kernel, a memory leak vulnerability exists in the __ima_inode_hash() function within the Integrity Measurement Architecture (IMA) subsystem. The issue was introduced by commit f3cc6b25dcc5, which allowed measurement or audit to proceed even when the file digest cannot be calculated. As a result, the iint->ima_hash field could be allocated despite ima_collect_measurement() returning an error, leading to a memory leak because the allocated hash was not freed in the error path [1].

Exploitation and

Attack Surface

This vulnerability is triggered when the IMA subsystem processes a file for which the digest calculation fails, but the policy still requires measurement or audit still occurs. The error path in __ima_inode_hash() did not properly free the ima_hash allocation when ima_collect_measurement() returned an error other than -ENOMEM. An attacker with the ability to cause digest calculation failures (e.g., by manipulating file content or system state) could repeatedly trigger this code path, leading to memory exhaustion over time. No special privileges are required beyond those needed to trigger IMA operations on the system [1].

Impact

An attacker exploiting this memory leak could cause gradual depletion of kernel memory, potentially leading to denial of service (DoS) conditions. The leak is per-operation, so repeated triggers could exhaust system memory, impacting system stability and availability. The fix ensures that ima_hash is freed when ima_collect_ima_collect_measurement() returns an error other than -ENOMEM, preventing the leak [1].

Mitigation

The vulnerability is fixed in the Linux kernel stable tree with commit c4df8cb38f139ed9f4296868c0a6f15a26e8c491. Users should apply the latest kernel updates from their distribution to remediate this issue. No workarounds are documented, as the fix is a kernel patch is required [1].

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

3

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

3

News mentions

0

No linked articles in our index yet.