Skip to main content

Linux Kernel CVE-2025-38440

MEDIUM
Race Condition (CWE-362)
2025-07-25 416baaa9-dc9f-4396-8d5f-8c081fb06d67
4.7
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
4.7 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI
4.7 MEDIUM

Local race condition requires concurrent scheduling precision (AC:H, AV:L); only kernel crash is achievable, with no data exposure (C:N/I:N/A:H).

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

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 08:50 vuln.today
CVE Published
Jul 25, 2025 - 16:15 nvd
MEDIUM 4.7

DescriptionNVD

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

net/mlx5e: Fix race between DIM disable and net_dim()

There's a race between disabling DIM and NAPI callbacks using the dim pointer on the RQ or SQ.

If NAPI checks the DIM state bit and sees it still set, it assumes rq->dim or sq->dim is valid. But if DIM gets disabled right after that check, the pointer might already be set to NULL, leading to a NULL pointer dereference in net_dim().

Fix this by calling synchronize_net() before freeing the DIM context. This ensures all in-progress NAPI callbacks are finished before the pointer is cleared.

Kernel log:

BUG: kernel NULL pointer dereference, address: 0000000000000000 ... RIP: 0010:net_dim+0x23/0x190 ... Call Trace: <TASK> ? __die+0x20/0x60 ? page_fault_oops+0x150/0x3e0 ? common_interrupt+0xf/0xa0 ? sysvec_call_function_single+0xb/0x90 ? exc_page_fault+0x74/0x130 ? asm_exc_page_fault+0x22/0x30 ? net_dim+0x23/0x190 ? mlx5e_poll_ico_cq+0x41/0x6f0 [mlx5_core] ? sysvec_apic_timer_interrupt+0xb/0x90 mlx5e_handle_rx_dim+0x92/0xd0 [mlx5_core] mlx5e_napi_poll+0x2cd/0xac0 [mlx5_core] ? mlx5e_poll_ico_cq+0xe5/0x6f0 [mlx5_core] busy_poll_stop+0xa2/0x200 ? mlx5e_napi_poll+0x1d9/0xac0 [mlx5_core] ? mlx5e_trigger_irq+0x130/0x130 [mlx5_core] __napi_busy_loop+0x345/0x3b0 ? sysvec_call_function_single+0xb/0x90 ? asm_sysvec_call_function_single+0x16/0x20 ? sysvec_apic_timer_interrupt+0xb/0x90 ? pcpu_free_area+0x1e4/0x2e0 napi_busy_loop+0x11/0x20 xsk_recvmsg+0x10c/0x130 sock_recvmsg+0x44/0x70 __sys_recvfrom+0xbc/0x130 ? __schedule+0x398/0x890 __x64_sys_recvfrom+0x20/0x30 do_syscall_64+0x4c/0x100 entry_SYSCALL_64_after_hwframe+0x4b/0x53 ... ---[ end trace 0000000000000000 ]--- ... ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

AnalysisAI

NULL pointer dereference in the Linux kernel's mlx5e Ethernet driver (mlx5_core module) causes kernel panic on systems equipped with Mellanox/NVIDIA ConnectX NICs. The race condition between DIM (Dynamic Interrupt Moderation) teardown and concurrent NAPI polling allows a local attacker with low privileges to crash the system, resulting in a complete denial of service. No public exploit code exists and EPSS is 0.11% (1st percentile), indicating near-zero opportunistic exploitation risk; however, the crash can also be triggered spontaneously on production systems under heavy NIC load during DIM reconfiguration.

Technical ContextAI

The vulnerability resides in net/mlx5e, the Ethernet driver for Mellanox/NVIDIA ConnectX NICs within the mlx5_core kernel module. DIM (Dynamic Interrupt Moderation) dynamically adjusts NIC interrupt coalescing based on traffic patterns. The race is a classic TOCTOU (Time-Of-Check-To-Time-Of-Use) pattern (CWE-362): the NAPI poll path reads the DIM enable state bit to determine whether rq->dim or sq->dim is a valid pointer, then dereferences it - but these are two non-atomic operations. A concurrent DIM teardown path can zero the pointer between the check and the dereference, landing net_dim() at address 0x0 and triggering a fatal kernel NULL pointer dereference. The kernel log confirms the crash site is net_dim+0x23, called from mlx5e_handle_rx_dim via mlx5e_napi_poll, with XDP/AF_XDP busy-poll (xsk_recvmsg) as the triggering syscall path. The fix is to call synchronize_net() during DIM teardown, which drains all in-flight NAPI callbacks before the context is freed, eliminating the window. CPE data confirms affected products are cpe:2.3:o:linux:linux_kernel across stable branches and explicitly 6.16-rc1 through 6.16-rc5.

RemediationAI

