{"id":"CVE-2022-50577","aliases":["CVE-2022-50577"],"related":[],"kind":"vulnerability","state":"published","title":"ima: Fix memory leak in __ima_inode_hash()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nima: Fix memory leak in __ima_inode_hash()\n\nCommit f3cc6b25dcc5 (\"ima: always measure and audit files in policy\") lets\nmeasurement or audit happen even if the file digest cannot be calculated.\n\nAs a result, iint->ima_hash could have been allocated despite\nima_collect_measurement() returning an error.\n\nSince ima_hash belongs to a temporary inode metadata structure, declared\nat the beginning of __ima_inode_hash(), just add a kfree() call if\nima_collect_measurement() returns an error different from -ENOMEM (in that\ncase, ima_hash should not have been allocated).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nima: Fix memory leak in __ima_inode_hash()\n\nCommit f3cc6b25dcc5 (\"ima: always measure and audit files in policy\") lets\nmeasurement or audit happen even if the file digest cannot be calculated.\n\nAs a result, iint->ima_hash could have been allocated despite\nima_collect_measurement() returning an error.\n\nSince ima_hash belongs to a temporary inode metadata structure, declared\nat the beginning of __ima_inode_hash(), just add a kfree() call if\nima_collect_measurement() returns an error different from -ENOMEM (in that\ncase, ima_hash should not have been allocated).","source":"cvelist"}],"published":"2025-10-22T13:23:30.910Z","modified":"2026-06-17T05:23:49.463Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"280fe8367b0dc45b6ac5e04fad03e16e99540c0c","fixed":"c4df8cb38f139ed9f4296868c0a6f15a26e8c491","status":"affected"},{"type":"git","introduced":"280fe8367b0dc45b6ac5e04fad03e16e99540c0c","fixed":"f375bcf69f58fd0744c9dfd1b6b891a27301d67b","status":"affected"},{"type":"git","introduced":"280fe8367b0dc45b6ac5e04fad03e16e99540c0c","fixed":"8c1d6a050a0f16e0a9d32eaf53b965c77279c6f8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.18","status":"unaffected"},{"type":"semver","introduced":"6.0.18","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.4","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/c4df8cb38f139ed9f4296868c0a6f15a26e8c491","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f375bcf69f58fd0744c9dfd1b6b891a27301d67b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8c1d6a050a0f16e0a9d32eaf53b965c77279c6f8","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50577","url":"https://www.cve.org/CVERecord?id=CVE-2022-50577","licence":"CVE Terms of Use","modified":"2026-05-11T19:22:06.984Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50577","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50577","licence":"Public domain","modified":"2026-06-17T05:23:49.463Z"}],"updatedAt":"2026-11-25T22:58:21.279Z","epss":{"score":0.00274,"percentile":0.12483,"date":"2026-11-30T12:00:22.000Z"}}