Skip to content
NewA calmer, faster ZeroHour

Understanding NvPCRs in systemd v262

Lobsters · securityby katexochen.aro.bz by katexochen ()14 min read2 · 1 read
AI summary · grok-4.7Summaries by Vani AI

A deep dive explains systemd v262 NvPCRs, extra TPM registers for measurement and attestation.

systemd relies on TPM PCR measurements for disk unlock, encrypted service credentials, and remote attestation, but standard TPMs provide only 24 PCRs and just indices 8-15 are practical for OS events. NvPCRs, introduced in v259, are additional PCR-like registers allocated in TPM non-volatile memory for unpredictable events that should stay out of policy-critical PCRs. In v262, systemd replaced anchoring based on a random secret sealed to PCR 11 and stored on disk, which another OS replaying PCR 11 might recover or an attacker might replace. The post rebuilds an NvPCR with tpm2-tools against swtpm and explains why the revised design is secure.

Key facts
  • Only PCR indices 8-15 are realistically available to the OS.
  • NvPCRs hold extra measurements in TPM non-volatile memory.
  • v262 replaces a disk-stored secret sealed against PCR 11.
  • The walkthrough rebuilds an NvPCR against a software TPM.
Analyze this story with Vani AIImpact, who is affected and what defenders should do, in a new chat

Indicators of compromise

auto-extracted · verify before use · export allAll
TypeIndicatorContext
sha2566120c875c3afb0b2811fc7c3c045c32fb53596e8009e96855ed4aa6c332d0bfbflushcontext trial.ctx tpm2_flushcontext --transient-object 6120c875c3afb0b2811fc7c3c045c32fb53596e8009e96855ed4aa6c332d0bfb The resulting policy digest contains no PCR value at all, i
sha2567e247a603cd1052cabc095741b8ee2f7458aabeee960b8ec97d7f090171a039arial.ctx \ --pcr-list = sha256:15 \ --policy = pcr15.policy 7e247a603cd1052cabc095741b8ee2f7458aabeee960b8ec97d7f090171a039a The resulting policy digest is printed and written to pcr15
sha256bd9927a653c6c33297b7d884a8ad99df0f5b5b1c1e1e86f762b3aced8bc77f50ts value: tpm2_nvread 0x01000000 --size = 32 | xxd -p -c 64 bd9927a653c6c33297b7d884a8ad99df0f5b5b1c1e1e86f762b3aced8bc77f50 If we now inspect the NV index again, we can observe someth
sha256e758d6e2e54620fd45b9cd1fd57cbba62757f12751d549fd2fc957ed1908ed29= m2.bin tpm2_nvread 0x01000000 --size = 32 | xxd -p -c 64 e758d6e2e54620fd45b9cd1fd57cbba62757f12751d549fd2fc957ed1908ed29 At this point, the value of the NV index is HASH(HASH(0x0 |

From the original article

14 min read at katexochen.aro.bz

systemd answers TPM PCR scarcity with additional PCR-like registers allocated in the TPM’s NV memory, In this hands-on deep dive, we rebuild a systemd NvPCR from scratch against a software TPM, picking up the required TPM concepts along the way, and analyze why the design is secure.

Lobsters · security

By katexochen.aro.bz by katexochen · katexochen.aro.bz

Read the full article at Lobsters · security

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.