CVE
CVE-2023-53659
CNA 原文 · 原文(英文)
In the Linux kernel, the following vulnerability has been resolved: iavf: Fix out-of-bounds when setting channels on remove If we set channels greater during iavf_remove(), and waiting reset done would be timeout, then returned with error but changed num_active_queues directly, that will lead to OOB like the following logs. Because the num_active_queues is greater than tx/rx_rings[] allocated actually. Reproducer: [root@host ~]# cat repro.sh #!/bin/bash pf_dbsf="0000:41:00.0" vf0_dbsf="0000:41:02.0" g_pids=() function do_set_numvf() { echo 2 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs sleep $((RANDOM%3+1)) echo 0 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs sleep $((RANDOM%3+1)) } function do_set_channel() { local nic=$(ls -1 --indicator-style=none /sys/bus/pci/devices/${vf0_dbsf}/net/) [ -z "$nic" ] && { sleep $((RANDOM%3)) ; return 1; } ifconfig $nic 192.168.18.5 netmask 255.255.255.0 ifconfig $nic up ethtool -L $nic combined 1 ethtool -L $nic combined 4 sleep $((RANDOM%3)) } function on_exit() { local pid for pid in "${g_pids[@]}"; do kill -0 "$pid" &>/dev/null && kill "$pid" &>/dev/null done g_pids=() } trap "on_exit; exit" EXIT while :; do do_set_numvf ; done & g_pids+=($!) while :; do do_set_channel ; done & g_pids+=($!) wait Result: [ 3506.152887] iavf 0000:41:02.0: Removing device [ 3510.400799] ================================================================== [ 3510.400820] BUG: KASAN: slab-out-of-bounds in iavf_free_all_tx_resources+0x156/0x160 [iavf] [ 3510.400823] Read of size 8 at addr ffff88b6f9311008 by task repro.sh/55536 [ 3510.400823] [ 3510.400830] CPU: 101 PID: 55536 Comm: repro.sh Kdump: loaded Tainted: G O --------- -t - 4.18.0 #1 [ 3510.400832] Hardware name: Powerleader PR2008AL/H12DSi-N6, BIOS 2.0 04/09/2021 [ 3510.400835] Call Trace: [ 3510.400851]…
受影响版本
- 6.5-rc2仅此版本
- 6.5-rc1仅此版本
- ≥ 6.2, < 6.4.7修复版本 6.4.7
- ≥ 5.16.1, < 6.1.42修复版本 6.1.42
- 5.16仅此版本
- 5.16-rc8仅此版本
- 5.16-rc7仅此版本
- 5.16-rc6仅此版本
- 5.16-rc5仅此版本
- 5.16-rc4仅此版本
- 5.16-rc3仅此版本
- 5.16-rc2仅此版本
- ≥ 5.15.5, < 5.15.123修复版本 5.15.123
- ≥ 5.10.82, < 5.10.188修复版本 5.10.188
发行版软件包(Debian、Ubuntu、Red Hat 等)会回移补丁而不改上游版本号,请同时查看所用发行版的安全公告。
公告与补丁
- git.kernel.org/stable/c/0fb37ce6c01e17839e26d03222f0b44e6a3ed2b9 · Patch
- git.kernel.org/stable/c/65ecebc9ac09427b2c65f271cd5e5bd536c3fe38 · Patch
- git.kernel.org/stable/c/6e1d8f1332076a002e6d910d255aa5903d341c56 · Patch
- git.kernel.org/stable/c/7c4bced3caa749ce468b0c5de711c98476b23a52 · Patch
- git.kernel.org/stable/c/b92defe4e8ee86996c16417ad8c804cb4395fddd · Patch
数据来源:NVD(公有领域)、CISA KEV(CC0)、FIRST EPSS、OSV.dev / GitHub Advisory Database(CC-BY 4.0) · 本库只列受影响版本与修复版本,不托管、不链接任何利用代码。