一、 漏洞 CVE-2023-53106 基础信息
漏洞信息
                                        # nfc:st-nci:修复因竞争条件导致的 ndlc_remove 中的使用后释放漏洞

## 漏洞概述
Linux 内核中的 `ndlc_remove` 函数由于竞态条件存在引用已释放内存的漏洞。该漏洞影响了 `st_nci_i2c_remove` 和 `st_nci_spi_remove`。

## 影响版本
未指定具体版本。

## 漏洞细节
在 `st_nci_i2c_probe` 中,`ndlc_probe` 被调用并绑定 `&ndlc->sm_work`。当调用 `ndlc_recv` 或超时处理器时,最终会调用 `schedule_work` 来启动工作。

当调用 `st_nci_i2c_remove` 移除驱动时,可能会出现如下序列:

```plaintext
CPU0                  CPU1

                    |llt_ndlc_sm_work
st_nci_i2c_remove   |
  ndlc_remove       |
     st_nci_remove  |
     nci_free_device|
     kfree(ndev)    |
//free ndlc->ndev   |
                    |llt_ndlc_rcv_queue
                    |nci_recv_frame
                    |//use ndlc->ndev
```

## 影响
通过在 `ndlc_remove` 中完成工作之前进行清理,解决了该漏洞。此漏洞可能导致使用已释放内存,进而引起系统不稳定或崩溃。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition
来源:美国国家漏洞数据库 NVD
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved: nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition This bug influences both st_nci_i2c_remove and st_nci_spi_remove. Take st_nci_i2c_remove as an example. In st_nci_i2c_probe, it called ndlc_probe and bound &ndlc->sm_work with llt_ndlc_sm_work. When it calls ndlc_recv or timeout handler, it will finally call schedule_work to start the work. When we call st_nci_i2c_remove to remove the driver, there may be a sequence as follows: Fix it by finishing the work before cleanup in ndlc_remove CPU0 CPU1 |llt_ndlc_sm_work st_nci_i2c_remove | ndlc_remove | st_nci_remove | nci_free_device| kfree(ndev) | //free ndlc->ndev | |llt_ndlc_rcv_queue |nci_recv_frame |//use ndlc->ndev
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
N/A
来源:美国国家漏洞数据库 NVD
漏洞标题
Linux kernel 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于st-nci驱动在移除时存在释放后重用问题。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2023-53106 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2023-53106 的情报信息