Apply the upstream kernel fix from the stable patch commits available at https://git.kernel.org/stable/c/2bc6fb90486e42dd80e660ef7a40c02b2516c6d6, https://git.kernel.org/stable/c/7581afc051542e11ccf3ade68acd01b7fb1a3cde, and https://git.kernel.org/stable/c/eb41a264a3a576dc040ee37c3d9d6b7e2d9be968 - one per affected stable branch. Distributions (RHEL, Ubuntu, SUSE, Debian) should be monitored for backported package updates; update the kernel package as soon as vendor builds are available. The exact patched tagged release version is not confirmed in the available data - only commit SHAs are referenced. As a partial operational workaround, administrators can avoid toggling DIM state via ethtool (ethtool --set-coalesce ethX adaptive-rx off or adaptive-tx off) while the NIC is under heavy traffic load, which reduces the probability of hitting the race window. This is not a complete fix, as DIM state transitions can also occur internally. Unloading the mlx5_core module is a drastic workaround that eliminates the vulnerable code path entirely but requires alternative NIC hardware. No confidentiality or integrity trade-offs apply to the patch - the only change is a synchronization barrier added to the DIM teardown path.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Image SLES-Azure-3P Image SLES-Azure-Basic Image SLES-Azure-Standard Image SLES-BYOS-Azure Image SLES-BYOS-EC2 Image SLES-BYOS-GCE Image SLES-CHOST-BYOS-Aliyun Image SLES-CHOST-BYOS-Azure Image SLES-CHOST-BYOS-EC2 Image SLES-CHOST-BYOS-GCE Image SLES-CHOST-BYOS-GDC Image SLES-CHOST-BYOS-SAP-CCloud Image SLES-EC2 Image SLES-EC2-ECS Image SLES-GCE Image SLES-GCE-3P Image SLES-Hardened-BYOS-Azure Image SLES-Hardened-BYOS-EC2 Image SLES-Hardened-BYOS-GCE Image SLES-SAPCAL-Azure Image SLES-SAPCAL-EC2 Image SLES-SAPCAL-GCE Affected
Image SLES-SAP-Azure Image SLES-SAP-Azure-3P Image SLES-SAP-BYOS-Azure Image SLES-SAP-BYOS-EC2 Image SLES-SAP-BYOS-GCE Image SLES-SAP-EC2 Image SLES-SAP-GCE Image SLES-SAP-GCE-3P Affected
Image SLES15-SP7-Azure-3P Image SLES15-SP7-Azure-Basic Image SLES15-SP7-Azure-Standard Image SLES15-SP7-HPC-Azure Affected
Image SLES15-SP7-BYOS-Azure Image SLES15-SP7-BYOS-EC2 Image SLES15-SP7-BYOS-GCE Image SLES15-SP7-CHOST-BYOS-Aliyun Image SLES15-SP7-CHOST-BYOS-Azure Image SLES15-SP7-CHOST-BYOS-EC2 Image SLES15-SP7-CHOST-BYOS-GCE Image SLES15-SP7-CHOST-BYOS-GDC Image SLES15-SP7-CHOST-BYOS-SAP-CCloud Image SLES15-SP7-EC2 Image SLES15-SP7-EC2-ECS-HVM Image SLES15-SP7-GCE Image SLES15-SP7-GCE-3P Image SLES15-SP7-HPC-BYOS-Azure Image SLES15-SP7-HPC-BYOS-EC2 Image SLES15-SP7-HPC-BYOS-GCE Image SLES15-SP7-Hardened-BYOS-Azure Image SLES15-SP7-Hardened-BYOS-EC2 Image SLES15-SP7-Hardened-BYOS-GCE Image SLES15-SP7-SAPCAL-Azure Image SLES15-SP7-SAPCAL-EC2 Image SLES15-SP7-SAPCAL-GCE Affected
Image SLES15-SP7-SAP-Azure Image SLES15-SP7-SAP-Azure-3P Image SLES15-SP7-SAP-Azure-LI-BYOS-Production Image SLES15-SP7-SAP-Azure-VLI-BYOS-Production Image SLES15-SP7-SAP-BYOS-Azure Image SLES15-SP7-SAP-BYOS-EC2 Image SLES15-SP7-SAP-BYOS-GCE Image SLES15-SP7-SAP-EC2 Image SLES15-SP7-SAP-GCE Image SLES15-SP7-SAP-GCE-3P Image SLES15-SP7-SAP-Hardened-Azure Image SLES15-SP7-SAP-Hardened-BYOS-Azure Image SLES15-SP7-SAP-Hardened-BYOS-EC2 Image SLES15-SP7-SAP-Hardened-BYOS-GCE Image SLES15-SP7-SAP-Hardened-GCE Affected

Share

CVE-2025-38440 vulnerability details – vuln.today

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