CVE-2026-72341: net/mlx5e: Fix publication race for priv->channel_stats[]
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Fix publication race for priv->channelstats[]
mlx5echannelstatsalloc() publishes a new entry to priv->channelstats[] and then increments priv->statsnch as a publication token, but neither store carries any memory barrier:
priv->channelstats[ix] = kvzallocnode(...); if (!priv->channelstats[ix]) return -ENOMEM; priv->statsnch++;
Concurrent readers compute the loop bound from priv->statsnch and then dereference priv->channelstats[i] using plain accesses, e.g.
for (i = 0; i < priv->statsnch; i++) { struct mlx5echannelstats cs = priv->channelstats[i]; ... cs->rq.packets ... }
On weakly-ordered architectures (ARM, PowerPC, RISC-V) the writes to channelstats[ix] and statsnch may become visible to other CPUs out of program order. A reader can observe statsnch == N while still seeing channelstats[N-1] == NULL, leading to a NULL pointer dereference in the channelstats loop.
This has been observed in production on BlueField-3 DPUs (arm64), where ovs-vswitchd queries netdev statistics over netlink during NIC bringup, racing mlx5eopenchannel() -> mlx5echannelstatsalloc() on another CPU:
Unable to handle kernel NULL pointer dereference at virtual address 0x840 Hardware name: BlueField-3 DPU pc : mlx5efoldswstats64+0x30/0x180 [mlx5core] Call trace: mlx5efoldswstats64+0x30/0x180 [mlx5core] devgetstats+0x50/0xc0 ovsvportgetstats+0x38/0xac [openvswitch] ovsvportcmdfillinfo+0x194/0x290 [openvswitch] ovsvportcmdget+0xbc/0x10c [openvswitch] genlfamilyrcvmsgdoit+0xd0/0x160 genlrcvmsg+0xec/0x1f0 netlinkrcvskb+0x64/0x130 genlrcv+0x40/0x60 netlinkunicast+0x2fc/0x370 netlinksendmsg+0x1dc/0x454 ... arm64syssendmsg+0x2c/0x40
Add mlx5estatsnchwrite() and mlx5estatsnchread() helpers in en.h that wrap the smpstorerelease()/smploadacquire() pair on statsnch. The release/acquire pair establishes the contract:
statsnch == N => channelstats[0..N-1] are visible and non-NULL.
Publish the statsnch increment via mlx5estatsnchwrite() in the writer (mlx5echannelstatsalloc()), and read statsnch via mlx5estatsnchread() in all readers: mlx5e RX/TX queue stats, mlx5egetbasestats(), ethtool channels stats, IPoIB stats, the swstats fold and the HV VHCA stats agent.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.114 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.40 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.1.5 - Upgrade
Upgrade
ubuntu/linux-aws-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1014.14~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-fde-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1016.16~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1014.14~24.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-38.38~24.04.4 - Upgrade
Upgrade
ubuntu/linux-oracle-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1013.13~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-38.38.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-38.38 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1014.14 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.0.0-1016.16 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1014.14 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 7.0.0-1008.9 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1015.15 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1015.15 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1013.13 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.0.0-38.38.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-38.38.1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.1.5-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.12-1Fixed in 7.2.14-1 - Compensating control
In the mlx5e driver, add mlx5e_stats_nch_write() and mlx5e_stats_nch_read() helpers in en.h that wrap smp_store_release()/smp_load_acquire() on stats_nch; use the write helper in mlx5e_channel_stats_alloc() and the read helper in all stats_nch readers, including mlx5e RX/TX queue stats, mlx5e_get_base_stats(), ethtool channel stats, IPoIB stats, the sw_stats fold, and the HV VHCA stats agent.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-72341?
CVE-2026-72341 has a risk rating of 37.
What type of vulnerability is CVE-2026-72341?
CVE-2026-72341 is classified as a null pointer dereference vulnerability in the Linux kernel.
How do I fix CVE-2026-72341?
To fix CVE-2026-72341, update to the latest version of the Linux kernel where the vulnerability has been addressed.
What impacts does CVE-2026-72341 have on system performance?
CVE-2026-72341 could lead to undefined behavior due to memory access issues, potentially impacting system stability.
Is CVE-2026-72341 exploitable in production environments?
Yes, CVE-2026-72341 is exploitable if the vulnerable version of the Linux kernel is running in a production environment.