Debian Rust Security Tracker 🩺🦀

RUSTSEC-2026-0385: Non-constant-time mask generation and `u128` comparisons

10 affected
Crate
ctutils
Patched Versions
>=0.4.4
Debian Version
0.4.3-2
Debian Bugs
—
Issued
2026-10-23
Aliases
—
Patched:Affected

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.

Affected Packages

ctutils 0.4.3 cargo-c 0.10.25-1
ctutils 0.4.3 cargo-debstatus 0.6.6-2
ctutils 0.4.3 cargo-outdated 0.19.0-4
ctutils 0.4.3 debcargo 2.8.4-5
ctutils 0.4.2 debian-lsp 0.1.8-5+b2
ctutils 0.4.2 glome-cli 0.3.0-6
ctutils 0.4.3 hussh 0.2.3-1
affected ⚠️ librust-ctutils-dev 0.4.3-2
ctutils 0.4.2 rage 0.12.1-1
ctutils 0.4.2 wormhole-rs 0.8.1-1