# CVE-2025-38665: can: netlink: can\_changelink(): fix NULL pointer deref of struct can\_priv::do\_set\_mode

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-08-22 · Modified: 2026-11-05
- Aliases: UBUNTU-CVE-2025-38665, DEBIAN-CVE-2025-38665
- Record: https://cvemate.com/vulnerability/CVE-2025-38665 · JSON: https://cvemate.com/vulnerability/CVE-2025-38665/json

## Description

```text
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.
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.18%, percentile 7.835%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 153)

- debian linux (Debian): \< 6.1.148-1 \| \< 6.12.41-1 \| \< 6.16.3-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-100.100
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.49
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): \< 6.14.0-1017.17~24.04.1
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1046.49~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.49+fips1
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.52
- ubuntu linux-azure-4.15 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 33)

- <https://git.kernel.org/stable/c/6bbcf37c5114926c99a1d1e6993a5b35689d2599>
- <https://git.kernel.org/stable/c/cf81a60a973358dea163f6b14062f17831ceb894>
- <https://git.kernel.org/stable/c/0ca816a96fdcf32644c80cbe7a82c7b6ce6ddda5>
- <https://git.kernel.org/stable/c/6acceb46180f9e160d4f0c56fcaf39ba562822ae>
- <https://git.kernel.org/stable/c/c1f3f9797c1f44a762e6f5f72520b2e520537b52>
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- <https://ubuntu.com/security/CVE-2025-38665>
- <https://www.cve.org/CVERecord?id=CVE-2025-38665>
- <https://git.kernel.org/linus/c1f3f9797c1f44a762e6f5f72520b2e520537b52>
- <https://ubuntu.com/security/notices/USN-7879-1>
- <https://ubuntu.com/security/notices/USN-7879-2>
- <https://ubuntu.com/security/notices/USN-7880-1>
- <https://ubuntu.com/security/notices/USN-7879-3>
- <https://ubuntu.com/security/notices/USN-7879-4>
- <https://ubuntu.com/security/notices/USN-7934-1>
- <https://ubuntu.com/security/notices/USN-8028-1>
- <https://ubuntu.com/security/notices/USN-8028-2>
- <https://ubuntu.com/security/notices/USN-8031-1>
- <https://ubuntu.com/security/notices/USN-8028-3>
- <https://ubuntu.com/security/notices/USN-8028-4>

---

Data as of 2026-12-06T04:48:45.027Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
