Security mailing lists by PureSourceCode

RUSTSEC-2026-0212

not scored yet

Potentially Incorrect Output of Constant-Time Swap/Select on Aarch64

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.

Impact

In certain circumstances the swap and select instructions on aarch64
platforms returned incorrect results.

Mitigation

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.

Published
26 May 2026
Last modified
17 Jul 2026
Sources
OSVJSON

Scores

SourceScored byVersionScoreVector / decision
OSV RustSec CVSS 4.0 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io libcrux-secrets >= 0.0.0-0, < 0.0.6 0.0.6

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 May 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.