CVE-2026-50185

RustCrypto Cmov/CmovEq on aarch64 can produce wrong results if high-bits of registers are set

Published Jul 17, 2026 CVSS 4.0 · 2 Low EPSS < 1% KEV · Not listed
Description
RustCrypto CMOV provides conditional move CPU intrinsics which are guaranteed on major platforms to execute in constant-time and not be rewritten as branches by the compiler. From 0.1.1 until 0.5.4, the aarch64 implementations of Cmov and CmovEq in cmov/src/backends/aarch64.rs assume high bits are zero-extended when loading values smaller than a register, so set high bits such as [8..] in a Cmov selector or [16..] of self or other in the u16 and i16 CmovEq implementations can cause left.cmovz(&right, condition) to produce incorrect output. This issue is fixed in version 0.5.4.

Analysis

AI-generated

Technical impact

RustCrypto utils implements the Cmov and CmovEq intrinsics to guarantee constant‑time behavior across major platforms. In versions 0.1.1 through 0.5.4, the aarch64 backend incorrectly assumes that sub‑register loads are zero‑extended, allowing high bits beyond the intended width to influence the selector or operand values. As a result, calls to left.cmovz(&right, condition) can return an incorrect value when high bits such as [8..] in the selector or [16..] of the operands are set. This defect compromises the library’s constant‑time guarantees and is identified as a failure to behave correctly (CWE‑758).

Affected Systems

The issue affects RustCrypto’s utils library, specifically the cmov module on aarch64 processors. Any installation of the library from release 0.1.1 up to and including 0.5.4 is vulnerable when user code imports these intrinsics on an aarch64 architecture. The vulnerability does not expand beyond the immediate library; it does not impact other platforms or versions.

Risk and Exploitability

The CVSS score of 2.0 indicates a low severity impact. The EPSS score of less than 1% suggests that exploitation is unlikely. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is code that imports the affected library on an aarch64 system and supplies values with high bits set to the Cmov/CmovEq functions, thereby producing incorrect results rather than causing a crash or privilege escalation. Because the consequence is incorrect calculations rather than a systemic compromise, the risk to confidentiality, integrity, or availability is minimal. Applying the vendor’s fix in version 0.5.4 or later eliminates the flaw.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the RustCrypto utils library to version 0.5.4 or later where the bug is fixed.
  • Ensure that any value passed to Cmov/CmovEq is masked so that bits beyond the type width are cleared before the function is called.
  • If an upgrade cannot be performed immediately, replace or patch the aarch64 backend to enforce zero‑extension on sub‑register loads until the official fix is applied.

Generated by OpenCVE AI on July 30, 2026 at 23:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-3rjw-m598-pq24 Cmov/CmovEq on aarch64 can produce wrong results if high-bits of registers are set
History
Type Values Removed Values Added
First Time appeared Rustcrypto cmov
CPEs cpe:2.3:a:rustcrypto:cmov:*:*:*:*:*:rust:*:*
Vendors & Products Rustcrypto cmov
Metrics cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rustcrypto
Rustcrypto utils
Vendors & Products Rustcrypto
Rustcrypto utils
Type Values Removed Values Added
Description RustCrypto CMOV provides conditional move CPU intrinsics which are guaranteed on major platforms to execute in constant-time and not be rewritten as branches by the compiler. From 0.1.1 until 0.5.4, the aarch64 implementations of Cmov and CmovEq in cmov/src/backends/aarch64.rs assume high bits are zero-extended when loading values smaller than a register, so set high bits such as [8..] in a Cmov selector or [16..] of self or other in the u16 and i16 CmovEq implementations can cause left.cmovz(&right, condition) to produce incorrect output. This issue is fixed in version 0.5.4.
Title RustCrypto Cmov/CmovEq on aarch64 can produce wrong results if high-bits of registers are set
Weaknesses CWE-758
References
Metrics cvssV4_0

{'score': 2, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-758

    Reliance on Undefined, Unspecified, or Implementation-Defined Behavior

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 20, 2026, 7:24 PM
Reserved
Jun 3, 2026, 10:05 PM
Status
Analyzed
Published
Jul 17, 2026, 7:17 PM
Modified
Oct 24, 2026, 8:10 PM