BREACHSPIDER
CVE databaseVendorsIntelFeaturesDevelopersDocsPricingSign inStart free trial

CVE-2025-39987 in Kernel products

High 7.8

In the Linux kernel, the following vulnerability has been resolved: can: hi311x: 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...

Affects 1 product from 5 vendors. Facts below cite their sources.

CVSS 3.17.8
EPSS0.3%
EPSS percentile11th
FixUnknown

Requires local access, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Kernel — —
Linux Linux 4.12
Protocol — —
Socket — —
Valid — —

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official description

In the Linux kernel, the following vulnerability has been resolved: can: hi311x: 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, hi3110_hard_start_xmit() receives a CAN XL frame which it is not able to correctly handle and will thus misinterpret it as a CAN frame. The driver will consume frame->len as-is with no further checks. This can result in a buffer overflow later on in hi3110_hw_tx() on this line: memcpy(buf + HI3110_FIFO_EXT_DATA_OFF, frame->data, frame->len); Here, frame->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! 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2025-39987
BreachSpider IDBS-2025-GLOBAL-257768-I
CVSS vectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published2025-10-15
Last modified2026-10-19
SourceNVD

Analysis AI-written, not human-reviewed

A buffer overflow vulnerability exists in the hi311x CAN driver of the Linux kernel due to the lack of proper implementation of the ndo_change_mtu() function. This allows an attacker to bypass the CAN framework logic and directly reach the xmit() function of the CAN driver, potentially leading to arbitrary code execution or system compromise.

An attacker can exploit this vulnerability by sending a PF_PACKET with a crafted packet that exceeds the interface's MTU. The lack of proper MTU validation in the ndo_change_mtu() function allows the packet to be processed by the xmit() function, leading to a buffer overflow.

Questions

What is CVE-2025-39987?

A buffer overflow vulnerability exists in the hi311x CAN driver of the Linux kernel due to the lack of proper implementation of the ndo_change_mtu() function. This allows an attacker to bypass the CAN framework logic and directly reach the xmit() function of the CAN driver, potentially leading to arbitrary code execution or system compromise.

What is the CVSS score for CVE-2025-39987?

CVE-2025-39987 has CVSS 7.8 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.3%.

Is CVE-2025-39987 actively exploited?

No confirmed active exploitation of CVE-2025-39987 as of 2026-10-25.

How do I remediate CVE-2025-39987?

Priority: HIGH.

What systems are affected by CVE-2025-39987?

CVE-2025-39987 affects Kernel; Linux Linux; Protocol; Socket; Valid.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Kernel","product":"EDS-518A","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-19.