CVE-2022-50577

Source
https://cve.org/CVERecord?id=CVE-2022-50577
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50577.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50577
Downstream
Related
Published
2025-10-22T13:23:30.910Z
Modified
2026-03-20T11:47:32.428267Z
Summary
ima: Fix memory leak in __ima_inode_hash()
Details

In the Linux kernel, the following vulnerability has been resolved:

ima: Fix memory leak in __imainodehash()

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->imahash could have been allocated despite imacollect_measurement() returning an error.

Since ima_hash belongs to a temporary inode metadata structure, declared at the beginning of _imainodehash(), just add a kfree() call if imacollectmeasurement() returns an error different from -ENOMEM (in that case, imahash should not have been allocated).

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50577.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
280fe8367b0dc45b6ac5e04fad03e16e99540c0c
Fixed
c4df8cb38f139ed9f4296868c0a6f15a26e8c491
Fixed
f375bcf69f58fd0744c9dfd1b6b891a27301d67b
Fixed
8c1d6a050a0f16e0a9d32eaf53b965c77279c6f8

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50577.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
6.0.18
Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50577.json"