In the Linux kernel, the following vulnerability has been resolved: ethtool: Avoid overflowing userspace buffer on stats query The ethtool -S… (CVE-2025-68795)
A vulnerability in the Linux kernel's ethtool utility could cause a userspace buffer overflow during statistics queries if the number of stats changes between ioctl calls. This occurs because ethtool's -S command uses multiple ioctl calls to retrieve stats size, names, and values, and dynamic stat counters in some drivers can cause mismatches leading to incorrect buffer allocation. The issue has been addressed by modifying ethtool functions to return zero stats when a size mismatch is detected, preventing buffer overflow and resulting in either no stats output or all-zero stats temporarily. This fix does not eliminate the underlying race condition but prevents overflow and improves behavior predictability.
AI Analysis
Technical Summary
The Linux kernel vulnerability CVE-2025-68795 involves the ethtool utility's -S command, which queries device statistics via three ioctl calls: ETHTOOL_GSSET_INFO, ETHTOOL_GSTRINGS, and ETHTOOL_GSTATS. If the number of statistics changes between these calls due to dynamic counters in certain drivers (e.g., mlx5, bnx2x, bna, ksz884x), userspace may allocate an incorrect buffer size, leading to a potential buffer overflow. Some drivers attempt partial mitigation, but these do not fully address the issue. The patch changes ethtool_get_strings(), ethtool_get_stats(), and ethtool_get_phy_stats() to return zero stats if a mismatch is detected, avoiding overflow. This results in either no stats output or all-zero stats temporarily, which is preferable to incorrect or shifted stats. The patch does not fix the inherent race condition but prevents overflow and improves predictability. The race window exists between ioctl calls when the RTNL lock is released.
Potential Impact
The vulnerability can lead to a userspace buffer overflow when querying network device statistics with ethtool if the number of stats changes dynamically between ioctl calls. This could cause memory corruption in userspace applications using ethtool, potentially leading to crashes or other unintended behavior. The fix prevents buffer overflow by returning zero stats in case of mismatch, which may cause transient loss of stats output or zeroed stats but avoids presenting incorrect data. There are no known exploits in the wild. The impact is rated high due to potential confidentiality, integrity, and availability consequences from buffer overflow.
Mitigation Recommendations
A fix has been implemented in the Linux kernel ethtool code to prevent userspace buffer overflow by returning zero stats when a size mismatch is detected during stats queries. This fix does not eliminate the underlying race condition but prevents overflow and improves behavior predictability. Users should update to a Linux kernel version that includes this patch once available. Until then, be aware that transient no-output or zeroed stats may occur during ethtool -S queries but this is preferable to buffer overflow. Monitor vendor advisories for the official patch release and apply it promptly.
In the Linux kernel, the following vulnerability has been resolved: ethtool: Avoid overflowing userspace buffer on stats query The ethtool -S… (CVE-2025-68795)
Description
A vulnerability in the Linux kernel's ethtool utility could cause a userspace buffer overflow during statistics queries if the number of stats changes between ioctl calls. This occurs because ethtool's -S command uses multiple ioctl calls to retrieve stats size, names, and values, and dynamic stat counters in some drivers can cause mismatches leading to incorrect buffer allocation. The issue has been addressed by modifying ethtool functions to return zero stats when a size mismatch is detected, preventing buffer overflow and resulting in either no stats output or all-zero stats temporarily. This fix does not eliminate the underlying race condition but prevents overflow and improves behavior predictability.
CVSS v3.1
Score 7.8high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel vulnerability CVE-2025-68795 involves the ethtool utility's -S command, which queries device statistics via three ioctl calls: ETHTOOL_GSSET_INFO, ETHTOOL_GSTRINGS, and ETHTOOL_GSTATS. If the number of statistics changes between these calls due to dynamic counters in certain drivers (e.g., mlx5, bnx2x, bna, ksz884x), userspace may allocate an incorrect buffer size, leading to a potential buffer overflow. Some drivers attempt partial mitigation, but these do not fully address the issue. The patch changes ethtool_get_strings(), ethtool_get_stats(), and ethtool_get_phy_stats() to return zero stats if a mismatch is detected, avoiding overflow. This results in either no stats output or all-zero stats temporarily, which is preferable to incorrect or shifted stats. The patch does not fix the inherent race condition but prevents overflow and improves predictability. The race window exists between ioctl calls when the RTNL lock is released.
Potential Impact
The vulnerability can lead to a userspace buffer overflow when querying network device statistics with ethtool if the number of stats changes dynamically between ioctl calls. This could cause memory corruption in userspace applications using ethtool, potentially leading to crashes or other unintended behavior. The fix prevents buffer overflow by returning zero stats in case of mismatch, which may cause transient loss of stats output or zeroed stats but avoids presenting incorrect data. There are no known exploits in the wild. The impact is rated high due to potential confidentiality, integrity, and availability consequences from buffer overflow.
Mitigation Recommendations
A fix has been implemented in the Linux kernel ethtool code to prevent userspace buffer overflow by returning zero stats when a size mismatch is detected during stats queries. This fix does not eliminate the underlying race condition but prevents overflow and improves behavior predictability. Users should update to a Linux kernel version that includes this patch once available. Until then, be aware that transient no-output or zeroed stats may occur during ethtool -S queries but this is preferable to buffer overflow. Monitor vendor advisories for the official patch release and apply it promptly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-fv49-mrx3-2jvj
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-68795"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d19c2644c7f847739c
Added to database: 07/30/2026, 15:50:41 UTC
Last enriched: 07/30/2026, 19:09:47 UTC
Last updated: 09/10/2026, 19:26:52 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.