Cloudanix VulnDB

CVE-2025-39986

None

CVSS

—

EPSS

0.2%

Published

Oct 15, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a Linux CAN driver lets a local user send specially crafted network packets that can crash the system or allow them to take control.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Privilege Gain
Component
OS kernel
Class
Buffer Overflow
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

Missing ndo_change_mtu implementation in sun4i_can allows an attacker-set MTU larger than CAN_MTU; a PF_PACKET socket with ETH_P_CANXL then delivers a CAN XL frame that passes can_dev_dropped_skb checks and is misinterpreted as a CAN frame, causing dlc = cf->len (from flags) to drive an unbounded writel loop and overflow the transmit buffer.

Why it matters to the business

Local attackers on systems exposing CAN interfaces can crash the kernel or achieve privilege escalation, disrupting embedded or automotive Linux deployments and forcing emergency patching across fleets.

How an attack unfolds

An attacker with local access configures an oversized MTU on a CAN interface via ip link, opens a PF_PACKET/SOCK_RAW socket bound to ETH_P_CANXL, crafts a canxl_frame with large flags and len values, and transmits it; the frame bypasses CAN framework validation and triggers the unchecked copy loop inside sun4ican_start_xmit.

How to fix it

Upgrade the Linux kernel to a version containing commit 063539db42203b29d5aa2adf0cae3d68c646a6b6 or later; rebuild and deploy the updated kernel on all affected systems. Where immediate patching is impossible, restrict unprivileged access to CAN interfaces and disable PF_PACKET for non-admin users via seccomp or LSM policy.

How to confirm the fix worked

Verify the running kernel contains commit 063539db42203b29d5aa2adf0cae3d68c646a6b6; confirm sun4i_can net_device_ops now includes a populated ndo_change_mtu handler that rejects MTU > CAN_MTU; attempt the ip link mtu change and observe rejection.

Typical attack path

  1. Obtain local shell or container access on the target Linux system
  2. Run ip link set <canX> mtu 9999 to set an invalid MTU
  3. Create PF_PACKET socket with protocol ETH_P_CANXL
  4. Craft and send a malicious canxl_frame via sendto or similar
  5. Trigger buffer overflow and potential kernel panic or code execution

How to detect it

Search kernel logs for oops or panic messages containing sun4ican_start_xmit or can_dev_dropped_skb; inspect audit logs for ip link mtu changes on CAN devices and socket creation with ETH_P_CANXL; correlate with process execution of tools that set non-standard MTU values.

What your security team should do

  • Prioritize kernel upgrade on any host exposing sun4i_can or similar CAN drivers
  • Audit systems for CAN interfaces and remove unnecessary exposure
  • Apply seccomp filters or capabilities restrictions to block PF_PACKET usage by untrusted processes
  • Monitor for kernel oops or panic logs referencing sun4ican_start_xmit

The record

In the Linux kernel, the following vulnerability has been resolved: can: sun4i_can: populate ndo_change_mtu() to prevent buffer overflow Sending an PF_PACKET allows to bypass the CAN framework logic and to directly reach the xmit() function of a CAN driver. The only check which is performed by the PF_PACKET framework is to make sure that skb->len fits the interface's MTU. Unfortunately, because the sun4i_can driver does not populate its net_device_ops->ndo_change_mtu(), it is possible for an attacker to configure an invalid MTU by doing, for example: $ ip link set can0 mtu 9999 After doing so, the attacker could open a PF_PACKET socket using the ETH_P_CANXL protocol: socket(PF_PACKET, SOCK_RAW, htons(ETH_P_CANXL)) to inject a malicious CAN XL frames. For example: struct canxl_frame frame = { .flags = 0xff, .len = 2048, }; The CAN drivers' xmit() function are calling can_dev_dropped_skb() to check that the skb is valid, unfortunately under above conditions, the malicious packet is able to go through can_dev_dropped_skb() checks: 1. the skb->protocol is set to ETH_P_CANXL which is valid (the function does not check the actual device capabilities). 2. the length is a valid CAN XL length. And so, sun4ican_start_xmit() receives a CAN XL frame which it is not able to correctly handle and will thus misinterpret it as a CAN frame. This can result in a buffer overflow. The driver will consume cf->len as-is with no further checks on this line: dlc = cf->len; Here, cf->len corresponds to the flags field of the CAN XL frame. In our previous example, we set canxl_frame->flags to 0xff. Because the maximum expected length is 8, a buffer overflow of 247 bytes occurs a couple line below when doing: for (i = 0; i < dlc; i++) writel(cf->data[i], priv->base + (dreg + i * 4)); Populate net_device_ops->ndo_change_mtu() to ensure that the interface's MTU can not be set to anything bigger than CAN_MTU. By fixing the root cause, this prevents the buffer overflow.

