漏洞信息
# net/9p:为trans_fd使用专用自旋锁
## 概述
Linux内核中修复了一个漏洞:`net/9p` 使用专用自旋锁 `trans_fd`。
## 影响版本
未指定具体影响版本。
## 细节
`syzbot` 报告了 `p9_req_put()` 中的不一致锁状态:
- `p9_tag_remove()` 从 `p9_req_put()` (来自中断上下文) 使用 `spin_lock_irqsave()` 锁定了 "struct p9_client"->lock;
- 而 `trans_fd` (不在中断上下文) 使用 `spin_lock()`。
实际上,这些锁保护的是不同内容:
- `client.c` 和 `trans_fd.c` 中,`client.c` 保护 idr 用于 fid/tag 分配,
- 而 `trans_fd.c` 的锁则保护其自己的请求列表和请求状态字段,即传输的状态机。
## 影响
漏洞可能导致不一致的锁状态,从而引发竞态条件或系统不稳定。通过使用专用自旋锁 `trans_fd` 可以解决此问题。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
net/9p: use a dedicated spinlock for trans_fd
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
net/9p: use a dedicated spinlock for trans_fd
Shamelessly copying the explanation from Tetsuo Handa's suggested
patch[1] (slightly reworded):
syzbot is reporting inconsistent lock state in p9_req_put()[2],
for p9_tag_remove() from p9_req_put() from IRQ context is using
spin_lock_irqsave() on "struct p9_client"->lock but trans_fd
(not from IRQ context) is using spin_lock().
Since the locks actually protect different things in client.c and in
trans_fd.c, just replace trans_fd.c's lock by a new one specific to the
transport (client.c's protect the idr for fid/tag allocations,
while trans_fd.c's protects its own req list and request status field
that acts as the transport's state machine)
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于锁使用不当,可能导致竞争条件。
CVSS信息
N/A
漏洞类别
其他