CVE-2025-40238
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40238 is a NULL pointer dereference vulnerability in the Linux kernel's net/mlx5 driver, specifically affecting IPsec cleanup over Multi-Path VLAN (MPV) devices. The flaw occurs during mlx5e_detach_netdev(), where blocking event notifiers are disabled before the devcom device is properly unregistered, allowing a peer device to reference an invalid (already freed) netdev pointer during subsequent devcom events. The vulnerability was published on December 4, 2025, and affects the Linux kernel. It carries an estimated CVSS severity of Medium, with an EPSS score of approximately 0.017% (Feedly).

Technical details

The root cause is a race condition / improper sequencing during device teardown in the mlx5 network driver (CWE-476: NULL Pointer Dereference). When mlx5e_detach_netdev() is called, it disables blocking event notifiers — including IPsec MPV events relayed from the InfiniBand layer to the core — before unregistering the devcom device and marking its operations as complete. This leaves a window during which a peer device can fire a devcom event referencing the now-invalid netdev pointer, triggering a kernel NULL pointer dereference at mlx5_devcom_comp_set_ready+0x5. The crash manifests as a kernel Oops with address 0x0000000000000010, as shown in the kernel trace included in the CVE description (Feedly).

Impact

Successful triggering of this vulnerability causes a kernel NULL pointer dereference, resulting in a kernel panic (system crash) and denial of service on the affected host. The impact is limited to availability — confidentiality and integrity are not directly affected. Systems running the Linux kernel with Mellanox ConnectX (mlx5) NICs configured with IPsec over MPV are at risk, particularly in environments where devlink or similar tools trigger device detach operations (Feedly).

Exploitability

There is no known public exploit code or evidence of in-the-wild exploitation for CVE-2025-40238. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is very low at approximately 0.017%, reflecting minimal exploitation probability. Exploitation requires local access to a system with an mlx5-based NIC configured for IPsec over MPV, and the triggering condition involves a specific device detach sequence (e.g., via devlink), making opportunistic exploitation unlikely (Feedly).

Mitigation and workarounds

The fix has been committed to the Linux kernel stable tree, ensuring that mlx5e_detach_netdev() unregisters the devcom device and marks all device operations as complete before disabling blocking event notifiers. Administrators should update to a patched kernel version that includes commits 7e212cebc863, 664f76be38a1, or 8956686d398e (or their distribution-specific equivalents). Major Linux distributions including SUSE have issued kernel security updates addressing this CVE, detectable via Nessus and Qualys scanners (Feedly). As a workaround, avoiding hot-detach of mlx5 devices configured with IPsec over MPV can reduce exposure until a patched kernel is applied.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

linux

Fixed

sid

linux: 6.17.6-1

Fixed

trixie

linux: 6.12.57-1

Fixed

Ubuntu

Fixed

bionic

linux

Not Affected

bionic (esm-infra)

linux

Not Affected

bionic (fips-updates)

linux-fips

Not Affected

bionic (fips)

linux-fips

Not Affected

devel

linux

Not Affected

focal

linux

Not Affected

focal (esm-infra)

linux

Not Affected

focal (fips-updates)

linux-fips

Not Affected

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

kernel-rt.src

Affected

RHEL 10

kernel.src

Affected

SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-80904MEDIUM5.9
  • Linux Kernel logoLinux Kernel
  • linux-hwe-5.15
NoYesSep 04, 2026
CVE-2026-80905MEDIUM5.5
  • Linux Kernel logoLinux Kernel
  • linux-ibm-5.15
NoYesSep 04, 2026
CVE-2026-80913MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-aws-fips
NoYesSep 04, 2026
CVE-2026-80912MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-riscv-6.17
NoYesSep 04, 2026
CVE-2026-80906NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-nvidia
NoYesSep 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management