systemd lacks a method to provide assurance of hardware security measures before cryptsetup
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 28/100
調査の方向性
The report describes Dracut units that configure and measure MOR Lock and TSME/TME before cryptsetup, plus systemd-pcrlock policies. Start by reading the systemd initrd and PCR policy documentation and tracing when enter-initrd secrets are unsealed relative to cryptsetup-pre.target. Define how hardware state is checked and how non-locked MOR is cleared after secrets are erased; the report does not name source files or tests.
索引モデルが issue の本文から書いたものです。
説明
Component
No response
Is your feature request related to a problem? Please describe
My problem concerns two technologies to combat cold-boot attacks that I'd want to use together with a disk encryption setup, but that would need to be ensured to be active before any keys are loaded from TPM2 and etc. or passwords provided:
MemoryOverwriteRequestControlandMemoryOverwriteRequestControlLock. These are EFI variables that make the UEFI zero out the entire RAM during a system reset. Specification The OS could clear the control bit if the lock isn't set - a lock without a password is an irrevocable request. So ideally, one would want the MOR Lock enabled before any secrets are loaded into memory.- Transparent memory encryption. This refers to AMD TSME and Intel TME. On a machine capable of them, you'd want a UKI that is authorised to retrieve keys from a TPM2 for example not to do so if the encryption was turned off, as that would make the memory encryption by-passable if it can be turned off simply in the BIOS - and locking to PCR[1] would be the only other way currently to enforce this setting to be enabled.
In both cases, they provide defence against memory reads and so would be effective if ensured at initrd time before cryptsetup-pre.target was reached. But currently there's little way to protect against them just being turned off in the BIOS.
For MOR, if the kernel is compiled with CONFIG_RESET_ATTACK_MITIGATION being set, the Linux efistub will enable MOR, but not lock it. This is also noted in the Kconfig to require unlocking after secrets were erased. At least that would be the idea in case of a non-locked MOR, where the OS should remove the request after secrets were cleared from memory. Currently there exists no tooling for doing so. MOR has been known to significantly prolong reboot times on some systems, so you might only want MOR if the system was suddenly powered off or crashed without securely clearing secrets.
So I'd like a solution that would allow either refusing to continue the boot and/or lock TPM2 secrets to only unseal after both (ideally configurable) are set up and ensured - and ideally for a non-locked MOR to be useable for minimal reboot time impact.
Describe the solution you'd like
What I'm doing locally is I have a small Dracut module to include two systemd units before cryptsetup. One sets up the MOR Lock and verifies its state and then performs a measurement into PCR[15] the other just measures the state of TSME / TME into PCR[15].
Then I have systemd-pcrlock create a policy at a location only after all this is measured into their expected states. This way, if the MOR Lock wasn't successful or memory encryption was turned off, no secrets could be loaded into memory, thus closing a gap that could have allowed them to be bypassed.
The issue however is that it would be arguably even better if this state was assured earlier, ideally before you'd want to unseal the first secrets bound to systemd PCR[11] policies at enter-initrd. Additionally, for a non-locked MOR to work out, a target for when all secrets would have been cleared from memory at which the MOR bit could be unset or something similar would be needed.
Describe alternatives you've considered
No response
The systemd version you checked that didn't have the feature you are asking for
262
- 主要言語
- C
- スター
- 17k
- フォーク
- 4.8k
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 342
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
systemd/systemd のほかの issue
-
login
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
hwdb needs-patch
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
systemd/systemd#44825 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
cryptsetup
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
documentation pid1
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
needs-better-log-message network RFE 🎁
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
systemd/systemd#44563 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
systemd/systemd の issue をすべて見る
似ている issue
-
compiler-rt:asan
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
llvm/llvm-project#242921 ·
メンテナーはふだん 1 日以内に返信
-
Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/vscode-cpptools#14874 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
FujiNetWIFI/fujinet-firmware#2401 ·
メンテナーはふだん 1 日以内に返信
-
category:port-update
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
polish
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ChupathingyCE/chupathingyce#1366 ·
メンテナーはふだん 1 日以内に返信