RUSTSEC-2026-0385: Non-constant-time mask generation and `u128` comparisons
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 20/100
Rechercherichtung
The issue describes a security advisory for ctutils and links to RustCrypto/utils pull request 1569, but gives no numtracker files, tests, or requested change. Read the advisory and linked pull request first to determine whether numtracker uses an affected version and where it is declared; done means the project no longer uses a vulnerable version, if the dependency is present.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Non-constant-time mask generation and
u128comparisons
| Details | |
|---|---|
| Package | ctutils |
| Version | 0.4.2 |
| URL | https://github.com/RustCrypto/utils/pull/1569 |
| Date | 2026-10-23 |
| Patched versions | >=0.4.4 |
Summary
The ctutils::Choice type has mask generation functions for each unsigned
integer size (u8, u16, u32, u64, u128). These are const fn and
therefore can't reuse the asm!-backed mask generation in the cmov crate
that's otherwise used to ensure constant-time.
In releases prior to v0.4.4, the generated code from these functions could
include a branch on commonly used platforms. This has been corrected in this
release and now verified on several platforms using BINSEC.
Additionally, u128 comparison operations provided via ctutils::Choice and
intended to work in constant-time were generating branches on 32-bit targets.
This has been resolved via a special case implementation of these functions
for such targets.
Impact
Branch instructions on secret values can potentially leak such values via
covert channels. This can enable attackers to potentially recover such secrets.
Resolution
This has been resolved by calling Choice::to_u8() when generating the mask,
which in turn uses black_box as an optimization barrier. Verification that
this resulted in the desired change in the generated assembly across a variety
of target CPU architectures was performed by BINSEC, which now runs
automatically in CI using cargo checkct.
See advisory page for additional details.
- Vorherrschende Sprache
- Rust
- Sterne
- 2
- Forks
- 2
- Ø Merge
- 13 Std. 13 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DiamondLightSource/numtracker
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
DiamondLightSource/numtracker#309 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
DiamondLightSource/numtracker#278 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
DiamondLightSource/numtracker#329 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 20/100
DiamondLightSource/numtracker#326 ·
-
RUSTSEC-2026-0387: Multiple timing variability issues in operations intended to be constant-timeOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 1/100
DiamondLightSource/numtracker#324 ·
Alle Issues in DiamondLightSource/numtracker
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
RustCrypto/utils#1597 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
max-sixty/worktrunk#4727 · 7 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag
-
follow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
carrick-sh/carrick#1859 ·
Maintainer antworten meist innerhalb von 1 Tag