Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

RUSTSEC-2026-0385: Non-constant-time mask generation and `u128` comparisons

未关闭
#34 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
10/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
rust
领域
security

调研方向

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 u128 comparisons

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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

stackabletech/postgresql-trino-gateway 的其他 Issue

查看 stackabletech/postgresql-trino-gateway 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。