Skip to content

← Public intelligence

crates.io package

cmov

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.5crates.ioPublished

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

    CVE-2026-50185 · GHSA-3rjw-m598-pq24

    Affected
    • crates.io cmov >= 0.1.1, < 0.5.4
    Fixed in
    0.5.4· Vendor fix available
    Issue
    The aarch64 implementations of Cmov and CmovEq seem to assume that the high bits when loading a value of size smaller than a register into a register are zero-extended. However, this is not the case and these bits are unspecified. This can result in a left.cmovz(&right, condition) not moving right into left, even if condition == 0. Details The Rust reference for inline assembly states that: If a value is of a smaller size than the register it is allocated in then the upper bits of that register will have an undefined value for inputs [..]. Reference If the high bits [8..] of the selector loaded into a register in the Cmov implementation or the high bits [16..] of self or other for CmovEq (specifically the implementation for u16 and i16) are set, the inline asm compares will produce a different result than the Rust code expects based on the narrow types. In other words, the following assert fails, even though condition as u8 is zero: Because the ninth bit is set in the…

    Recommended action: Upgrade to 0.5.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. High, CVSS 8.9crates.ioPublished

    RustCrypto Utilities cmov: thumbv6m-none-eabi compiler emits non-constant time assembly when using cmovnz

    CVE-2026-23519 · GHSA-2gqc-6j2q-83qp

    Affected
    • crates.io cmov < 0.4.4
    Fixed in
    0.4.4· Vendor fix available
    Issue
    thumbv6m-none-eabi (Cortex M0, M0+ and M1) compiler emits non-constant time assembly when using cmovnz (portable version). I did not found any other target with the same behaviour but I did not go through all targets supported by Rust. Details It seems that, during mask computation, an LLVM optimisation pass is detecting that bitnz is returning 0 or 1, that can be interpreted as a boolean. This intermediate value is not masked by a call to blackbox and thus the subsequent .wrappingsub(1) can be interpreted as a conditional bitwise conditional not. PoC This is an attempt at having a minimal faulty code. In a library crate with an up-to-date cmov as only dependency, the content of src/lib.rs is: The resulting assembly emitted (shown using cargo asm --release --target thumbv6m-none-eabi that uses cargo-show-asm): <details <summaryCollapsed assembly</summary </details The non-constant time assembly is: Impact The exact impact is unclear, especially since cmov clearly warns users…

    Recommended action: Upgrade to 0.4.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →