CVE-2025-38665

5.5 MEDIUM

📋 TL;DR

A NULL pointer dereference vulnerability in the Linux kernel's CAN (Controller Area Network) subsystem allows local attackers to crash the kernel when restarting CAN devices from Bus Off state if the driver lacks a specific callback function. This affects systems using CAN network interfaces with drivers that don't implement the do_set_mode callback. The vulnerability requires local access to trigger.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE description, but patches are available in stable kernel trees.
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with CAN network interfaces using drivers that don't implement can_priv::do_set_mode callback. Industrial, automotive, and embedded systems are most likely affected.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash and denial of service, potentially disrupting industrial control systems, automotive systems, or other CAN-dependent applications.

🟠

Likely Case

Local denial of service through kernel crash when userspace attempts to restart a CAN device from Bus Off state with an affected driver.

🟢

If Mitigated

No impact if proper kernel patches are applied or if affected drivers aren't used.

🌐 Internet-Facing: LOW - Requires local access to trigger, not remotely exploitable.
🏢 Internal Only: MEDIUM - Local users or processes with CAN device permissions can cause denial of service.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local access and ability to interact with CAN devices. Exploitation involves triggering CAN device restart from Bus Off state.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel trees (commits referenced in CVE)

Vendor Advisory: https://git.kernel.org/stable/c/0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5

Restart Required: No

Instructions:

1. Update Linux kernel to version containing fixes from referenced commits. 2. For distributions: Apply security updates from your vendor. 3. Recompile kernel if building from source with patches applied.

🔧 Temporary Workarounds

Disable automatic CAN restart

Linux

Configure CAN devices to not automatically restart after bus off, reducing attack surface.

echo 0 > /sys/class/net/canX/restart_ms

Restrict CAN device access

Linux

Limit access to CAN device interfaces to trusted users only.

chmod 600 /dev/canX
setfacl -m u:trusteduser:rw /dev/canX

🧯 If You Can't Patch

  • Restrict local user access to systems with CAN devices
  • Disable unused CAN interfaces or modules

🔍 How to Verify

Check if Vulnerable:

Check kernel version and verify if CAN modules are loaded: lsmod | grep can

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated beyond patch commits, check dmesg for CAN-related crashes

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in dmesg/system logs
  • CAN-related crash reports
  • NULL pointer dereference errors mentioning can_changelink or can_restart

Network Indicators:

  • CAN bus disruption events

SIEM Query:

source="kernel" AND ("NULL pointer dereference" OR "can_changelink" OR "can_restart")

🔗 References

📤 Share & Export