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

Static HKDF salt "RATLS" with no key versioning

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
rust

调研方向

首先阅读 dstack/kms/src/main_service.rs 和 kdf.rs:28 中的 KDF 代码,以验证静态 salt 的使用方式以及所报告的影响是否适用。该 issue 提议进行版本控制、轮换或持久化随机 salt,但没有选择具体设计;完成工作需要确定一致同意的密钥派生和轮换方案,并进行相应的验证。

由索引模型根据 Issue 内容生成。

描述

security security: report security: roadmap

The disk encryption key derivation in dstack/kms/src/main_service.rs uses a hardcoded, empty HKDF salt rather than a per-instance random salt, reducing HKDF's security margin and making all derived keys deterministic given the same input keying material.

Root Cause

The RA-TLS key derivation uses a hardcoded salt b"RATLS" for all HKDF operations. There is no key versioning mechanism and no support for key rotation. If the HKDF input keying material (IKM) is compromised at any point, all historically derived keys are also compromised because the salt is static and publicly known.

// kdf.rs:28
const SALT: &[u8] = b"RATLS";

Attack Path

  1. Attacker compromises the HKDF input keying material (e.g., via a KMS vulnerability)
  2. Because the salt is static and hardcoded, the attacker can re-derive all keys ever produced by this KDF
  3. No key versioning means there is no way to distinguish keys from different epochs
  4. Key rotation requires changing the IKM, but old keys remain derivable from old IKM + static salt

Impact

No forward secrecy in the key derivation hierarchy. Compromise of the IKM at any point reveals all past and future derived keys. The static salt provides no additional entropy or domain separation beyond what the IKM already provides.

Suggested Fix

  1. Include a version number in the salt or info parameter: format!("RATLS-v{}", version)
  2. Support key rotation by allowing the salt to be updated periodically
  3. Consider using a random salt persisted alongside the derived keys

Note: This issue was created automatically. The vulnerability report was generated by Claude and has not been verified by a human.

主要语言
Rust
星标
550
派生
97
平均合并
19 小时 22 分钟
30 天内合并 PR
109

贡献指南

打开贡献指南

从这里开始

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

Dstack-TEE/dstack 的其他 Issue

查看 Dstack-TEE/dstack 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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