CVE-2022-50622
Description
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix potential memory leak in ext4_fc_record_modified_inode()
As krealloc may return NULL, in this case 'state->fc_modified_inodes' may not be freed by krealloc, but 'state->fc_modified_inodes' already set NULL. Then will lead to 'state->fc_modified_inodes' memory leak.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A potential memory leak in ext4's fast commit code when krealloc returns NULL, leading to loss of pointer to previously allocated memory.
Vulnerability
In the Linux kernel's ext4 filesystem, the function ext4_fc_record_modified_inode() uses krealloc to resize a buffer (state->fc_modified_inodes). However, if krealloc fails and returns NULL, the code incorrectly sets the pointer to NULL without freeing the original memory, causing a memory leak [1][2].
Exploitation
An attacker would need to trigger a krealloc failure, which could be achieved by exhausting memory or inducing a specific allocation pattern. The vulnerability is in the fast commit path, which is used during journal commits. A local attacker with the ability to mount and interact with an ext4 filesystem could potentially exploit this to cause a denial of service via memory exhaustion [1][2].
Impact
Successful exploitation leads to a memory leak, depleting system memory over time and potentially causing a denial of service. The leak is proportional to the number of inodes modified in a transaction, making it more severe under heavy filesystem activity [1][2].
Mitigation
The issue is fixed in Linux kernel versions 4.9.337, 5.4.228, 5.10.163, 5.15.87, 6.1.5, and 6.2 with commits referenced above [1][2]. Users should apply the latest stable kernel updates to remediate this vulnerability.
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
2Patches
5c9ce7766dc4e9b5eb368a86fc0be17635f0324d39affc6be9305721a309fVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/24d39affc6be1acf6df86a8c3e2413b8a73749c7nvd
- git.kernel.org/stable/c/9305721a309fa1bd7c194e0d4a2335bf3b29dca4nvd
- git.kernel.org/stable/c/9b5eb368a86f97eb9831f5b53b8e43ec69bc7cd4nvd
- git.kernel.org/stable/c/c0be17635f039f864b1108efec0015c73736e414nvd
- git.kernel.org/stable/c/c9ce7766dc4e88e624c62a68221a3bbe8f06e856nvd
News mentions
0No linked articles in our index yet.