Affected packages

Ecosystem Package Introduced Fixed
Linux Kernel 4.4.0 5.4.300
Mageia:9 kernel 0 6.6.116-1.mga9
Mageia:9 kernel-linus 0 6.6.116-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.14-13.mga9
Mageia:9 kmod-xtables-addons 0 3.24-87.mga9
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise High Availability Extension 15 SP7 kernel-default 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_17 0 1-150600.1.3.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_17 0 1-150600.13.5.1
SUSE:Linux Enterprise Live Patching 15 SP7 kernel-default 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Live Patching 15 SP7 kernel-livepatch-SLE15-SP7_Update_6 0 1-150700.15.3.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-64kb 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default-base 0 6.4.0-150600.23.78.1.150600.12.34.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-source 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-zfcpdump 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-64kb 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-default 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-default-base 0 6.4.0-150700.53.22.1.150700.17.15.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-source 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-zfcpdump 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-docs 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-obs-build 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-source 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-syms 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-docs 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-obs-build 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-source 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-syms 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Legacy 15 SP6 kernel-default 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Module for Legacy 15 SP7 kernel-default 0 6.4.0-150700.53.22.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-azure 0 6.4.0-150600.8.55.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-source-azure 0 6.4.0-150600.8.55.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-syms-azure 0 6.4.0-150600.8.55.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP7 kernel-azure 0 6.4.0-150700.20.18.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP7 kernel-source-azure 0 6.4.0-150700.20.18.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP7 kernel-syms-azure 0 6.4.0-150700.20.18.1
SUSE:Linux Enterprise Workstation Extension 15 SP6 kernel-default 0 6.4.0-150600.23.78.1
SUSE:Linux Enterprise Workstation Extension 15 SP7 kernel-default 0 6.4.0-150700.53.22.1
SUSE:Real Time Module 15 SP6 kernel-rt 0 6.4.0-150600.10.58.1
SUSE:Real Time Module 15 SP6 kernel-rt_debug 0 6.4.0-150600.10.58.1
SUSE:Real Time Module 15 SP6 kernel-source-rt 0 6.4.0-150600.10.58.1
SUSE:Real Time Module 15 SP6 kernel-syms-rt 0 6.4.0-150600.10.58.1
openSUSE:Leap 15.6 dtb-aarch64 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-64kb 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-azure 0 6.4.0-150600.8.55.1
openSUSE:Leap 15.6 kernel-debug 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-default 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-default-base 0 6.4.0-150600.23.78.1.150600.12.34.2
openSUSE:Leap 15.6 kernel-docs 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-kvmsmall 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-obs-build 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-obs-qa 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-rt 0 6.4.0-150600.10.58.1
openSUSE:Leap 15.6 kernel-rt_debug 0 6.4.0-150600.10.58.1
openSUSE:Leap 15.6 kernel-source 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-source-azure 0 6.4.0-150600.8.55.1
openSUSE:Leap 15.6 kernel-source-rt 0 6.4.0-150600.10.58.1
openSUSE:Leap 15.6 kernel-syms 0 6.4.0-150600.23.78.1
openSUSE:Leap 15.6 kernel-syms-azure 0 6.4.0-150600.8.55.1
openSUSE:Leap 15.6 kernel-syms-rt 0 6.4.0-150600.10.58.1
openSUSE:Leap 15.6 kernel-zfcpdump 0 6.4.0-150600.23.78.1
openSUSE:Leap 16.0 dtb-aarch64 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-64kb 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-default 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-default-base 0 6.12.0-160000.6.1.160000.2.4
openSUSE:Leap 16.0 kernel-docs 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-kvmsmall 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-obs-build 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-obs-qa 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-rt 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-source 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-syms 0 6.12.0-160000.7.1
openSUSE:Leap 16.0 kernel-zfcpdump 0 6.12.0-160000.7.1

Related vulnerabilities