Compiler Removal of Code to Clear Buffers Affecting glibc package, versions [2.39,]


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-GLIBC-10667940
  • published10 Jul 2025
  • disclosed5 Jun 2025
  • creditUnknown

Introduced: 5 Jun 2025

CVE-2025-5745  (opens in a new tab)
CWE-14  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

Affected versions of this package are vulnerable to Compiler Removal of Code to Clear Buffers due to the strncmp implementation optimized for the Power10 processor. An attacker can alter the control flow of the caller or leak sensitive input strings to other parts of the program. This occurs because glibc writes to vector registers v20 to v31, which are defined as non-volatile registers, without saving contents from the caller, resulting in overwriting of their contents.

Note: This issue is identical to CVE-2025-5702, and was introduced introduced due to code being copied over from strcmp.

Workaround

This vulnerability can be mitigated by disabling the Power10 optimized string routines in glibc, by setting the glibc.cpu.hwcaps tunable. This can be done by exporting the GLIBC_TUNABLES environment variable like so: export GLIBC_TUNABLES=glibc.cpu.hwcaps=-arch_3_1

CVSS Base Scores

version 4.0
version 3.1