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 ED75C28506F for ; Wed, 18 Jun 2025 09:29:50 +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=1750238991; cv=none; b=WQQgTGhY9fYwIo1OgVCQjl8NFFWb87NA6j/0muSxx9ZE8bd4g9n3KlXbSvt7qHw8lIkQvWNRg4nHfkZEnI1Mz9upBgaVqPNl0Sor6JNYAStSaM5P60e8pVc5Uz+yB1fj8oP8PJy9lpFfkfKwRCLau2x0lraw8KdVfoPZOkvlMXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750238991; c=relaxed/simple; bh=3aOAkYkwHKSYzZoudE0TzIHTvGW85ZHcw3IBt63MG9k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oQI4tzdQubeMg4X0JOwXGVWX6i9a9R1mGYUTX0m+riL9gXrlIfnlQ7iAY5fNmoiVrmE9Bol4DynPCgnoMKREYMIVKjIqfmAEP214UysmOozcErM7FcOOEgMM8BLrgzqX3UDHtp6WFd0PwRPH7ymO+5vKhjp53i8joVFWW4tXJbs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WpBSHcY+; 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="WpBSHcY+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 592F9C4CEED; Wed, 18 Jun 2025 09:29:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750238990; bh=3aOAkYkwHKSYzZoudE0TzIHTvGW85ZHcw3IBt63MG9k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=WpBSHcY+bSmH3mn2XOXGypi5cW3hIpQWJEj6KF0Wa8CkKOIjoQj2LoCxnkmqS3aVB NeSJxS5PseJIYR16TdTyuBgv5MWWtjbEBRS0EJK5R5drskbxaxbMRic4V4mTy9+nFv 9dd/0Wvm5gSXdzv6VYenkc0QEbnFYuT6b6OB8WxQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38009: wifi: mt76: disable napi on driver removal Date: Wed, 18 Jun 2025 11:28:43 +0200 Message-ID: <2025061842-CVE-2025-38009-8043@gregkh> X-Mailer: git-send-email 2.49.0 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=4152; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LOyGBs7CxDSWUxccxUrYCCiOy0wCPCRfOF3F/0Ipchg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBbaemmJeZSAZHv2FvzqqesE2rqP+n6JNO2xk37lXNO b1nm25PRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzE/yLDfMdFj7L5djWfYuzu 8/r7UthkSo+4FMOC+VkK6dyLuFs3stXrfXv/9586518zAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: wifi: mt76: disable napi on driver removal A warning on driver removal started occurring after commit 9dd05df8403b ("net: warn if NAPI instance wasn't shut down"). Disable tx napi before deleting it in mt76_dma_cleanup(). WARNING: CPU: 4 PID: 18828 at net/core/dev.c:7288 __netif_napi_del_locked+0xf0/0x100 CPU: 4 UID: 0 PID: 18828 Comm: modprobe Not tainted 6.15.0-rc4 #4 PREEMPT(lazy) Hardware name: ASUS System Product Name/PRIME X670E-PRO WIFI, BIOS 3035 09/05/2024 RIP: 0010:__netif_napi_del_locked+0xf0/0x100 Call Trace: mt76_dma_cleanup+0x54/0x2f0 [mt76] mt7921_pci_remove+0xd5/0x190 [mt7921e] pci_device_remove+0x47/0xc0 device_release_driver_internal+0x19e/0x200 driver_detach+0x48/0x90 bus_remove_driver+0x6d/0xf0 pci_unregister_driver+0x2e/0xb0 __do_sys_delete_module.isra.0+0x197/0x2e0 do_syscall_64+0x7b/0x160 entry_SYSCALL_64_after_hwframe+0x76/0x7e Tested with mt7921e but the same pattern can be actually applied to other mt76 drivers calling mt76_dma_cleanup() during removal. Tx napi is enabled in their *_dma_init() functions and only toggled off and on again inside their suspend/resume/reset paths. So it should be okay to disable tx napi in such a generic way. Found by Linux Verification Center (linuxtesting.org). The Linux kernel CVE team has assigned CVE-2025-38009 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit 2ac515a5d74f26963362d5da9589c67ca3663338 and fixed in 5.10.238 with commit ff0f820fa5b99035b3c654dd531226d8d83aec5f Issue introduced in 5.2 with commit 2ac515a5d74f26963362d5da9589c67ca3663338 and fixed in 5.15.184 with commit ca5b213bf4b4224335a8131a26805d16503fca5f Issue introduced in 5.2 with commit 2ac515a5d74f26963362d5da9589c67ca3663338 and fixed in 6.1.140 with commit b892e830d1ea8c5475254b98827771f7366f1039 Issue introduced in 5.2 with commit 2ac515a5d74f26963362d5da9589c67ca3663338 and fixed in 6.6.92 with commit 5e700b06b970fc19e3a1ecb244e14785f3fbb8e3 Issue introduced in 5.2 with commit 2ac515a5d74f26963362d5da9589c67ca3663338 and fixed in 6.12.30 with commit 2b81e76db3667d1f7f2ad44e9835cdaf8dea95a8 Issue introduced in 5.2 with commit 2ac515a5d74f26963362d5da9589c67ca3663338 and fixed in 6.14.8 with commit e7bfbda5fddd27f3158e723d641c0fcdfb0552a7 Issue introduced in 5.2 with commit 2ac515a5d74f26963362d5da9589c67ca3663338 and fixed in 6.15 with commit 78ab4be549533432d97ea8989d2f00b508fa68d8 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-2025-38009 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/wireless/mediatek/mt76/dma.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/ff0f820fa5b99035b3c654dd531226d8d83aec5f https://git.kernel.org/stable/c/ca5b213bf4b4224335a8131a26805d16503fca5f https://git.kernel.org/stable/c/b892e830d1ea8c5475254b98827771f7366f1039 https://git.kernel.org/stable/c/5e700b06b970fc19e3a1ecb244e14785f3fbb8e3 https://git.kernel.org/stable/c/2b81e76db3667d1f7f2ad44e9835cdaf8dea95a8 https://git.kernel.org/stable/c/e7bfbda5fddd27f3158e723d641c0fcdfb0552a7 https://git.kernel.org/stable/c/78ab4be549533432d97ea8989d2f00b508fa68d8