CVE-2023-53850: iavf: use internal state to free traffic IRQs
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
iavf: use internal state to free traffic IRQs
If the system tries to close the netdev while iavf_reset_task() is running, __LINK_STATE_START will be cleared and netif_running() will return false in iavf_reinit_interrupt_scheme(). This will result in iavf_free_traffic_irqs() not being called and a leak as follows:
[7632.489326] remove_proc_entry: removing non-empty directory 'irq/999', leaking at least 'iavf-enp24s0f0v0-TxRx-0'
[7632.490214] WARNING: CPU: 0 PID: 10 at fs/proc/generic.c:718 remove_proc_entry+0x19b/0x1b0is shown when pci_disable_msix() is later called. Fix by using the internal adapter state. The traffic IRQs will always exist if state == __IAVF_RUNNING.
The Linux kernel CVE team has assigned CVE-2023-53850 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.15 with commit 5b36e8d04b4439c9ceb814bfdfe1284737f9c632 and fixed in 6.1.42 with commit 6d9d01689b82ff5cb8f8d2a82717d7997bc0bfff Issue introduced in 4.15 with commit 5b36e8d04b4439c9ceb814bfdfe1284737f9c632 and fixed in 6.4.7 with commit 5e9db32eec628481f5da97a5b1aedb84a5240d18 Issue introduced in 4.15 with commit 5b36e8d04b4439c9ceb814bfdfe1284737f9c632 and fixed in 6.5 with commit a77ed5c5b768e9649be240a2d864e5cd9c6a2015
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2023-53850
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/ethernet/intel/iavf/iavf_main.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/6d9d01689b82ff5cb8f8d2a82717d7997bc0bfff https://git.kernel.org/stable/c/5e9db32eec628481f5da97a5b1aedb84a5240d18 https://git.kernel.org/stable/c/a77ed5c5b768e9649be240a2d864e5cd9c6a2015