Static HKDF salt "RATLS" with no key versioning

Đang mở
#552 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
cryptography, security

Hướng nghiên cứu

Bắt đầu bằng cách đọc dstack/kms/src/main_service.rs và mã KDF tại kdf.rs:28 để xác minh salt tĩnh được sử dụng như thế nào và liệu tác động được báo cáo có áp dụng hay không. Issue đề xuất versioning, rotation hoặc các salt ngẫu nhiên được lưu trữ bền vững, nhưng không chọn một design; để hoàn tất cần có một phương án dẫn xuất và rotation khóa đã được thống nhất, cùng với việc validation tương ứng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
546
Fork
96
Merge trung bình
19 giờ 22 phút
Pull request đã merge (30 ngày)
109

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Dstack-TEE/dstack

Tất cả issue của Dstack-TEE/dstack

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.