RUSTSEC-2026-0385: Non-constant-time mask generation and `u128` comparisons
还没有人认领这个 Issue。
评估
调研方向
The body describes a vulnerability in the ctutils crate and points to its advisory and upstream pull request, but names no files or tests in this repository. Start by checking whether the gateway uses the affected ctutils version and inspect its dependency lockfile. Done means confirming whether the dependency is present and, if so, identifying the remediation path; the issue gives no repository specific change or test.
由索引模型根据 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
- 星标
- 0
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stackabletech/postgresql-trino-gateway 的其他 Issue
-
RUSTSEC-2026-0348: Brotli certificate decompression can allocate up to 1 GiB before authentication未关闭
难度 2/5 1-3 小时 新手友好度 60/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 42/100
-
难度 1/5 1 小时以内 新手友好度 25/100
查看 stackabletech/postgresql-trino-gateway 的全部 Issue
相似的 Issue
-
nn::linear: weight initialization depends on `bias` because the bias is created before the weight可能已有人在做 @monfortema 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
LaurentMazare/tch-rs#1067 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
FavioVazquez/mollify#62 ·
-
C-enhancement
难度 2/5 1-3 小时 新手友好度 68/100
obi1kenobi/cargo-semver-checks#1785 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 61/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
fendouai/awesome-deepseek-harness#125 ·
维护者通常 4 天内回复