一、 漏洞 CVE-2022-50577 基础信息
漏洞信息
                                        # IMA __ima_inode_hash 内存泄漏修复

## 概述

在 Linux 内核的 IMA(Integrity Measurement Architecture)子系统中,发现了一个内存泄漏漏洞。

## 影响版本

涉及 Linux 内核中 IMA 模块,受影响版本包括但不限于引入提交 f3cc6b25dcc5("ima: always measure and audit files in policy")之后,但在修复提交之前的所有版本。

## 细节

漏洞出现在 `__ima_inode_hash()` 函数中。由于提交 f3cc6b25dcc5 引入的行为改变,即便 `ima_collect_measurement()` 返回错误,也可能继续进行测量或审计操作。

这导致 `iint->ima_hash` 被分配内存,即使测量过程中出错。

由于 `iint->ima_hash` 是临时的 inode 元数据结构,当 `ima_collect_measurement()` 返回非 `-ENOMEM` 错误时,应立即通过 `kfree()` 释放内存以防止泄漏。

## 影响

错误处理中未及时释放 `ima_hash` 内存,在某些错误路径下会导致内存泄漏,进而可能影响系统稳定性与资源利用。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
ima: Fix memory leak in __ima_inode_hash()
来源:美国国家漏洞数据库 NVD
漏洞描述信息
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).
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
N/A
来源:美国国家漏洞数据库 NVD
漏洞标题
Linux kernel 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于ima_collect_measurement返回错误时未释放ima_hash内存,可能导致内存泄漏。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2022-50577 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2022-50577 的情报信息
四、漏洞 CVE-2022-50577 的评论

暂无评论


发表评论