Critical Division by Zero Vulnerability in Linux Kernel's stmmac Driver

linux Updated 02 Oct 2025

Summary

03/07/2025
N/A
No i
Unrated
Not published

CVE-2025-38126: In the Linux kernel, the following vulnerability has been resolved: net: stmmac: make sure that ptp_rate is not 0 before configuring timestamping The stmmac platform drivers that do not open-code the clk_ptp_rate value a... Affects linux versions 5.10.103-1 – 6.9.9-1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Linux kernel is a core component of many operating systems, providing essential services for hardware and software interaction. The stmmac driver is responsible for managing Ethernet interfaces, enabling network connectivity. This driver is widely used across various hardware platforms, including STM32 devices. The vulnerability in question arises from improper handling of the clk_ptp_rate value, which can lead to critical errors during timestamping configuration.

Vulnerability Detail

In the Linux kernel, specifically within the stmmac driver, a vulnerability exists where the clk_ptp_rate value may be set to zero if not properly initialized. This can occur when the driver retrieves the default value from the device-tree but fails to validate it. As a result, during the PTP (Precision Time Protocol) initialization, a division by zero error can occur, potentially leading to system crashes or undefined behavior. This vulnerability affects systems running kernel versions prior to the patch and can be exploited during network interface initialization.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can manually check the clk_ptp_rate value before initializing the PTP timestamping. If the value is zero, the initialization process should be halted, and an error message should be logged to prevent the division by zero error.

Conclusion

The CVE-2025-38126 vulnerability in the Linux kernel's stmmac driver poses a significant risk due to the potential for division by zero errors. Users are strongly advised to update their kernel to the latest patched version to ensure system stability and security. For those unable to update immediately, implementing a manual check for the clk_ptp_rate value can serve as a temporary workaround.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

CVE-2025-38126 is a vulnerability in the Linux kernel's stmmac driver that can lead to a division by zero error during PTP initialization.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

The vulnerability can cause system crashes or undefined behavior due to a division by zero error during network interface initialization.

Yes, a patch has been released for the Linux kernel. Users should update to the latest version to mitigate the vulnerability.

As a temporary measure, ensure that the clk_ptp_rate value is validated before PTP initialization to prevent the division by zero error.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback