ctutils non-constant-time mask generation flaw
Oct 28 find · published Oct 24RUSTSEC-2026-0385 covers non-constant-time mask generation in ctutils before version 0.4.4, where `const fn` constraints prevent use of constant-time assembly-backed masking from the `cmov` crate. The `Choice` type's mask generation functions for u8, u16, u32, u64, and u128 cannot use assembly-backed constant-time operations and instead emit branch instructions on secret values, potentially leaking secrets through covert channels. For u128 comparisons on 32-bit targets, the operations meant to be constant-time emit branches; version 0.4.4 adds a special-case implementation for 32-bit targets. The fix makes mask generation call `Choice::to_u8()` using `black_box` as an optimization barrier. Version 0.4.4 resolves the issue. Critically, 99.3% of the crate's 79.5 million downloads in the last 90 days were on affected versions.
Comments
Sign in to join the conversation.