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 D8B607DA93 for ; Tue, 1 Apr 2025 15:47:49 +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=1743522469; cv=none; b=fycknK+ZU23DvyMlVawKoIp50o+LJ/PESxqkZwaJPpnqdv0/58945KZU+d4KS864ni7YFDhEy1waMr/67zc6IJTXVLw5o2Kt+oSydj1kOKpmKEcghk005RihEscFBNLs5UHSaQTuAFXFcYNGT8S4Uk/iVRlG4mLpeJ7XTVmMmWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522469; c=relaxed/simple; bh=nUXB70eGKTPH/rjc9VRhBPdwADAFDHmfz71qVFyxRdA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Hl9HNoM5C6TJULj9IGCw9r1QrVflxKpfhHmgTdVLpUn35FEF2F7cLvZPjDZdNmuslURmZC4BSa3Co94bgyCCmWzcrOWZosM2j3tzPnI4ETqnjPqACJ9ZwcWWXdTGPR821JKVlN4yG8t9WL+JZJmFAXpnb0uA0StglFZyon86FjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p7nY1x6O; 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="p7nY1x6O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1102EC4CEE4; Tue, 1 Apr 2025 15:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522469; bh=nUXB70eGKTPH/rjc9VRhBPdwADAFDHmfz71qVFyxRdA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=p7nY1x6OG6LfprJRJX1KWMfqkX4iQkRjZRTz/fPu77FBoUwAILHK3M+sjppROD3a9 q5Pfg5elQ6SUw9NQouSIFgMXcGP2QCpzGn9IL3XNuVSxIeZ+SysIIJE2ghA+OaoC4h ac/fjGiNcqKZTX2ZZ8xhsXTLVHBJ94TLpBCOKV+c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21960: eth: bnxt: do not update checksum in bnxt_xdp_build_skb() Date: Tue, 1 Apr 2025 16:45:45 +0100 Message-ID: <2025040144-CVE-2025-21960-14ae@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=5227; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nUXB70eGKTPH/rjc9VRhBPdwADAFDHmfz71qVFyxRdA=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvuDQe20p8ff3ygwLre8bJX3f7zMs/mPQ5fYujWMu/u TUT9XQSOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi1y0ZFmwqPHdqyvFqp+Wf I2YZW/ovt5zM/ZVhnqL5+ZmPFyw60FUutvFu+PH2j+y2TQA= 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: eth: bnxt: do not update checksum in bnxt_xdp_build_skb() The bnxt_rx_pkt() updates ip_summed value at the end if checksum offload is enabled. When the XDP-MB program is attached and it returns XDP_PASS, the bnxt_xdp_build_skb() is called to update skb_shared_info. The main purpose of bnxt_xdp_build_skb() is to update skb_shared_info, but it updates ip_summed value too if checksum offload is enabled. This is actually duplicate work. When the bnxt_rx_pkt() updates ip_summed value, it checks if ip_summed is CHECKSUM_NONE or not. It means that ip_summed should be CHECKSUM_NONE at this moment. But ip_summed may already be updated to CHECKSUM_UNNECESSARY in the XDP-MB-PASS path. So the by skb_checksum_none_assert() WARNS about it. This is duplicate work and updating ip_summed in the bnxt_xdp_build_skb() is not needed. Splat looks like: WARNING: CPU: 3 PID: 5782 at ./include/linux/skbuff.h:5155 bnxt_rx_pkt+0x479b/0x7610 [bnxt_en] Modules linked in: bnxt_re bnxt_en rdma_ucm rdma_cm iw_cm ib_cm ib_uverbs veth xt_nat xt_tcpudp xt_conntrack nft_chain_nat xt_MASQUERADE nf_] CPU: 3 UID: 0 PID: 5782 Comm: socat Tainted: G W 6.14.0-rc4+ #27 Tainted: [W]=WARN Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021 RIP: 0010:bnxt_rx_pkt+0x479b/0x7610 [bnxt_en] Code: 54 24 0c 4c 89 f1 4c 89 ff c1 ea 1f ff d3 0f 1f 00 49 89 c6 48 85 c0 0f 84 4c e5 ff ff 48 89 c7 e8 ca 3d a0 c8 e9 8f f4 ff ff <0f> 0b f RSP: 0018:ffff88881ba09928 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 00000000c7590303 RCX: 0000000000000000 RDX: 1ffff1104e7d1610 RSI: 0000000000000001 RDI: ffff8881c91300b8 RBP: ffff88881ba09b28 R08: ffff888273e8b0d0 R09: ffff888273e8b070 R10: ffff888273e8b010 R11: ffff888278b0f000 R12: ffff888273e8b080 R13: ffff8881c9130e00 R14: ffff8881505d3800 R15: ffff888273e8b000 FS: 00007f5a2e7be080(0000) GS:ffff88881ba00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff2e708ff8 CR3: 000000013e3b0000 CR4: 00000000007506f0 PKRU: 55555554 Call Trace: ? __warn+0xcd/0x2f0 ? bnxt_rx_pkt+0x479b/0x7610 ? report_bug+0x326/0x3c0 ? handle_bug+0x53/0xa0 ? exc_invalid_op+0x14/0x50 ? asm_exc_invalid_op+0x16/0x20 ? bnxt_rx_pkt+0x479b/0x7610 ? bnxt_rx_pkt+0x3e41/0x7610 ? __pfx_bnxt_rx_pkt+0x10/0x10 ? napi_complete_done+0x2cf/0x7d0 __bnxt_poll_work+0x4e8/0x1220 ? __pfx___bnxt_poll_work+0x10/0x10 ? __pfx_mark_lock.part.0+0x10/0x10 bnxt_poll_p5+0x36a/0xfa0 ? __pfx_bnxt_poll_p5+0x10/0x10 __napi_poll.constprop.0+0xa0/0x440 net_rx_action+0x899/0xd00 ... Following ping.py patch adds xdp-mb-pass case. so ping.py is going to be able to reproduce this issue. The Linux kernel CVE team has assigned CVE-2025-21960 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit 1dc4c557bfedfcdf7fc0c46795857773b7ad66e7 and fixed in 6.1.132 with commit e8e3e03d69f2420eaa578199a65d281c58867105 Issue introduced in 5.19 with commit 1dc4c557bfedfcdf7fc0c46795857773b7ad66e7 and fixed in 6.6.84 with commit ee086c8e775f9690282e3d26471dbcfd5dad5a6a Issue introduced in 5.19 with commit 1dc4c557bfedfcdf7fc0c46795857773b7ad66e7 and fixed in 6.12.20 with commit 5b57ed14a1b85e7ab0074d9668a0baa6c94826c7 Issue introduced in 5.19 with commit 1dc4c557bfedfcdf7fc0c46795857773b7ad66e7 and fixed in 6.13.8 with commit 44578bc6460b8fca530fc7bd5897c115d9bd27e2 Issue introduced in 5.19 with commit 1dc4c557bfedfcdf7fc0c46795857773b7ad66e7 and fixed in 6.14 with commit c03e7d05aa0e2f7e9a9ce5ad8a12471a53f941dc 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-21960 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 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h 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/e8e3e03d69f2420eaa578199a65d281c58867105 https://git.kernel.org/stable/c/ee086c8e775f9690282e3d26471dbcfd5dad5a6a https://git.kernel.org/stable/c/5b57ed14a1b85e7ab0074d9668a0baa6c94826c7 https://git.kernel.org/stable/c/44578bc6460b8fca530fc7bd5897c115d9bd27e2 https://git.kernel.org/stable/c/c03e7d05aa0e2f7e9a9ce5ad8a12471a53f941dc