Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A65012EBEE for ; Tue, 21 May 2024 14:22:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301379; cv=none; b=H/KNBW3xJ29RSeuLME4sQ04jTX2rOqwKJPc4pij02EmFqdqlvGwzwMd0WmRtEllCrKT7nmgcEOZvr+ti+MlO4urUchQ/iGs9yKuNNzP7I1EgjL8VBxYxn+U3Xe22KpDEYLxBePC/BhaVpDY0jIrLpjwrsP3ty2v0CCquP22FenE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301379; c=relaxed/simple; bh=hvGLDDgQ09JtBe5PgehAUHcb9C49KG9LXuT9EywcJ8o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LLCKJEMeOv+KlSoKuIEi2qMlJrSqvNX6eXnGoapuhEht1NKuEKDIOh6MwVQE2WESqLlpuP1nv0/g8oNZwaH7anPy2ZY/I2EridoldQ0pUJMaxxuGiIRxQt3+2ZTSiL0e9LO3ETRnX5Rglw5ONiVtRSemckmgfcTk8VrmHXSBGJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LBEoWMLo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LBEoWMLo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C94E4C2BD11; Tue, 21 May 2024 14:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716301379; bh=hvGLDDgQ09JtBe5PgehAUHcb9C49KG9LXuT9EywcJ8o=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LBEoWMLoXQl9odMYFflT0VosWFo05Ud/oJKKN1z52mDY3yWhlNs6dsDP4BP0I15kr mmQwYbxBabl60VKFAFgdlZg54DduL8mlKpDiLtFFGIXI2P+HQwYvQEN8QmVhqRROKi qD6HzIb1fEgy9qDo1SYsYIdjffCCmBFe4iIX4/1w= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47283: net:sfc: fix non-freed irq in legacy irq mode Date: Tue, 21 May 2024 16:20:37 +0200 Message-ID: <2024052154-CVE-2021-47283-6ea6@gregkh> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2858; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hvGLDDgQ09JtBe5PgehAUHcb9C49KG9LXuT9EywcJ8o=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+a7ueSpY8F6j6N+dwi88O38KmP2lHV+v8ONfOysYUW iWcZ6zREcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOZz8iwYHLpbqWfWe+W8Rby PdL9nS++5fhmDoYFu65GHb5h3rLE64XgHP9OsUhtn22FAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: net:sfc: fix non-freed irq in legacy irq mode SFC driver can be configured via modparam to work using MSI-X, MSI or legacy IRQ interrupts. In the last one, the interrupt was not properly released on module remove. It was not freed because the flag irqs_hooked was not set during initialization in the case of using legacy IRQ. Example of (trimmed) trace during module remove without this fix: remove_proc_entry: removing non-empty directory 'irq/125', leaking at least '0000:3b:00.1' WARNING: CPU: 39 PID: 3658 at fs/proc/generic.c:715 remove_proc_entry+0x15c/0x170 ...trimmed... Call Trace: unregister_irq_proc+0xe3/0x100 free_desc+0x29/0x70 irq_free_descs+0x47/0x70 mp_unmap_irq+0x58/0x60 acpi_unregister_gsi_ioapic+0x2a/0x40 acpi_pci_irq_disable+0x78/0xb0 pci_disable_device+0xd1/0x100 efx_pci_remove+0xa1/0x1e0 [sfc] pci_device_remove+0x38/0xa0 __device_release_driver+0x177/0x230 driver_detach+0xcb/0x110 bus_remove_driver+0x58/0xd0 pci_unregister_driver+0x2a/0xb0 efx_exit_module+0x24/0xf40 [sfc] __do_sys_delete_module.constprop.0+0x171/0x280 ? exit_to_user_mode_prepare+0x83/0x1d0 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f9f9385800b ...trimmed... The Linux kernel CVE team has assigned CVE-2021-47283 to this issue. Affected and fixed versions =========================== Fixed in 5.10.44 with commit 8d717c9135a3 Fixed in 5.12.11 with commit 81c4d1d83f88 Fixed in 5.13 with commit 8f03eeb6e0a0 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-2021-47283 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/sfc/nic.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/8d717c9135a3340ae62d1699484850bfb4112b0c https://git.kernel.org/stable/c/81c4d1d83f88e15b26f4522a35cba6ffd8c5dfdd https://git.kernel.org/stable/c/8f03eeb6e0a0a0b8d617ee0a4bce729e47130036