Skip to content
Fencer Intel
no cvss —

RUSTSEC-2026-0385 json

Non-constant-time mask generation and `u128` comparisons

published 19d ago modified 20d ago

cvss
—
not scored
cisa kev
Not listed
not in CISA's catalog
epss
—
no score, EPSS covers CVEs only
public exploits
0
none known

Summary

## Summary

The `ctutils::Choice` type has mask generation functions for each unsigned integer size (`u8`, `u16`, `u32`, `u64`, `u128`). These are `const fn` and therefore can't reuse the `asm!`-backed mask generation in the `cmov` crate that's otherwise used to ensure constant-time.

In releases prior to v0.4.4, the generated code from these functions could include a branch on commonly used platforms. This has been corrected in this release and now verified on several platforms using BINSEC.

Additionally, `u128` comparison operations provided via `ctutils::Choice` and intended to work in constant-time were generating branches on 32-bit targets. This has been resolved via a special case implementation of these functions for such targets.

## Impact

Branch instructions on secret values can potentially leak such values via covert channels. This can enable attackers to potentially recover such secrets.

## Resolution

This has been resolved by calling `Choice::to_u8()` when generating the mask, which in turn uses `black_box` as an optimization barrier. Verification that this resulted in the desired change in the generated assembly across a variety of target CPU architectures was performed by BINSEC, which now runs automatically in CI using `cargo checkct`.

Patch / fix

  • crates.io ctutils 0.4.4

Is RUSTSEC-2026-0385 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Affected packages

ecosystem package affected fixed in
crates.io ctutils
>=0.0.0-0, <0.4.4
0.4.4

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.