Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D9ED4371D11 for ; Sat, 15 Aug 2026 06:23:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786775002; cv=none; b=Zi13X727wAVYrSGwsBQShrr9KggsK/BAfFH0EGc/LD0LcTtZh2f0ysckPuPI6o5MNB1eWOH7MWghUFESqKMfCS1EydP/SfWdbF7PW+iCU2NAqNUZqcKKU7NIQM0LOrWTb5mGNL87P5viZ/isjfdm2J9ajIfeCSOkE8lmow3mKTg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786775002; c=relaxed/simple; bh=Mbj+b3qXaW5sVpSCNpdLQvJ0sqlZd3fEiE7POGuGtsc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=F4pXaWMtH2C7pc/nnoteEXwtl3HGcFq2CidebJsOd0qcSR9AtR9Uq+Oq3LV4k2W8mcIyBU2Uw3rEfEHuopIeV/GPkGLgAsHIXUBZifHihN1cCCiK5F9VmyeSS7YX3lBhhLufIVN65HZimPJxaQgC7cWmIbh3/MswFq5OL0FD5Wo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OliywLSK; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OliywLSK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B671C1F000E9; Sat, 15 Aug 2026 06:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786775000; bh=llBm/69fno6oSXmviB4flU4ZM7+4QROpr4eIYfMtUHg=; h=From:To:Cc:Subject:Date:Reply-To; b=OliywLSKVRF2SDe/FZm0cZXIeDigmul8nhFKFM5DM9zVSgJytP0EeZAWY2Ff9WxZV 8jC614X+HA1id11ZYN09af72Eo43oci6cB/WxMOQnS2fxjg0H7DEhvJBDcCAnB4bnm Z6se7k4MCFhIt+wm9h54C4FsX7pst0UH7ut+lB/Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-72341: net/mlx5e: Fix publication race for priv->channel_stats[] Date: Sat, 15 Aug 2026 15:07:00 +0900 Message-ID: <2026081510-CVE-2026-72341-4b02@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4564; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=55kuVw6W5QVn7vEcPPLcwUncYCaR+C8ew8gBH4ZN/Oc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkNDI/iUtuWO+uJvfuncSLFMsVrJbPkyU7NkJtH1/2+z fzrmQFnRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk7F2GuYKH+Bk8jG/d3jfB 8HBOalWvggvDDoZ5ullX9a+063YZabQf9J/I/ek1W6kbAA== 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: net/mlx5e: Fix publication race for priv->channel_stats[] mlx5e_channel_stats_alloc() publishes a new entry to priv->channel_stats[] and then increments priv->stats_nch as a publication token, but neither store carries any memory barrier: priv->channel_stats[ix] = kvzalloc_node(...); if (!priv->channel_stats[ix]) return -ENOMEM; priv->stats_nch++; Concurrent readers compute the loop bound from priv->stats_nch and then dereference priv->channel_stats[i] using plain accesses, e.g. for (i = 0; i < priv->stats_nch; i++) { struct mlx5e_channel_stats *cs = priv->channel_stats[i]; ... cs->rq.packets ... } On weakly-ordered architectures (ARM, PowerPC, RISC-V) the writes to channel_stats[ix] and stats_nch may become visible to other CPUs out of program order. A reader can observe stats_nch == N while still seeing channel_stats[N-1] == NULL, leading to a NULL pointer dereference in the channel_stats loop. This has been observed in production on BlueField-3 DPUs (arm64), where ovs-vswitchd queries netdev statistics over netlink during NIC bringup, racing mlx5e_open_channel() -> mlx5e_channel_stats_alloc() on another CPU: Unable to handle kernel NULL pointer dereference at virtual address 0x840 Hardware name: BlueField-3 DPU pc : mlx5e_fold_sw_stats64+0x30/0x180 [mlx5_core] Call trace: mlx5e_fold_sw_stats64+0x30/0x180 [mlx5_core] dev_get_stats+0x50/0xc0 ovs_vport_get_stats+0x38/0xac [openvswitch] ovs_vport_cmd_fill_info+0x194/0x290 [openvswitch] ovs_vport_cmd_get+0xbc/0x10c [openvswitch] genl_family_rcv_msg_doit+0xd0/0x160 genl_rcv_msg+0xec/0x1f0 netlink_rcv_skb+0x64/0x130 genl_rcv+0x40/0x60 netlink_unicast+0x2fc/0x370 netlink_sendmsg+0x1dc/0x454 ... __arm64_sys_sendmsg+0x2c/0x40 Add mlx5e_stats_nch_write() and mlx5e_stats_nch_read() helpers in en.h that wrap the smp_store_release()/smp_load_acquire() pair on stats_nch. The release/acquire pair establishes the contract: stats_nch == N => channel_stats[0..N-1] are visible and non-NULL. Publish the stats_nch increment via mlx5e_stats_nch_write() in the writer (mlx5e_channel_stats_alloc()), and read stats_nch via mlx5e_stats_nch_read() in all readers: mlx5e RX/TX queue stats, mlx5e_get_base_stats(), ethtool channels stats, IPoIB stats, the sw_stats fold and the HV VHCA stats agent. The Linux kernel CVE team has assigned CVE-2026-72341 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit fa691d0c9c0812b9045f3a9420862e47b3b92518 and fixed in 6.18.40 with commit 5c7e3755abf663f033de24f917b77685e9543045 Issue introduced in 5.17 with commit fa691d0c9c0812b9045f3a9420862e47b3b92518 and fixed in 7.1.5 with commit 815515ec68f527ca755cb1e2c1ff9148f6b3ea56 Issue introduced in 5.17 with commit fa691d0c9c0812b9045f3a9420862e47b3b92518 and fixed in 7.2-rc3 with commit 5a799714e8ca0bce9ea40694f49914cf1adbbaa9 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-2026-72341 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/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c drivers/net/ethernet/mellanox/mlx5/core/en_main.c drivers/net/ethernet/mellanox/mlx5/core/en_stats.c drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.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/5c7e3755abf663f033de24f917b77685e9543045 https://git.kernel.org/stable/c/815515ec68f527ca755cb1e2c1ff9148f6b3ea56 https://git.kernel.org/stable/c/5a799714e8ca0bce9ea40694f49914cf1adbbaa9