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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain BPF privileges on mlx5 host
  2. Delivery
    Attach multi-buffer XDP adjusting head/tail
  3. Exploit
    Receive traffic through XDP path
  4. Execution
    Driver miscomputes skb from xdp_buff
  5. Persist
    Trigger BUG_ON / malformed skb
  6. Impact
    Kernel crash or data exposure

Vulnerability Assessment

Exploitation Conditions

Exploitation requires a system running the Linux kernel mlx5e driver on NVIDIA/Mellanox ConnectX hardware configured for striding RQ, AND an attached multi-buffer XDP (eBPF) program that changes the xdp_buff layout via bpf_xdp_adjust_head() or bpf_xdp_adjust_tail(); the corruption is then triggered by received packets processed through that program. Limiting factors: loading/attaching an XDP program requires CAP_BPF/CAP_NET_ADMIN privileges, so this is not reachable by an unauthenticated remote actor despite the AV:N/PR:N CVSS vector; it further depends on the specific mlx5 hardware, striding-RQ mode, and use of multi-buffer XDP, none of which are universal defaults.

Impact

The NVD-supplied CVSS of 9.8 (AV:N/AC:L/PR:N/UI:N/C:H/I:H/A:H) is the automated maximum applied to many kernel CVEs and materially overstates real-world risk here. Exploitation is gated on a privileged precondition the vector ignores: a multi-buffer XDP/eBPF program that adjusts buffer head or tail must already be attached to an mlx5 interface, which requires CAP_BPF/CAP_NET_ADMIN, plus the specific hardware and striding-RQ configuration. The primary observed impact is a kernel warning or BUG_ON (denial of service via crash), with possible erroneous skb contents; the 'Information Disclosure' tag suggests malformed buffers could leak adjacent data, but this is not confirmed by the description. Corroborating signals argue for low urgency: EPSS is 0.17% (7th percentile), there is no KEV listing, and no POC. Conflict to flag explicitly: CVSS claims network vector with no privileges (AV:N/PR:N), but the description implies the trigger requires a locally loaded privileged XDP program - verify against the actual threat model before treating this as remotely exploitable by an unauthenticated attacker.

Exploit ScenarioDerived

An operator or attacker with BPF privileges on a host using an mlx5 NIC attaches a multi-buffer XDP program that shrinks packet tails via bpf_xdp_adjust_tail(); as traffic arrives, the driver miscomputes the pull length and trips the BUG_ON in __pskb_pull_tail(), crashing the kernel. A variant that grows headroom via bpf_xdp_adjust_head() produces malformed skbs, potentially exposing uninitialized buffer data. No public exploit code was identified at time of analysis.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 30, 2026

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.

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.

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.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

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

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

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.

Executive ViewAI

Why It Matters

Mellanox ConnectX network adapter driver in the Linux kernel contains a memory handling flaw (CVSS 9.8) that causes kernel crashes when XDP packet programs modify buffer layouts. Organizations using this hardware with eBPF workloads face potential service disruption; no public exploit identified at time of analysis, but critical severity demands immediate inventory and risk mitigation.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Upstream kernel fix has been merged; distribution patches are pending. Interim mitigations: (1) Disable or temporarily pause XDP programs on vulnerable systems if operationally feasible; (2) implement kernel panic detection and automatic restart/alerting for mlx5e BUG_ON events; (3) prepare rapid failover procedures for services dependent on Mellanox-equipped infrastructure; (4) monitor your Linux distribution's security advisories for backported fixes.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
High
mlx5/ConnectX NICs dominate cloud and datacenter high-speed networking
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

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