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 0146B3F9C5 for ; Fri, 27 Dec 2024 13:54: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=1735307697; cv=none; b=pPGCs/rNIDVQNrKr3opbgyxMkh6/Dcr8uWmHzuuaunfwW1/j3bUni7kGownXbg5rNQpXLegwXYiSfYkEmPoVrTNgUy0MUi14j/P6PYSZdVwIasbx5/a8DSL8d8+2fc5Uj+d54d0NCMqZOwHbw8hM6kpVAwDFnNzmykVVHoiPT0c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735307697; c=relaxed/simple; bh=YGCFJ6lYFNqFBO8fVyiX4BYYRACHCKUUgXADdVtiUcE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RwvhX9jwSaixVgLO29X1D7zWWcQrz+mlRsPlp0PLjWIx1ijPG3mV3sunV7Knu8LYjQUHN5puOepqnMS92Y80mqEHICdVcWbQr2MzebbuJ+d7cfGHIapT8Fbatdeim81+oyD2HeRDUdB5DYjt7RIcu3htJyg6se3G9oeM7e+M7cM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=g4/g7MZy; 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="g4/g7MZy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56A16C4CED0; Fri, 27 Dec 2024 13:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735307696; bh=YGCFJ6lYFNqFBO8fVyiX4BYYRACHCKUUgXADdVtiUcE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=g4/g7MZyHSagKdqtZ0MWR0PdMthR7rSlcGohKCra4Xpqm0cx5hSiS56NjUgk6P6DV cgrhhjH3SSHZeiAe6S+38TJENRs1KHOu9Z0nx9Oi0xL7E6XgU2Kdx0PZs3o9ntXz/S e/EiKyA/1fnDZNGIN71L+kXp6SP3NzNPWI/WaFHQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53209: bnxt_en: Fix receive ring space parameters when XDP is active Date: Fri, 27 Dec 2024 14:52:55 +0100 Message-ID: <2024122729-CVE-2024-53209-b6b2@gregkh> X-Mailer: git-send-email 2.47.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=4345; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YGCFJ6lYFNqFBO8fVyiX4BYYRACHCKUUgXADdVtiUcE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5G2XteA/2XDB99f3mxnVupWt598+e/G6/uWtv3pXap t19dUtkO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAifpIMC872z019b1aawKe6 /dCP7U9fFCW/52CYH2eSH6TNtXdzXu160QvPn1t+UD3mDQA= 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: bnxt_en: Fix receive ring space parameters when XDP is active The MTU setting at the time an XDP multi-buffer is attached determines whether the aggregation ring will be used and the rx_skb_func handler. This is done in bnxt_set_rx_skb_mode(). If the MTU is later changed, the aggregation ring setting may need to be changed and it may become out-of-sync with the settings initially done in bnxt_set_rx_skb_mode(). This may result in random memory corruption and crashes as the HW may DMA data larger than the allocated buffer size, such as: BUG: kernel NULL pointer dereference, address: 00000000000003c0 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 17 PID: 0 Comm: swapper/17 Kdump: loaded Tainted: G S OE 6.1.0-226bf9805506 #1 Hardware name: Wiwynn Delta Lake PVT BZA.02601.0150/Delta Lake-Class1, BIOS F0E_3A12 08/26/2021 RIP: 0010:bnxt_rx_pkt+0xe97/0x1ae0 [bnxt_en] Code: 8b 95 70 ff ff ff 4c 8b 9d 48 ff ff ff 66 41 89 87 b4 00 00 00 e9 0b f7 ff ff 0f b7 43 0a 49 8b 95 a8 04 00 00 25 ff 0f 00 00 <0f> b7 14 42 48 c1 e2 06 49 03 95 a0 04 00 00 0f b6 42 33f RSP: 0018:ffffa19f40cc0d18 EFLAGS: 00010202 RAX: 00000000000001e0 RBX: ffff8e2c805c6100 RCX: 00000000000007ff RDX: 0000000000000000 RSI: ffff8e2c271ab990 RDI: ffff8e2c84f12380 RBP: ffffa19f40cc0e48 R08: 000000000001000d R09: 974ea2fcddfa4cbf R10: 0000000000000000 R11: ffffa19f40cc0ff8 R12: ffff8e2c94b58980 R13: ffff8e2c952d6600 R14: 0000000000000016 R15: ffff8e2c271ab990 FS: 0000000000000000(0000) GS:ffff8e3b3f840000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000003c0 CR3: 0000000e8580a004 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: __bnxt_poll_work+0x1c2/0x3e0 [bnxt_en] To address the issue, we now call bnxt_set_rx_skb_mode() within bnxt_change_mtu() to properly set the AGG rings configuration and update rx_skb_func based on the new MTU value. Additionally, BNXT_FLAG_NO_AGG_RINGS is cleared at the beginning of bnxt_set_rx_skb_mode() to make sure it gets set or cleared based on the current MTU. The Linux kernel CVE team has assigned CVE-2024-53209 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 08450ea98ae98d5a35145b675b76db616046ea11 and fixed in 6.11.11 with commit bf54a7660fc8d2166f41ff1d67a643b15d8b2250 Issue introduced in 6.5 with commit 08450ea98ae98d5a35145b675b76db616046ea11 and fixed in 6.12.2 with commit 84353386762a0a16dd444ead76c012e167d89b41 Issue introduced in 6.5 with commit 08450ea98ae98d5a35145b675b76db616046ea11 and fixed in 6.13-rc1 with commit 3051a77a09dfe3022aa012071346937fdf059033 Issue introduced in 6.1.45 with commit 421e02bda0570eeb11636544fe97ec3097d1bb92 Issue introduced in 6.4.10 with commit 893096a7e5fd61cb666b4ead2fa69324e1f2aade 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-2024-53209 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/broadcom/bnxt/bnxt.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/bf54a7660fc8d2166f41ff1d67a643b15d8b2250 https://git.kernel.org/stable/c/84353386762a0a16dd444ead76c012e167d89b41 https://git.kernel.org/stable/c/3051a77a09dfe3022aa012071346937fdf059033