CVE-2025-38665

can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode

MEDIUM
5.5
CVSS Score
Published: August 22, 2025 at 04:02 PM UTC
Updated: June 17, 2026 at 09:17 AM UTC
2 products affected across 2 vendorsLinux KernelDebian Linux

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: can: netlink: can_changelink(): fix NULL pointer deref of struct can_priv::do_set_mode Andrei Lalaev reported a NULL pointer deref when a CAN device is restarted from Bus Off and the driver does not implement the struct can_priv::do_set_mode callback. There are 2 code path that call struct can_priv::do_set_mode: - directly by a manual restart from the user space, via can_changelink() - delayed automatic restart after bus off (deactivated by default) To prevent the NULL pointer deference, refuse a manual restart or configure the automatic restart delay in can_changelink() and report the error via extack to user space. As an additional safety measure let can_restart() return an error if can_priv::do_set_mode is not set instead of dereferencing it unchecked.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.31 ≤ v < 6.1.1482.6.31 ≤ v < 6.12.412.6.31 ≤ v < 6.15.92.6.31 ≤ v < 6.162.6.31 ≤ v < 6.6.1016.13 ≤ v < 6.15.96.2 ≤ v < 6.6.1016.7 ≤ v < 6.12.412.6.3139549eef3587f1c1e8c65c88a2400d10fd30ea176.16 rc16.16 rc26.16 rc36.16 rc46.16 rc56.16 rc66.16 rc7
Vendor states this is fixed in 0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5 (fixed)
Vendor states this is fixed in 6acceb46180f9e160d4f0c56fcaf39ba562822ae (fixed)
Vendor states this is fixed in 6bbcf37c5114926c99a1d1e6993a5b35689d2599 (fixed)
Vendor states this is fixed in c1f3f9797c1f44a762e6f5f72520b2e520537b52 (fixed)
Vendor states this is fixed in cf81a60a973358dea163f6b14062f17831ceb894 (fixed)
Vendor states this is fixed in 2.6.31 (unaffected)
Vendor states this is fixed in 6.1.148 (unaffected)
Vendor states this is fixed in 6.12.41 (unaffected)
Vendor states this is fixed in 6.15.9 (unaffected)
Vendor states this is fixed in 6.16 (unaffected)
Vendor states this is fixed in 6.6.101 (unaffected)

References (6)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6acceb46180f9e160d4f0c56fcaf39ba562822ae
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6bbcf37c5114926c99a1d1e6993a5b35689d2599
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c1f3f9797c1f44a762e6f5f72520b2e520537b52
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cf81a60a973358dea163f6b14062f17831ceb894
Third Party Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card