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 C250C2E2DD2 for ; Wed, 1 Oct 2025 11:52:56 +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=1759319576; cv=none; b=UD3GyY+caOqR5MAIuxg8qZxn3pxrtMSYygZ4gxQrDZDhet5BCGs1jOyttpFWrP2WsqYf4YVNMdP83l9iMax5uO7O4yYRmlJ6YPj23Ud2RcVhRZx/+AGMYsmVjsnmpuEcYk1WmgM6r95jAhfcBKvhMKdPmuJVdT+1CpRuDusXa44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319576; c=relaxed/simple; bh=bbfVtM40Vfgk1Lve5FKnUE0Awp7aeT39sGTknU/AK5I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bhqn3d1tnarLGNx5av1yfS2g32CuoXtxwRWbqDvGwIOR8piL1YSfPtMZTB+11Q4yIVWHrM9Tu1mDomQl6l0w/jWA6d/jStTkdnNf5wnT7zifKB9LpU75jyORqqNThl+LTfNOTcsYQLYprtPcLpmwe9/X8KCrT0hr7ThUnfMO5ZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=efriwSyR; 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="efriwSyR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AA63C4CEF4; Wed, 1 Oct 2025 11:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319576; bh=bbfVtM40Vfgk1Lve5FKnUE0Awp7aeT39sGTknU/AK5I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=efriwSyRZY1ww5h0NZeB2huB5gSnNAUsXI1b/91Bkte4I5qgdVj46A5hbWn+17TuY kWnse5Z+v980aG6zxk+796sgXw7rIPAFEVE48lsiuwhcBP2grm87Ckfpg0foy2fOFA UyVyy+OTm6VfB1eGMUpDFK1TABSB/2hN05VMRolA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53452: wifi: rtw89: fix potential race condition between napi_init and napi_enable Date: Wed, 1 Oct 2025 13:42:22 +0200 Message-ID: <2025100104-CVE-2023-53452-f6e5@gregkh> X-Mailer: git-send-email 2.51.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=4353; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=May5LcL9VXIkbUM/Jn1ykvKF/ntA2cpq7mOxICCLxEw=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3hXt+/9hXfOekgh5PwOEHtXHZBX+ri7dOKG1dv/qet tDKNdcCOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi9scY5te8WbGMPevBl/eF nyM0AlW+T3hYvJZhwawlz6ffynYPV/w2+6LBNKdNYQGhIQA= 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: rtw89: fix potential race condition between napi_init and napi_enable A race condition can happen if netdev is registered, but NAPI isn't initialized yet, and meanwhile user space starts the netdev that will enable NAPI. Then, it hits BUG_ON(): kernel BUG at net/core/dev.c:6423! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 417 Comm: iwd Not tainted 6.2.7-slab-dirty #3 eb0f5a8a9d91 Hardware name: LENOVO 21DL/LNVNB161216, BIOS JPCN20WW(V1.06) 09/20/2022 RIP: 0010:napi_enable+0x3f/0x50 Code: 48 89 c2 48 83 e2 f6 f6 81 89 08 00 00 02 74 0d 48 83 ... RSP: 0018:ffffada1414f3548 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffa01425802080 RCX: 0000000000000000 RDX: 00000000000002ff RSI: ffffada14e50c614 RDI: ffffa01425808dc0 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000100 R12: ffffa01425808f58 R13: 0000000000000000 R14: ffffa01423498940 R15: 0000000000000001 FS: 00007f5577c0a740(0000) GS:ffffa0169fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5577a19972 CR3: 0000000125a7a000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: rtw89_pci_ops_start+0x1c/0x70 [rtw89_pci 6cbc75429515c181cbc386478d5cfb32ffc5a0f8] rtw89_core_start+0xbe/0x160 [rtw89_core fe07ecb874820b6d778370d4acb6ef8a37847f22] rtw89_ops_start+0x26/0x40 [rtw89_core fe07ecb874820b6d778370d4acb6ef8a37847f22] drv_start+0x42/0x100 [mac80211 c07fa22af8c3cf3f7d7ab3884ca990784d72e2d2] ieee80211_do_open+0x311/0x7d0 [mac80211 c07fa22af8c3cf3f7d7ab3884ca990784d72e2d2] ieee80211_open+0x6a/0x90 [mac80211 c07fa22af8c3cf3f7d7ab3884ca990784d72e2d2] __dev_open+0xe0/0x180 __dev_change_flags+0x1da/0x250 dev_change_flags+0x26/0x70 do_setlink+0x37c/0x12c0 ? ep_poll_callback+0x246/0x290 ? __nla_validate_parse+0x61/0xd00 ? __wake_up_common_lock+0x8f/0xd0 To fix this, follow Jonas' suggestion to switch the order of these functions and move register netdev to be the last step of PCI probe. Also, correct the error handling of rtw89_core_register_hw(). The Linux kernel CVE team has assigned CVE-2023-53452 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit e3ec7017f6a20d12ddd9fe23d345ebb7b8c104dd and fixed in 6.1.28 with commit 39712c8aeb79691bcec8bd6ff658cde1651e0803 Issue introduced in 5.16 with commit e3ec7017f6a20d12ddd9fe23d345ebb7b8c104dd and fixed in 6.2.15 with commit aa48073c2f993e1b0c0bc66b03ae105cac0130bc Issue introduced in 5.16 with commit e3ec7017f6a20d12ddd9fe23d345ebb7b8c104dd and fixed in 6.3.2 with commit b1b90c7df08ef385f95827ee3aee87bddd1ef5c5 Issue introduced in 5.16 with commit e3ec7017f6a20d12ddd9fe23d345ebb7b8c104dd and fixed in 6.4 with commit 47515664ecfbde11425dff121f298ae4499425c9 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-53452 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/realtek/rtw89/core.c drivers/net/wireless/realtek/rtw89/pci.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/39712c8aeb79691bcec8bd6ff658cde1651e0803 https://git.kernel.org/stable/c/aa48073c2f993e1b0c0bc66b03ae105cac0130bc https://git.kernel.org/stable/c/b1b90c7df08ef385f95827ee3aee87bddd1ef5c5 https://git.kernel.org/stable/c/47515664ecfbde11425dff121f298ae4499425c9