漏洞信息
# fs/fhandle.c: 修正has_locked_children()调用的竞争状态问题
## 概述
在 Linux 内核的 `fs/fhandle.c` 文件中,修复了一个关于 `has_locked_children()` 函数的竞态条件漏洞。`may_decode_fh()` 函数在调用 `has_locked_children()` 时没有加锁,从而导致竞态条件漏洞。
## 细节
- 由于没有加锁,`may_decode_fh()` 函数在调用 `has_locked_children()` 时可能会引发竞态条件。
- 其他调用者由于持有 `namespace_sem` 锁且保证了挂载点的引用计数为正,因此是安全的。
- 将当前的 `has_locked_children()` 重命名为 `__has_locked_children()` 并使其成为静态函数,同时将 `fs/namespace.c` 中的调用者切换到新函数。
- 新的 `has_locked_children()` 将作为 `__has_locked_children()` 的包装器,它在 `read_seqlock_excl(&mount_lock)` 下调用后者。
## 影响
此修复解决了由于未加锁导致的竞态条件漏洞,而该漏洞可能会导致系统崩溃或不稳定。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
fs/fhandle.c: fix a race in call of has_locked_children()
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
fs/fhandle.c: fix a race in call of has_locked_children()
may_decode_fh() is calling has_locked_children() while holding no locks.
That's an oopsable race...
The rest of the callers are safe since they are holding namespace_sem and
are guaranteed a positive refcount on the mount in question.
Rename the current has_locked_children() to __has_locked_children(), make
it static and switch the fs/namespace.c users to it.
Make has_locked_children() a wrapper for __has_locked_children(), calling
the latter under read_seqlock_excl(&mount_lock).
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于has_locked_children中的竞争条件,可能导致空指针取消引用。
CVSS信息
N/A
漏洞类别
其他