Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-39702

CVE-2025-39702: Linux Kernel Timing Attack Vulnerability

CVE-2025-39702 is a timing attack flaw in the Linux Kernel's IPv6 segment routing MAC comparison that could expose sensitive data. This article covers the technical details, affected versions, security impact, and mitigation.

Published:

CVE-2025-39702 Overview

CVE-2025-39702 is a timing side-channel vulnerability in the Linux kernel's IPv6 Segment Routing (SRv6) implementation. The flaw resides in the Hash-based Message Authentication Code (HMAC) verification path, where MAC values were compared using a non-constant-time routine. This behavior falls under [CWE-203: Observable Discrepancy], enabling an attacker to infer secret MAC bytes by measuring comparison latency. The kernel maintainers resolved the issue by switching to a constant-time comparison helper. The vulnerability affects multiple upstream Linux kernel branches, including 6.17 release candidates, and Debian Linux 11.0.

Critical Impact

A local attacker with low privileges can leverage timing measurements against SRv6 HMAC verification to recover authentication material and compromise segment routing integrity.

Affected Products

  • Linux Kernel (multiple stable branches, including 6.17-rc1 and 6.17-rc2)
  • Debian Linux 11.0
  • Siemens products referenced in advisory SSA-032379

Discovery Timeline

  • 2025-09-05 - CVE-2025-39702 published to NVD
  • 2026-07-30 - Last updated in NVD database

Technical Details for CVE-2025-39702

Vulnerability Analysis

The defect exists in the IPv6 Segment Routing (ipv6/sr) subsystem of the Linux kernel. SRv6 supports optional HMAC authentication on segment routing headers to protect against tampering. The kernel verifies inbound packets by computing an expected MAC and comparing it against the value carried in the SRH TLV. The original implementation used a byte-wise comparison that returns early on the first mismatched byte. This behavior leaks the position of the first differing byte through measurable execution time. An attacker who can send crafted SRv6 packets and observe response timing can iteratively guess MAC bytes. Recovering the MAC undermines the authentication guarantee of segment routing and allows forged routing headers to be accepted as valid.

Root Cause

The root cause is the use of a variable-time memory comparison for security-sensitive MAC verification. Secure MAC checks must complete in time independent of input contents. The patch replaces the vulnerable comparison with the kernel's constant-time helper, eliminating the observable timing discrepancy.

Attack Vector

Exploitation requires local access with low privileges and high attack complexity, as reflected in the CVSS vector. The attacker must repeatedly submit SRv6 packets and collect precise timing measurements to statistically recover MAC bytes. Successful exploitation impacts confidentiality, integrity, and availability of segment routing operations. See the Linux kernel commit for the fix for the specific code change.

No verified public proof-of-concept code is available for this issue. Refer to the upstream commit series for the exact comparison logic replaced by the constant-time helper.

Detection Methods for CVE-2025-39702

Indicators of Compromise

  • Unusual volumes of SRv6-encapsulated packets targeting a single host from a local network segment
  • Repeated malformed or duplicate SRH HMAC TLV values observed in kernel netlink or nftables traces
  • Anomalous CPU or scheduler latency spikes correlated with inbound IPv6 segment routing traffic

Detection Strategies

  • Enable kernel auditing on the ipv6_sr module and monitor for elevated MAC verification failures
  • Correlate host telemetry with network flow data to identify local peers generating high-rate SRv6 probes
  • Track kernel version and patch state across the fleet to identify hosts still exposed to the flaw

Monitoring Recommendations

  • Alert on any process running as a non-privileged user generating sustained IPv6 raw socket traffic
  • Baseline SRv6 traffic patterns and flag deviations that suggest timing measurement campaigns
  • Ingest kernel and syslog data into a centralized analytics platform for cross-host correlation

How to Mitigate CVE-2025-39702

Immediate Actions Required

  • Apply vendor-supplied kernel updates from your Linux distribution as soon as they become available
  • Inventory hosts running affected kernel versions, including any 6.17 release candidates in test environments
  • Review Siemens systems referenced in Siemens Security Advisory SSA-032379 for exposure
  • Restrict local shell access and IPv6 raw socket privileges to trusted users only

Patch Information

The upstream fix replaces the vulnerable comparison with a constant-time helper. Multiple stable-branch backports are available, including commits 3b348c9c8d2c, 3ddd55cf19ed, 86b6d34717fe, a458b2902115, b3967c493799, f7878d47560d, and ff55a452d564. Debian users should apply updates announced in the Debian LTS Security Announcement.

Workarounds

  • Disable IPv6 Segment Routing HMAC verification on hosts that do not require SRv6 authentication
  • Unload the seg6 kernel module on systems that do not use segment routing: modprobe -r seg6
  • Restrict local user access to CAP_NET_RAW and CAP_NET_ADMIN capabilities to reduce local attack surface
bash
# Verify kernel version and confirm the seg6 module status
uname -r
lsmod | grep seg6

# Remove the seg6 module if SRv6 is not required
sudo modprobe -r seg6

# Prevent the module from loading at boot
echo "blacklist seg6" | sudo tee /etc/modprobe.d/blacklist-seg6.conf

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.