RUSTSEC-2026-0212

Source
https://rustsec.org/advisories/RUSTSEC-2026-0212
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0212.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0212
Published
2026-05-26T12:00:00Z
Modified
2026-07-17T11:45:03.712828005Z
Severity
  • 8.2 (High) CVSS_V4 - 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 CVSS Calculator
Summary
Potentially Incorrect Output of Constant-Time Swap/Select on Aarch64
Details

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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / libcrux-secrets

Package

Name
libcrux-secrets
View open source insights on deps.dev
Purl
pkg:cargo/libcrux-secrets

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.0.6

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "libcrux_secrets::Select::select",
            "libcrux_secrets::Swap::swap"
        ],
        "arch": []
    }
}

Database specific

informational
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0212.json"
categories
[]
cvss
"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"