CVE-2022-50577

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50577
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50577.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50577
Downstream
Published
2025-10-22T13:23:30.910Z
Modified
2025-12-04T23:01:31.925937Z
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 _imainode_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->imahash could have been allocated despite imacollect_measurement() returning an error.

Since imahash 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, ima_hash 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

Affected versions

v5.*

v5.17
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.10
v6.0.11
v6.0.12
v6.0.13
v6.0.14
v6.0.15
v6.0.16
v6.0.17
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.0.7
v6.0.8
v6.0.9
v6.1
v6.1-rc1
v6.1-rc2
v6.1-rc3
v6.1-rc4
v6.1-rc5
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.1.1
v6.1.2
v6.1.3

Database specific

source

"https://storage.googleapis.com/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/cve-osv-conversion/osv-output/CVE-2022-50577.json"