Static HKDF salt "RATLS" with no key versioning
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- rust
- 领域
- cryptography, security
调研方向
首先阅读 dstack/kms/src/main_service.rs 和 kdf.rs:28 中的 KDF 代码,以验证静态 salt 的使用方式以及所报告的影响是否适用。该 issue 提议进行版本控制、轮换或持久化随机 salt,但没有选择具体设计;完成工作需要确定一致同意的密钥派生和轮换方案,并进行相应的验证。
由索引模型根据 Issue 内容生成。
描述
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
- Attacker compromises the HKDF input keying material (e.g., via a KMS vulnerability)
- Because the salt is static and hardcoded, the attacker can re-derive all keys ever produced by this KDF
- No key versioning means there is no way to distinguish keys from different epochs
- 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
- Include a version number in the salt or info parameter:
format!("RATLS-v{}", version) - Support key rotation by allowing the salt to be updated periodically
- 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Dstack-TEE/dstack 的其他 Issue
-
难度 5/5 一周以上 新手友好度 30/100
Dstack-TEE/dstack#1301 ·
-
难度 3/5 1-2 天 新手友好度 55/100
Dstack-TEE/dstack#1300 ·
-
难度 4/5 3-5 天 新手友好度 48/100
Dstack-TEE/dstack#1299 ·
-
难度 4/5 3-5 天 新手友好度 48/100
Dstack-TEE/dstack#1298 ·
-
P0
难度 5/5 一周以上 新手友好度 25/100
Dstack-TEE/dstack#1297 ·
查看 Dstack-TEE/dstack 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
state:needs triage
难度 2/5 1-3 小时 新手友好度 70/100
zed-industries/zed#64680 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 70/100
RustPython/RustPython#8802 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
TheLarkInn/aipm#2390 ·