Skip to main content
EPSS 0.2%top 94%

Linux azure: In the Linux kernel, the following vulnerability has been resolved: can: mcba_usb: populate ndo_change_mtu() to prevent buffer overflow Sending an… (CVE-2025-39985)

0
Medium
Published: 10/15/2025 (10/15/2025, 08:15:00 UTC)
Source: GCVE Database
Product: linux-azure

Description

In the Linux kernel, the following vulnerability has been resolved: can: mcba_usb: 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 mcba_usb 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, mcba_usb_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 these lines: usb_msg.dlc = cf->len; memcpy(usb_msg.data, cf->data, usb_msg.dlc); 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! 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.

CVSS v3.1

Score 7.8high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

Affected versions
<5.15.0-1100.107~20.04.2<5.15.0-1110.119~20.04.1<5.15.0-1100.109~20.04.1<5.15.0-170.180~20.04.3<5.15.0-1094.97~20.04.1

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 15:56:16 UTC

Technical Analysis

The Linux kernel mcba_usb CAN driver did not implement the ndo_change_mtu() operation, allowing attackers to set an invalid MTU (e.g., 9999) on the CAN interface. This invalid MTU setting enables bypassing of CAN framework logic when sending packets via PF_PACKET sockets with the ETH_P_CANXL protocol. The driver misinterprets malicious CAN XL frames, leading to a buffer overflow when copying frame data without proper length validation. The root cause was fixed by populating ndo_change_mtu() to restrict MTU values to valid CAN_MTU limits, preventing buffer overflow conditions.

Potential Impact

An attacker with local privileges can exploit this vulnerability to cause a buffer overflow in the mcba_usb CAN driver. This can lead to memory corruption with potential consequences including denial of service or privilege escalation. The vulnerability affects the integrity, availability, and confidentiality of the system due to the high severity rating.

Mitigation Recommendations

A fix is available that populates the net_device_ops->ndo_change_mtu() callback in the mcba_usb driver to enforce valid MTU limits. Users should apply the official Linux kernel updates that include this patch to prevent exploitation. Patch status is not explicitly confirmed in the provided data; check the vendor advisory or Linux kernel mailing lists for the official fix and update accordingly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-w6wp-c53v-mq5f
Osv Schema Version
1.4.0
Aliases
["CVE-2025-39985"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6b72d79c2644c7f847bb18

Added to database: 07/30/2026, 15:50:47 UTC

Last enriched: 07/30/2026, 15:56:16 UTC

Last updated: 09/10/2026, 19:36:50 UTC

Views: 16

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses