modules/tpm-gpio-reset: TPM GPIO reset audit and assertion tools - #2165
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b3e7502 to
a2d99a3
Compare
f5c6544 to
4aa3965
Compare
c527dc3 to
d8f1224
Compare
|
@Thrilleratplay @gaspar-ilom last review before merge please, conjointly to linuxboot/heads-wiki#224 |
|
Note that Alder Lake work has been made by @Sean-StarLabs on coreboot: https://review.coreboot.org/q/topic:%22starlabs-lockdown%22 Can someone get a CVE? |
dc01c74 to
a56a84b
Compare
b647ef9 to
de96f0c
Compare
Adds tpm-gpio-detect (audit) and tpm-gpio-assert (execute) from tlaurion/tpm-gpio-fail, based on Mate Kukri original PoC. Libpci PCI access. PCR output before/after assertion. ASCII output. Module depends on pciutils, tpm2-tools. Built when CONFIG_TPM2_TOOLS=y. TESTED: NV4x ADL-P (0x5182) — PCRs cleared to zero, confirmed. ALL OTHER PLATFORMS UNTESTED. Docs: TPM GPIO vulnerability docs point to Heads Wiki threat model. initrd: .bash_history entries for recovery shell testing. Signed-off-by: Thierry Laurion <insurgo@riseup.net>
de96f0c to
3ebc60c
Compare
updated https://ticket.coreboot.org/issues/576#note-6 with PoC output to show ADL P vulnerable. |
… dirty builds PR #2165 changed blobs/m900/README.md and blobs/xx80/README.md, but the cache key only hashed *.sh files under blobs/. The stale cache contained old README content, and workspace attachment overwrote the fresh checkout, making git diff detect modifications and set GIT_STATUS=dirty. This caused all subsequent CircleCI builds to produce -dirty ROM artifacts. Fix: hash all files under blobs/ for the cache key, not just *.sh, so the cache invalidates whenever any tracked blob file changes. Signed-off-by: Thierry Laurion <insurgo@riseup.net>
|
Intel seems to have released an article about this: https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/gpio-configuration-best-practices.html |
Adds tpm-gpio-detect (audit) and tpm-gpio-assert (execute) C binaries from the
tlaurion/tpm-gpio-fail fork
(commit
9052dbd, branchminimal-platform-fork), based onMate Kukri's original PoC.
modules/tpm-gpio-reset (new, 22 lines)
Builds both C binaries from the fork. Depends on pciutils and tpm2-tools.
Gated behind CONFIG_TPM2_TOOLS=y. Installs into initrd as
bin/tpm-gpio-detect and bin/tpm-gpio-assert.
tpm-gpio-detect (audit -- safe, read-only)
Uses libpci to find the ISA/LPC bridge by device class (no raw MMCFG).
Identifies the PCH platform, reads P2SB SBREG_BAR (hardcoded fallback
when hidden by FSP-S), then checks GPIO pad lock registers via /dev/mem:
PADCFGLOCK and PADCFGLOCKTX per PLTRST# pad (GPP_B13) and ESPI bus pins,
pad mode (NF1/GPIO), per-platform TIER classification. Self-documenting
ASCII table output with register values.
Exit codes: 0=all locked, >0=unlocked count, 2=not vulnerable by design,
126=unknown PCH, 127=hardware error.
tpm-gpio-assert (execute -- TPM may reboot, PCRs cleared, NVRAM preserved)
Calls tpm2 shutdown -c before and tpm2 startup -c after assertion.
Uses libpci to find the PCH, matching kukri's procedure.
Reads PADCFGLOCK/TX status, checks pad mode, performs NF1->GPIO
mode transition to create a PLTRST# reset edge:
PADRSTCFG (DW0 bits 31:30) selects pad reset trigger, not attack vector.
Exit codes: 0=DW0 verified, 1=DW0 locked, 2=not vulnerable, 126=unknown
PCH, 127=hardware error. ASCII-only output.
doc/TPM_GPIO_Reset_Approaches.md (new, 442 lines)
Developer reference: 8 approaches attempted on NV4x ADL-P, register
addresses verified against coreboot 26.06, GPIO lock status per
Dasharo/Purism forks, NF1->GPIO mode transition mechanism. TIER ordered:
TIER 1 (confirmed), TIER 2 (unconfirmed), TIER 3 (uncertain), NOT VULNERABLE.
doc/TPM_GPIO_Reset_Vulnerability.md (new, 23 lines)
Points to Heads Wiki Threat Model and Recovery Shell page.
doc/BOARDS_AND_TESTERS.md (+156/-62)
TPM GPIO vulnerability section referencing wiki. Restructured EOL/ESU board table.
initrd/.bash_history (+4 lines)
Recovery shell convenience commands. Removes bash-based PoC script.
doc/faq.md (-120 lines), doc/keys.md, doc/security-model.md
Reduced to wiki cross-references to avoid duplication.
Tested
NV4x ADL-P (0x5182) -- CONFIRMED VULNERABLE (TIER 1)
All other 13 platform families are untested
Report with tpm-gpio-detect 2>&1 | tee log. See fork issues.
Cross-references