RUSTSEC-2026-0212None▾ SunlitPotentially Incorrect Output of Constant-Time Swap/Select on Aarch64
▾ Sunlit zone — Low / medium · no exploitation signal
impact 2.8 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
The implementation of constant-time swap and select on aarch64
platforms used a cmp instruction in inline assembly to check whether
an 8-bit wide selector was 0. The cmp instruction works on 32-bit
registers, which included the unspecified high 24 bits of the cmp operand.
Depending on the execution environment the cmp
could thus potentially return an incorrect result because its
operand's high bits in the inline assembly were set when Rust expected them to be unset.
This could lead to incorrect results for the constant-time swap and select
operations built from this comparison.
In certain circumstances the swap and select instructions on aarch64 platforms returned incorrect results.
Starting from version 0.0.6, the selector is compared using a tst
instruction with a mask, which only compares the first 8 bits of the
selector.
libcrux-secrets >= 0.0.0-0, < 0.0.6Upgrade to a patched release:
libcrux-secrets 0.0.6