{"id":"RUSTSEC-2026-0003","revision":"aa6be59d6f504b018c77982a1b4a0a58","records":[{"revision":"aa6be59d6f504b018c77982a1b4a0a58","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0003","aliases":["CVE-2026-23519","GHSA-2gqc-6j2q-83qp"],"title":"Non-constant-time code generation on ARM32 targets","description":"## Summary\n\nWhile the `cmov` crate has a special backend for `aarch64` which uses special\nCSEL instructions, on 32-bit ARM it uses a portable pure Rust fallback\nimplementation. This implementation uses a combination of bitwise arithmetic\nand `core::hint::black_box` to attempt to coerce constant-time code generation\nout of the optimizer, but the implementation in v0.4.3 and earlier failed to\ndo this on 32-bit ARM targets.\n\n## Impact\n\nBranch instructions inserted by the LLVM optimizer on 32-bit targets can be\nleveraged using various microarchitectural sidechannels like cache timing\nattacks to learn secret information that `cmov` is designed to protect.\n\n## Details\n\nThe following assembly was emitted when using `Cmov::cmovnz`, a function which\nimplements a conditional move when a provided value is non-zero:\n\n```asm\n    bne  .LBB0_2\n    mvns r3, r3\n```\n\nThis includes a branch instruction `bne`: Branch if Not Equal.\n\n## PoC\n\nThe following code reproduces the issue:\n\n```rust\n#![no_std]\nuse cmov::Cmov;\n\n#[inline(never)]\npub fn test_ct_cmov(a: &mut u8, b: u8, c: u8) {\n    a.cmovnz(&b, c);\n}\n```\n\n## Resolution\n\n`cmov` v0.4.4 includes a portable `black_box`-based tactical mitigation for the\nissue which coerced the compiler into producing the expected codegen, and\nadditionally v0.4.5 added an `asm!` reimplementation of the problematic mask\ngeneration function for ARM32 targets which should guarantee that particular\nfunction never contains a branch on such targets.","state":0,"publishedAt":"2026-01-14T12:00:00+00:00","modifiedAt":"2026-10-23T08:41:35.2686635+00:00","affected":[{"ecosystem":"crates.io","name":"cmov","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"0.4.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N","score":null,"severity":null}],"references":["https://crates.io/crates/cmov","https://rustsec.org/advisories/RUSTSEC-2026-0003.html","https://github.com/RustCrypto/utils/commit/55977257e7c82a309d5e8abfdd380a774f0f9778"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0003","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0003","identifiers":["RUSTSEC-2026-0003","CVE-2026-23519","GHSA-2gqc-6j2q-83qp"]},"retained":false,"historicalAffected":[]}],"coverage":[]}