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 4532E258ECD for ; Fri, 22 Aug 2025 16:03:01 +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=1755878581; cv=none; b=FdptMFQ11QOlCuC8OaUCA+cpkOdpJJm/BmHuVJMcr3j8gpTsRH5Zo7ZpgO9FAzbs/ZKi9ygdN3Cjqbfx0078wASy6+V05XMaoDVZKgUi49ZFTmJFk1uwfYmwvKCgyZuRJwjS+JpWUaGH9faSG6l0jmb0kCAwCpGWDBSIO2wkHZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755878581; c=relaxed/simple; bh=2zOVgPaEpj5wy/IF+3YOb0eUzyiuEJs6jVfm8ygnKLc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SCANiNKDDvgpjS7NMWnACSMGyx4fxHtBxQlQxa51N8s06Esmpx7TuUjfShzLFDYJMmJYlc0TDRzAhzqduq4rLPnGjipW5IBNZMrwE8cIgwoKa1UD4Uhds3oThn6nTUQaitJJRpIuh7LlHGsujKXhS3grrdBWV35Pqb/Futjk6ds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V1FVtjEO; 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="V1FVtjEO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB50CC4CEF4; Fri, 22 Aug 2025 16:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755878581; bh=2zOVgPaEpj5wy/IF+3YOb0eUzyiuEJs6jVfm8ygnKLc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V1FVtjEOblkX4KEx29oZ6BPXdNh0fD0/3ABZxBSQ6dgZZLxPNM+dvx6N/ucoqEJ2O IXsDGN0rAXp2MoX8lwnN3EjAbKMRiCDEt+gHQ9BybewVAPYW176LfB5wqpFzbWFQ/7 Bb6LaKweNt0m6JJ4VUG9x4sN/f0Fnyn/NzstUWAA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38646: wifi: rtw89: avoid NULL dereference when RX problematic packet on unsupported 6 GHz band Date: Fri, 22 Aug 2025 18:00:54 +0200 Message-ID: <2025082236-CVE-2025-38646-9862@gregkh> X-Mailer: git-send-email 2.50.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=4877; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XlzdFCtYBY7ou09zTGqQUpYWTBMipZ3MNrCWABJECco=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkrpqjE1glMnLz7ctkN759X3ncJ9fsFftu3/k9e/OuTG 88rvnPp64hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ7LFhWNBnoerKPVFhbuKL CZott7u45MISrjIs2PWqbEOgzsTTf6Q/J6wQicqsP99UCgA= 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: avoid NULL dereference when RX problematic packet on unsupported 6 GHz band With a quite rare chance, RX report might be problematic to make SW think a packet is received on 6 GHz band even if the chip does not support 6 GHz band actually. Since SW won't initialize stuffs for unsupported bands, NULL dereference will happen then in the sequence, rtw89_vif_rx_stats_iter() -> rtw89_core_cancel_6ghz_probe_tx(). So, add a check to avoid it. The following is a crash log for this case. BUG: kernel NULL pointer dereference, address: 0000000000000032 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 1907 Comm: irq/131-rtw89_p Tainted: G U 6.6.56-05896-g89f5fb0eb30b #1 (HASH:1400 4) Hardware name: Google Telith/Telith, BIOS Google_Telith.15217.747.0 11/12/2024 RIP: 0010:rtw89_vif_rx_stats_iter+0xd2/0x310 [rtw89_core] Code: 4c 89 7d c8 48 89 55 c0 49 8d 44 24 02 48 89 45 b8 45 31 ff eb 11 41 c6 45 3a 01 41 b7 01 4d 8b 6d 00 4d 39 f5 74 42 8b 43 10 <41> 33 45 32 0f b7 4b 14 66 41 33 4d 36 0f b7 c9 09 c1 74 d8 4d 85 RSP: 0018:ffff9f3080138ca0 EFLAGS: 00010246 RAX: 00000000b8bf5770 RBX: ffff91b5e8c639c0 RCX: 0000000000000011 RDX: ffff91b582de1be8 RSI: 0000000000000000 RDI: ffff91b5e8c639e6 RBP: ffff9f3080138d00 R08: 0000000000000000 R09: 0000000000000000 R10: ffff91b59de70000 R11: ffffffffc069be50 R12: ffff91b5e8c639e4 R13: 0000000000000000 R14: ffff91b5828020b8 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff91b8efa40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000032 CR3: 00000002bf838000 CR4: 0000000000750ee0 PKRU: 55555554 Call Trace: ? __die_body+0x68/0xb0 ? page_fault_oops+0x379/0x3e0 ? exc_page_fault+0x4f/0xa0 ? asm_exc_page_fault+0x22/0x30 ? __pfx_rtw89_vif_rx_stats_iter+0x10/0x10 [rtw89_core (HASH:1400 5)] ? rtw89_vif_rx_stats_iter+0xd2/0x310 [rtw89_core (HASH:1400 5)] __iterate_interfaces+0x59/0x110 [mac80211 (HASH:1400 6)] ? __pfx_rtw89_vif_rx_stats_iter+0x10/0x10 [rtw89_core (HASH:1400 5)] ? __pfx_rtw89_vif_rx_stats_iter+0x10/0x10 [rtw89_core (HASH:1400 5)] ieee80211_iterate_active_interfaces_atomic+0x36/0x50 [mac80211 (HASH:1400 6)] rtw89_core_rx_to_mac80211+0xfd/0x1b0 [rtw89_core (HASH:1400 5)] rtw89_core_rx+0x43a/0x980 [rtw89_core (HASH:1400 5)] The Linux kernel CVE team has assigned CVE-2025-38646 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit c6aa9a9c47252ac7b07ed6d10459027e2f2a2de0 and fixed in 6.6.102 with commit 892b29eab44b1803d2cad8e50f1bc2144ef478cb Issue introduced in 6.4 with commit c6aa9a9c47252ac7b07ed6d10459027e2f2a2de0 and fixed in 6.12.42 with commit 77a7a48f87d673a68664bebf044214821decbfda Issue introduced in 6.4 with commit c6aa9a9c47252ac7b07ed6d10459027e2f2a2de0 and fixed in 6.15.10 with commit f3527ac15a00916e68ecb495b74dbe6a6c62a06f Issue introduced in 6.4 with commit c6aa9a9c47252ac7b07ed6d10459027e2f2a2de0 and fixed in 6.16.1 with commit 4b525630729082f026e7030eafccf89e3add7eae Issue introduced in 6.4 with commit c6aa9a9c47252ac7b07ed6d10459027e2f2a2de0 and fixed in 6.17-rc1 with commit 7e04f01bb94fe61c73cc59f0495c3b6c16a83231 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-38646 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 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/892b29eab44b1803d2cad8e50f1bc2144ef478cb https://git.kernel.org/stable/c/77a7a48f87d673a68664bebf044214821decbfda https://git.kernel.org/stable/c/f3527ac15a00916e68ecb495b74dbe6a6c62a06f https://git.kernel.org/stable/c/4b525630729082f026e7030eafccf89e3add7eae https://git.kernel.org/stable/c/7e04f01bb94fe61c73cc59f0495c3b6c16a83231