Static HKDF salt "RATLS" with no key versioning
維護者通常 1 天內回覆
還沒有人認領這個 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
- 星號
- 555
- 分支
- 99
- 平均合併
- 1 天 3 小時
- 30 天內合併 PR
- 195
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Dstack-TEE/dstack 的其他 Issue
-
難度 5/5 一週以上 新手友好度 35/100
Dstack-TEE/dstack#1384 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 30/100
Dstack-TEE/dstack#1301 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 55/100
Dstack-TEE/dstack#1300 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
Dstack-TEE/dstack#1299 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
Dstack-TEE/dstack#1298 ·
維護者通常 1 天內回覆
查看 Dstack-TEE/dstack 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 63/100
metasequoiaime/msime#7328 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
eclipse-opensovd/classic-diagnostic-adapter#616 ·
維護者通常 2 天內回覆
-
documentation
難度 1/5 1 小時以內 新手友好度 86/100
維護者通常 1 天內回覆
-
track: content
難度 2/5 1-3 小時 新手友好度 72/100
0xAndersen/witness-log#10 ·
-
follow-up main-defect wave-A
難度 2/5 1-3 小時 新手友好度 72/100
carrick-sh/carrick#249 ·
維護者通常 1 天內回覆