From mboxrd@z Thu Jan 1 00:00:00 1970 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 B113D21771B for ; Wed, 26 Feb 2025 02:15:12 +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=1740536112; cv=none; b=IdbewwD5YwMHWIxP8RMg5k8j93fBSmexML+lEXcxGeSlXt7H7zM3PCPLFuEwq4e4CKNa3GbdSC74Dne4JRAC41ddf78FPOkzQlFgkYPzwhEJC7hKrgge2n/gyrdGNGD16gJPo0Wb+pNU5HdVoCXHef9G531XxiEitLqNJsbGQtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536112; c=relaxed/simple; bh=ArYOjjGkCCWCqSX0cO8y1RjV4f+f5plKykJfAq+bGqs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Crlz+kZThZ1yNg7CBnFTtWl2uemaIJa8ewbzyE82wDmqUArSP1eQi+DdPJJQZWoegjBntJ1FRHNiEtDXB0w8FFdj1UgrsjwL8iXhfMm8Z3to9ae91MHcmBfpGgD3hdrqC3RbI1yXiApoZNhBLb7zMvVWVz6obn2LV/2Xv6be5vI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=L4JJrWSE; 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="L4JJrWSE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 854DBC4CEDD; Wed, 26 Feb 2025 02:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536112; bh=ArYOjjGkCCWCqSX0cO8y1RjV4f+f5plKykJfAq+bGqs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=L4JJrWSETBIfitSUMgiuQplu0jaQFjLNxZ7tIsmbaNOELCy5+6CQ2FRyhlVEKk3Gg XgvnIExpLEJwS3J9LUzRdN3XOfaN8yIstXTe9UEMTgtRzOeqwOS3SCFz5fe7elt54t DmKp92j3bxImbDl25GNDuhK+kBJERcexttoFcCJI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49471: rtw89: cfo: check mac_id to avoid out-of-bounds Date: Wed, 26 Feb 2025 03:12:25 +0100 Message-ID: <2025022602-CVE-2022-49471-4e82@gregkh> X-Mailer: git-send-email 2.48.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=2932; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ArYOjjGkCCWCqSX0cO8y1RjV4f+f5plKykJfAq+bGqs=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yn/xnOTd3vdX+KyhjERVgePSmytmN4SvDpl60Eil+ c62tiCFjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIeiPDgrkN6w1Wt+YHX7X8 GO0V27RCS3x+JMP86gl3JXKeXtQyOGe79sX7iv+/lC60AQA= 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: rtw89: cfo: check mac_id to avoid out-of-bounds Somehow, hardware reports incorrect mac_id and pollute memory. Check index before we access the array. UBSAN: array-index-out-of-bounds in rtw89/phy.c:2517:23 index 188 is out of range for type 's32 [64]' CPU: 1 PID: 51550 Comm: irq/35-rtw89_pc Tainted: G OE Call Trace: show_stack+0x52/0x58 dump_stack_lvl+0x4c/0x63 dump_stack+0x10/0x12 ubsan_epilogue+0x9/0x45 __ubsan_handle_out_of_bounds.cold+0x44/0x49 ? __alloc_skb+0x92/0x1d0 rtw89_phy_cfo_parse+0x44/0x7f [rtw89_core] rtw89_core_rx+0x261/0x871 [rtw89_core] ? __alloc_skb+0xee/0x1d0 rtw89_pci_napi_poll+0x3fa/0x4ea [rtw89_pci] __napi_poll+0x33/0x1a0 net_rx_action+0x126/0x260 ? __queue_work+0x217/0x4c0 __do_softirq+0xd9/0x315 ? disable_irq_nosync+0x10/0x10 do_softirq.part.0+0x6d/0x90 __local_bh_enable_ip+0x62/0x70 rtw89_pci_interrupt_threadfn+0x182/0x1a6 [rtw89_pci] irq_thread_fn+0x28/0x60 irq_thread+0xc8/0x190 ? irq_thread_fn+0x60/0x60 kthread+0x16b/0x190 ? irq_thread_check_affinity+0xe0/0xe0 ? set_kthread_struct+0x50/0x50 ret_from_fork+0x22/0x30 The Linux kernel CVE team has assigned CVE-2022-49471 to this issue. Affected and fixed versions =========================== Fixed in 5.17.14 with commit 03ed236480aeec8c2fd327a1ea6d711364c495e3 Fixed in 5.18.3 with commit c32fafe68298bb599e825c298e1d0ba30186f0a5 Fixed in 5.19 with commit 97df85871a5b187609d30fca6d85b912d9e02f29 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-2022-49471 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/phy.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/03ed236480aeec8c2fd327a1ea6d711364c495e3 https://git.kernel.org/stable/c/c32fafe68298bb599e825c298e1d0ba30186f0a5 https://git.kernel.org/stable/c/97df85871a5b187609d30fca6d85b912d9e02f29