漏洞信息
# HSI:ssi_protocol :修复由于Race Condition导致的ssi_protocol驱动程序中的使用已释放内存的漏洞
## 漏洞概述
在Linux内核的ssi_protocol驱动中,由于竞态条件导致了使用已释放内存的漏洞(Use after free)。
## 影响版本
未具体列出受影响的版本号。不过此问题存在于`ssi_protocol_probe()`函数和`ssi_protocol_remove()`函数之间。
## 漏洞细节
在`ssi_protocol_probe()`函数中,`&ssi->work`与`ssip_xmit_work()`绑定。在`ssip_pn_setup()`函数内,`ssip_pn_ops`结构体中的`ssip_pn_xmit`函数能够启动工作队列。
当移除模块时会调用 `ssi_protocol_remove()` 函数进行清理操作,并通过 `kfree(ssi)` 释放 `ssi`。然而,在此期间之前启动的工作队列仍在运行,会造成使用已释放内存的情况。具体步骤描述如下:
```
CPU0 CPU1
| ssip_xmit_work
ssi_protocol_remove |
kfree(ssi); |
| struct hsi_client *cl = ssi->cl;
| // use ssi
```
## 解决方案
通过在 `ssi_protocol_remove()` 函数清理之前确保取消工作队列,可以修复此漏洞。
## 影响
该漏洞可能导致系统不稳定或安全风险,具体取决于攻击者利用的方式。
备注
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition
In the ssi_protocol_probe() function, &ssi->work is bound with
ssip_xmit_work(), In ssip_pn_setup(), the ssip_pn_xmit() function
within the ssip_pn_ops structure is capable of starting the
work.
If we remove the module which will call ssi_protocol_remove()
to make a cleanup, it will free ssi through kfree(ssi),
while the work mentioned above will be used. The sequence
of operations that may lead to a UAF bug is as follows:
CPU0 CPU1
| ssip_xmit_work
ssi_protocol_remove |
kfree(ssi); |
| struct hsi_client *cl = ssi->cl;
| // use ssi
Fix it by ensuring that the work is canceled before proceeding
with the cleanup in ssi_protocol_remove().
CVSS信息
N/A
漏洞类别
N/A