Skip to content

Commit 30a4201

Browse files
committed
address review comments on PR #2117
- Fix TPM2 time remaining table entry: estimate is derived from LOCKOUT_COUNTER vs MAX_AUTH_FAIL times LOCKOUT_INTERVAL, not LOCKOUT_RECOVERY (which is the lockout-auth-blocked-after-failure timer, not the remaining-until-unlock) - Reword migration WARN: 'older Heads version' not 'older firmware' (the migration case is caused by previous Heads code, not platform firmware) - Remove fragile PR #2117 reference from preventing-future-lockouts section: describe the fix generically (restoring empty counter auth) so the doc is correct regardless of branch context Signed-off-by: Thierry Laurion <insurgo@riseup.net>
1 parent f7376c2 commit 30a4201

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

doc/tpm.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ state. Available for both TPM1 and TPM2:
510510
| Current failures | `currentCount` | `TPM2_PT_LOCKOUT_COUNTER` |
511511
| Lockout threshold | `thresholdCount` | `TPM2_PT_MAX_AUTH_FAIL` |
512512
| Lockout interval | -- | `TPM2_PT_LOCKOUT_INTERVAL` |
513-
| Time remaining | `actionDependValue` (seconds) | `TPM2_PT_LOCKOUT_RECOVERY` |
513+
| Time remaining | `actionDependValue` (seconds) | Estimate from `LOCKOUT_COUNTER` vs `MAX_AUTH_FAIL` times `LOCKOUT_INTERVAL` |
514514

515515
The recovery shell can run `tpmr.sh da_state` at any time to check
516516
whether the TPM is locked and how much lockout time remains.
@@ -547,13 +547,12 @@ line is logged by the preflight guard in `increment_tpm_counter`.
547547

548548
#### Preventing future lockouts
549549

550-
Heads' counter auth regression (PR #2068) caused 3 TPM auth failures
551-
per boot by passing the owner passphrase as the counter auth while the
552-
counter was created with empty auth. This was fixed in PR #2117 by
553-
restoring empty counter auth for both creation and increment,
554-
preventing any auth failures from counter operations. All TPM1 boards
555-
that ran the regression code are affected identically; this is not
556-
platform-specific.
550+
Heads' counter auth regression caused 3 TPM auth failures per boot by
551+
passing the owner passphrase as the counter auth while the counter was
552+
created with empty auth. Restoring empty counter auth for both creation
553+
and increment (as per TCG spec) prevents auth failures from counter
554+
operations. All TPM1 boards that ran the regression code are affected
555+
identically; this is not platform-specific.
557556

558557
### TPM1 physical presence
559558

initrd/etc/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ increment_tpm_counter() {
21652165
2>/dev/null | tee /tmp/counter-"$counter_id" >/dev/null
21662166
); then
21672167
increment_ok="y"
2168-
WARN "TPM counter created by older firmware (uses owner passphrase). This is a one-time migration; operation continues with owner-passphrase auth. Reset TPM in menu (Options -> TPM/TOTP/HOTP Options -> Reset the TPM) to create a new empty-auth counter (recommended), or leave as-is."
2168+
WARN "TPM counter created by older Heads version (uses owner passphrase). This is a one-time migration; operation continues with owner-passphrase auth. Reset TPM in menu (Options -> TPM/TOTP/HOTP Options -> Reset the TPM) to create a new empty-auth counter (recommended), or leave as-is."
21692169
fi
21702170
fi
21712171
fi

0 commit comments

Comments
 (0)