CVE-2026-72341

Source
https://cve.org/CVERecord?id=CVE-2026-72341
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72341.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-72341
Downstream
Published
2026-08-15T05:55:47.764Z
Modified
2026-08-16T03:48:37.294721324Z
Summary
net/mlx5e: Fix publication race for priv->channel_stats[]
Details

In the Linux kernel, the following vulnerability has been resolved:

net/mlx5e: Fix publication race for priv->channel_stats[]

mlx5echannelstatsalloc() publishes a new entry to priv->channelstats[] 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->statsnch and then dereference priv->channelstats[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 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 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 mlx5eopenchannel() -> mlx5echannelstats_alloc() 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 netlink_sendmsg+0x1dc/0x454 ... __arm64syssendmsg+0x2c/0x40

Add mlx5estatsnchwrite() and mlx5estatsnchread() helpers in en.h that wrap the smpstorerelease()/smploadacquire() pair on stats_nch. 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 sw_stats fold and the HV VHCA stats agent.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72341.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
fa691d0c9c0812b9045f3a9420862e47b3b92518
Fixed
5c7e3755abf663f033de24f917b77685e9543045
Fixed
815515ec68f527ca755cb1e2c1ff9148f6b3ea56
Fixed
5a799714e8ca0bce9ea40694f49914cf1adbbaa9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72341.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
6.18.40
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.5

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72341.json"