CVE-2025-60695
Executive Summary
CVE-2025-60695 is a critical stack-based buffer overflow vulnerability discovered in the mtk_dut binary of Linksys E7350 routers running firmware version 1.1.00.032. The flaw resides in the function sub_4045A8, which reads up to 256 bytes from the file /sys/class/net/%s/address into a local buffer and then copies it into a caller-provided buffer a1 using strcpy without boundary checks. Since a1 is often allocated with significantly smaller sizes (20-32 bytes), a local attacker who can control the contents of /sys/class/net/%s/address can trigger a buffer overflow. This can lead to memory corruption, denial of service, or potential arbitrary code execution. The vulnerability is currently unpatched, and no public exploit code or proof-of-concept is available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in a consumer networking device.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is likely a placeholder. Based on the vulnerability description, a more realistic assessment would be:
- Attack Vector (AV): Local (L) – The attacker must have local access to the device.
- Attack Complexity (AC): Low (L) – The attack requires control over a system file.
- Privileges Required (PR): Low (L) – The attacker needs low-privileged access to the device.
- User Interaction (UI): None (N) – No user interaction is required.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): High (H) – Potential for arbitrary code execution.
- Integrity (I): High (H) – Potential for arbitrary code execution.
- Availability (A): High (H) – Denial of service is possible.
Estimated CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Estimated Score: 7.8 (High)
Threat Level: High. Although local access is required, the potential for arbitrary code execution on a network gateway device poses a significant risk to network security.
Deep Dive & Mechanics
The vulnerability is a classic stack-based buffer overflow in the mtk_dut binary, which is likely a diagnostic or utility tool for MediaTek chipsets used in the Linksys E7350 router.
Root Cause:
The function sub_4045A8 performs the following operations:
- Reads up to 256 bytes from the file
/sys/class/net/%s/addressinto a local stack buffer. The%sis replaced with a network interface name (e.g.,eth0,wlan0). - Copies the contents of this local buffer into a caller-provided buffer
a1using thestrcpyfunction. - The caller-provided buffer
a1is often allocated with a size of only 20-32 bytes, which is significantly smaller than the maximum 256 bytes that can be read.
Attack Vector:
A local attacker with low privileges on the router can control the contents of /sys/class/net/%s/address by manipulating the network interface's MAC address (e.g., via ip link set dev eth0 address <malicious_data>). When mtk_dut is invoked and processes this interface, the oversized MAC address is copied into the small buffer, causing a stack overflow.
Impact:
- Memory Corruption: Overwriting adjacent stack data.
- Denial of Service (DoS): Crashing the
mtk_dutprocess or the entire system. - Arbitrary Code Execution: With careful crafting, an attacker could overwrite the return address and execute arbitrary code with the privileges of the
mtk_dutprocess (likely root).
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
void sub_4045A8(char *interface, char *a1) {
char local_buffer[256];
char path[256];
snprintf(path, sizeof(path), "/sys/class/net/%s/address", interface);
FILE *f = fopen(path, "r");
if (f) {
fgets(local_buffer, sizeof(local_buffer), f);
fclose(f);
// Vulnerable: no size check on a1
strcpy(a1, local_buffer);
}
}
Patched Code (Hypothetical):
void sub_4045A8(char *interface, char *a1, size_t a1_size) {
char local_buffer[256];
char path[256];
snprintf(path, sizeof(path), "/sys/class/net/%s/address", interface);
FILE *f = fopen(path, "r");
if (f) {
fgets(local_buffer, sizeof(local_buffer), f);
fclose(f);
// Patched: use strncpy with size limit
strncpy(a1, local_buffer, a1_size - 1);
a1[a1_size - 1] = '\0';
}
}
The patch would involve passing the size of the destination buffer and using strncpy or snprintf instead of strcpy.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Local access to a Linksys E7350 router running firmware 1.1.00.032.
- Ability to execute commands as a low-privileged user (e.g., via a compromised web interface or SSH).
Exploitation Steps:
- Identify the vulnerable interface: Determine which network interface is processed by
mtk_dut. This may require reverse engineering or trial and error. - Craft a malicious MAC address: Create a MAC address string that contains shellcode and padding to overwrite the return address.
# Example: 256 bytes of 'A' to trigger a crash python3 -c "print('AA:BB:CC:DD:EE:FF' + 'A'*240)" > /tmp/mac_payload.txt - Set the malicious MAC address:
ip link set dev eth0 address $(cat /tmp/mac_payload.txt) - Trigger the vulnerability: Run the
mtk_dutbinary with the appropriate interface argument.mtk_dut eth0 - Achieve code execution: If the payload is crafted correctly, the return address will be overwritten, and the shellcode will execute.
Note: No public exploit code is available. This is a theoretical exploitation path.
Blue Team
Detection:
- Monitor for unusual MAC address lengths on network interfaces.
- Monitor for crashes or restarts of the
mtk_dutprocess. - Monitor for unexpected writes to
/sys/class/net/*/address.
Mitigation:
- Restrict access to the router's command line interface.
- Disable unnecessary services like
mtk_dutif not required. - Apply network segmentation to limit local access to the router.
Indicators of Compromise (IOCs)
- File:
/sys/class/net/*/addresscontaining data longer than 17 characters (standard MAC address length). - Process: Crashes or abnormal behavior of the
mtk_dutbinary. - Logs: System logs showing
mtk_dutsegmentation faults or core dumps. - Network: Unusual MAC addresses on the router's interfaces.
Detection Engineering
YARA Rule
rule CVE_2025_60695_Linksys_E7350_Overflow {
meta:
description = "Detects exploitation attempts of CVE-2025-60695 via oversized MAC address in /sys/class/net/*/address"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-60695"
strings:
$mac_pattern = /([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}/
$long_mac = { ( [0-9A-Fa-f]{2}: ){5} [0-9A-Fa-f]{2} [A-Za-z0-9]{200,} }
condition:
$long_mac and filesize > 30
}
Sigma Rule
title: CVE-2025-60695 - Linksys E7350 Stack Buffer Overflow via MAC Address
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to set an oversized MAC address on a network interface, indicating exploitation of CVE-2025-60695.
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/ip'
CommandLine|contains: 'link set dev'
CommandLine|contains: 'address'
CommandLine|re: '([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}.{200,}'
condition: selection
falsepositives:
- Legitimate use of long MAC addresses (unlikely)
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-60695 - Linksys E7350 Stack Buffer Overflow via MAC Address"; flow:to_server; content:"/sys/class/net/"; content:"/address"; within:100; pcre:"/([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}.{200,}/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Restrict Local Access: Disable SSH, Telnet, and other remote management interfaces if not needed.
- Monitor Logs: Enable logging and monitor for unusual activity related to
mtk_dut. - Network Segmentation: Place the router in a segmented network to limit exposure.
Long-Term Fix:
- Vendor Patch: Linksys must release a firmware update that fixes the buffer overflow by using safe string copy functions with proper size checks.
- Workaround: If
mtk_dutis not essential, remove or disable the binary.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.