Skip to main content

Linux Kernel CVE-2025-40350

CRITICAL
2025-12-16 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Critical
Disputed · 9.8 Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Sources disagree (Medium–Critical)
Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
4.7 MEDIUM

Trigger needs a privileged XDP program on specific mlx5/striding-RQ config, so AV:L/AC:H/PR:H; impact is mainly kernel crash (A:H) with possible minor leak (C:L).

3.1 AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:H
4.0 AV:L/AC:H/AT:P/PR:H/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat
6.4 MEDIUM
qualitative

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 07:33 vuln.today
CVE Published
Dec 16, 2025 - 14:15 cve.org
CRITICAL 9.8

DescriptionCVE.org

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

net/mlx5e: RX, Fix generating skb from non-linear xdp_buff for striding RQ

XDP programs can change the layout of an xdp_buff through bpf_xdp_adjust_tail() and bpf_xdp_adjust_head(). Therefore, the driver cannot assume the size of the linear data area nor fragments. Fix the bug in mlx5 by generating skb according to xdp_buff after XDP programs run.

Currently, when handling multi-buf XDP, the mlx5 driver assumes the layout of an xdp_buff to be unchanged. That is, the linear data area continues to be empty and fragments remain the same. This may cause the driver to generate erroneous skb or triggering a kernel warning. When an XDP program added linear data through bpf_xdp_adjust_head(), the linear data will be ignored as mlx5e_build_linear_skb() builds an skb without linear data and then pull data from fragments to fill the linear data area. When an XDP program has shrunk the non-linear data through bpf_xdp_adjust_tail(), the delta passed to __pskb_pull_tail() may exceed the actual nonlinear data size and trigger the BUG_ON in it.

To fix the issue, first record the original number of fragments. If the number of fragments changes after the XDP program runs, rewind the end fragment pointer by the difference and recalculate the truesize. Then, build the skb with the linear data area matching the xdp_buff. Finally, only pull data in if there is non-linear data and fill the linear part up to 256 bytes.

AnalysisAI

Memory mishandling in the Linux kernel's mlx5e (NVIDIA/Mellanox ConnectX) RX path lets a loaded XDP program corrupt skb generation on striding RQ, causing kernel warnings, a BUG_ON crash, or erroneous packet buffers. The flaw affects systems using mlx5 NICs where a multi-buffer XDP program calls bpf_xdp_adjust_head() or bpf_xdp_adjust_tail() to change the xdp_buff layout, which the driver wrongly assumed was static. This is a resolved upstream kernel fix with no public exploit identified at time of analysis; EPSS is low at 0.17% (7th percentile) and it is not in CISA KEV.

Technical ContextAI

The bug lives in the mlx5 Ethernet driver's receive handling for striding receive queues (RQ), part of the kernel's XDP (eXpress Data Path) fast-path packet processing. XDP programs are eBPF programs attached to a NIC that can resize a packet buffer via bpf_xdp_adjust_head() (adds/removes linear headroom) and bpf_xdp_adjust_tail() (grows/shrinks the trailing fragment data). After running the program, mlx5e_build_linear_skb() rebuilt the socket buffer using the driver's original assumptions rather than the current xdp_buff state: added linear data was ignored, and a shrunk non-linear region caused the delta handed to __pskb_pull_tail() to exceed the real fragment size, tripping its BUG_ON. The root-cause class is a state-desynchronization / incorrect-length-calculation memory safety bug (no CWE was assigned in the input). The fix records the original fragment count, rewinds the end-fragment pointer by the difference, recalculates truesize, builds the skb to match the actual xdp_buff, and pulls up to 256 bytes of linear data only when non-linear data exists.

Affected ProductsAI

The affected product is the Linux kernel, specifically the net/mlx5e driver used by NVIDIA/Mellanox ConnectX-family network adapters, on systems using striding receive queues with multi-buffer XDP. Exact affected version ranges are not provided in the input (no CPE strings were supplied and CWE is N/A); the four stable-tree commits at git.kernel.org (87bcef1, 8b051d7, cb9edd5, f2557d7) indicate the fix was backported across multiple stable branches, implying several longterm kernel series were affected. Administrators should map these commit hashes to their distribution's kernel package to determine exposure. No dedicated vendor advisory URL beyond the kernel.org commit references was included.

RemediationAI

Upstream fix available (commit); released patched version not independently confirmed - apply the kernel update from your distribution that incorporates the mlx5e RX fix, tracked by kernel.org stable commits https://git.kernel.org/stable/c/87bcef158ac1faca1bd7e0104588e8e2956d10be, https://git.kernel.org/stable/c/8b051d7f530e8a5237da242fbeafef02fec6b813, https://git.kernel.org/stable/c/cb9edd583e23979ee546981be963ad5f217e8b18, and https://git.kernel.org/stable/c/f2557d7fa38e9475b38588f5c124476091480f53. Until patched, the practical compensating control is to avoid attaching multi-buffer XDP programs that call bpf_xdp_adjust_head()/bpf_xdp_adjust_tail() on mlx5 interfaces, or to detach such programs - trade-off: this disables XDP-based acceleration/filtering on those NICs. Restricting who can load eBPF/XDP (tightening CAP_BPF/CAP_NET_ADMIN grants and unprivileged BPF via kernel.unprivileged_bpf_disabled=1) reduces the attack surface, at the cost of blocking legitimate BPF tooling; switching the mlx5 RX mode away from striding RQ is another option but can reduce throughput.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/sl-micro/6.0/baremetal-os-container:latest Affected
Container suse/sl-micro/6.0/base-os-container:2.1.3-7.95 Image SL-Micro Affected
Container suse/sl-micro/6.0/kvm-os-container:2.1.3-6.115 Affected
Container suse/sl-micro/6.0/rt-os-container:2.1.3-7.146 Affected
Container suse/sl-micro/6.0/toolbox:latest Affected

Share

CVE-2025-40350 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy