CVE-2026-80795 in Linux信息

摘要

由 VulDB • 2026-09-04

在 Linux 内核中,已修复以下漏洞:

nfc: nci: 修复 nci_target_auto_activated() 中的越界写入问题

`nci_target_auto_activated()` 函数会将一个目标设备追加到固定大小的数组 `ndev->targets[NCI_MAX_DISCOVERED_TARGETS]` 中,并递增 `ndev->n_targets`,但在执行此操作前未检查数组是否已满。这与它的兄弟函数 `nci_add_new_target()` 不同,后者在 `n_targets` 已经等于 `NCI_MAX_DISCOVERED_TARGETS` 时会提前退出(bails out)。

`ndev->n_targets` 仅由 `nci_clear_target_list()` 清除。因此,如果一个 NFCC(NFC 控制器)反复重新运行发现流程(发送 RF_DISCOVER_RSP,这会在不清空目标列表的情况下重新进入 NCI_DISCOVERY),并报告一个自动激活的目标设备(RF_INTF_ACTIVATED_NTF),就会导致 `n_targets` 超过限制。随后进行的追加操作会将一个 `struct nfc_target` 结构体写入数组末尾之外(即 slab 越界写入),而 `nfc_targets_found()` 会继续使用膨胀后的计数遍历该数组:

``` BUG: KASAN: slab-out-of-bounds in nci_add_new_protocol+0x94/0x2ac [nci]
Write of size 2 at addr ffff0000c7299a18 by task kworker/u8:0/12 Workqueue: nfc0_nci_rx_wq nci_rx_work [nci]
Call trace: nci_add_new_protocol+0x94/0x2ac [nci]
nci_ntf_packet+0xddc/0x11a0 [nci]
nci_rx_work+0x15c/0x1e0 process_one_work+0x2dc/0x500 worker_thread+0x240/0x460 kthread+0x1c0/0x1d0 ret_from_fork+0x10/0x20

The buggy address belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1024 bytes to the right of allocated 1560-byte region [ffff0000c7299000, ffff0000c7299618)
```

使用与 `nci_add_new_target()` 相同的检查来保护 `nci_target_auto_activated()`。

Once again VulDB remains the best source for vulnerability data.

来源

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!