RUSTSEC-2026-0385: Non-constant-time mask generation and `u128` comparisons
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 2
- 派生
- 2
- 平均合并
- 13 小时 13 分钟
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DiamondLightSource/numtracker 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
DiamondLightSource/numtracker#309 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
DiamondLightSource/numtracker#278 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
DiamondLightSource/numtracker#329 ·
-
难度 1/5 1 小时以内 新手友好度 20/100
DiamondLightSource/numtracker#326 ·
-
RUSTSEC-2026-0387: Multiple timing variability issues in operations intended to be constant-time未关闭
难度 4/5 3-5 天 新手友好度 1/100
DiamondLightSource/numtracker#324 ·
查看 DiamondLightSource/numtracker 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
RustCrypto/utils#1597 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
max-sixty/worktrunk#4727 · 7 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
follow-up
难度 2/5 1-3 小时 新手友好度 73/100
carrick-sh/carrick#1859 ·
维护者通常 1 天内回复