Skip to content

doc: document TPM GPIO reset vulnerability and per-board lock status#2161

Closed
tlaurion wants to merge 3 commits into
masterfrom
doc/tpm-gpio-vuln
Closed

doc: document TPM GPIO reset vulnerability and per-board lock status#2161
tlaurion wants to merge 3 commits into
masterfrom
doc/tpm-gpio-vuln

Conversation

@tlaurion

@tlaurion tlaurion commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Documents the TPM GPIO reset vulnerability disclosed by Mate Kukri (June 2024), which allows an attacker with OS-level code execution to reset the discrete TPM and forge PCR measurements on Intel platforms where coreboot does not lock the PCH GPIO pad configuration.

3 commits, 56 files changed (+2497/-67).

Changes

New: doc/TPM_GPIO_Reset_Vulnerability.md

Comprehensive reference document covering:

  • Attack mechanism and impact
  • Mitigation (GPIO pad config lock bits)
  • Code-verified per-SoC-generation GPIO lock status in upstream coreboot (checked against 25.09 and 26.06 source)
  • Analysis of both lock code paths (non-SMM and SMM) and why they are dead code on affected platforms
  • Heads-specific impact (TPM DUK with passphrase: not affected; TPMTOTP attestation: affected)
  • All upstream tracking links

New: doc/TPM_GPIO_Reset_Approaches.md

Analysis of 8 distinct mitigation approaches, ranked by viability:

  1. Coreboot GPIO lock (upstream fix) -- best long-term path
  2. PLTRST# assertion via EC/SPI -- works on platforms with accessible PCH reset pad
  3. Kernel-level TPM2 PCR lock -- partial mitigation, no HOTP
  4. Heads reseal-on-boot -- detects PCR manipulation after reboot
  5. TPM clear + reseal -- destructive, detects after fact
  6. Discrete TPM with physical lock -- hardware-level, not available on most boards
  7. Firmware TPM (fTPM) -- avoids discrete TPM entirely, shifts trust to CPU
  8. TPM over SPI with access control -- PCH-level SPI bus lock

Per-platform feasibility matrix for every Intel SoC generation supported by Heads (Sandy Bridge through Meteor Lake).

New: initrd/bin/tpm-gpio-reset-demo.sh

Runtime PoC script that:

  • Detects platform SoC generation via /sys/class/dmi/id/board_name
  • Reads current GPIO lock status via debugfs (when available)
  • Attempts PLTRST# assertion and TPM PCR verification
  • Reports platform-specific lock capability and vulnerability status
    did not successfully replicate on nv4x_adl which is only platform code suggest vulnerable So help needed to validate this. Coreboot fixes must come from upstream.

Modified: doc/BOARDS_AND_TESTERS.md

Added "TPM GPIO Reset Vulnerability" section with per-board table mapping every Heads board to its GPIO lock status, with notes on Purism and Dasharo coreboot forks.

Modified: 49 board configs

Added CONFIG_TPM_GPIO_RESET_STATUS comment block to all board configs documenting the platform's GPIO lock vulnerability status (VULNERABLE / PROTECTED / NOT APPLICABLE).

Related

Copilot AI review requested due to automatic review settings July 21, 2026 01:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread doc/TPM_GPIO_Reset_Vulnerability.md Outdated
Comment thread doc/TPM_GPIO_Reset_Vulnerability.md Outdated
@tlaurion
tlaurion marked this pull request as draft July 21, 2026 15:51
@tlaurion
tlaurion force-pushed the doc/tpm-gpio-vuln branch from cd06dae to bb767f2 Compare July 21, 2026 23:10
@tlaurion
tlaurion requested a review from nic3-14159 July 21, 2026 23:10
@tlaurion
tlaurion force-pushed the doc/tpm-gpio-vuln branch 3 times, most recently from 7b7c758 to 2a2f021 Compare July 22, 2026 01:14
@tlaurion
tlaurion requested review from JonathonHall-Purism and removed request for nic3-14159 July 22, 2026 01:37
@tlaurion tlaurion linked an issue Jul 22, 2026 that may be closed by this pull request
@tlaurion
tlaurion marked this pull request as ready for review July 22, 2026 01:54
@tlaurion
tlaurion force-pushed the doc/tpm-gpio-vuln branch 3 times, most recently from 65daed3 to bf8f0b3 Compare July 23, 2026 00:29
@tlaurion tlaurion closed this Jul 23, 2026
@tlaurion
tlaurion deleted the doc/tpm-gpio-vuln branch July 23, 2026 00:32
@tlaurion
tlaurion restored the doc/tpm-gpio-vuln branch July 23, 2026 00:37
@tlaurion tlaurion reopened this Jul 23, 2026
tlaurion added 2 commits July 22, 2026 21:44
…platform audit

BusyBox shell script demonstrating TPM GPIO line assertion to trigger
PLTRST# on non-PCH/CMP platforms. Tests tpm2 shutdown, GPIO assert via
devmem (write bit to DW0), and tpm2 startup with sysfs PCR verification.
Platform audit mode detects PCH/SoC type, GPIO DW0 register locking
(PADCFGLOCK/PADCFGLOCKTX), chipset locked status, and mode switch
attempt (write 0x80000000 to DW0 mode bits [12:10]). Logs all register
reads, writes, and lock register dumps for off-platform analysis.

Usage: tpm-gpio-reset-demo.sh [--audit | --full]
  --audit:  probe platform, dump GPIO pin states and lock registers
  --full:   run shutdown -> assert -> startup cycle with verification
  (no flag): interactive menu for all operations
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
…per-platform feasibility

TPM_GPIO_Reset_Vulnerability.md — threat model, attack description, and
per-platform feasibility table (Pre-Skylake: dedicated PLTRST# pin,
Skylake-Tiger Lake: PCH multiplexing with locked pads, ADL-P/ADL-N:
hardware-locked mode bits, AMD/POWER8: no Intel PCH). Board-specific
CONFIG_TPM_GPIO_VULNERABLE flag rationale documented per chipset family.

TPM_GPIO_Reset_Approaches.md — 8 approaches attempted on ADL-P NV4x:
GPIO DW0 pin configuration probing, gpiochip sysfs toggling, ACPI
pin-capability discovery (GpioInt/GpioIo/GpioIo+I2c), INTEL1 virtual
GPIO events, PCH SRAM-based MMIO region scanning, pmc_ipc commands
(Clean-Halt-Reset/GPE/globalstate_set), itco_wdt watchdog-triggered
reset, and SUSWARN#/SUSACK# protocol analysis. All blocked by hardware
locking on ADL-P. Conclusions and open questions for physical scope
probing noted.

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
@tlaurion
tlaurion force-pushed the doc/tpm-gpio-vuln branch 3 times, most recently from 028fe99 to 48c6511 Compare July 23, 2026 03:08
Per-board CONFIG_TPM_GPIO_VULNERABLE flag set based on chipset generation:
- Pre-Skylake (6th gen and earlier): VULNERABLE (dedicated PLTRST# pin)
- Skylake through Tiger Lake: NOT VULNERABLE (PCH multiplexing, locked)
- Alder Lake (ADL-P/ADL-N): NOT VULNERABLE (hardware-locked mode bits)
- AMD/POWER8: NOT VULNERABLE (no Intel PCH)

DOC/BOARDS_AND_TESTERS.md updated with EOL/ESU dates per generation,
vulnerable boards listed with their PC/Alpine Ridge Thunderbolt controller.

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
@tlaurion

Copy link
Copy Markdown
Collaborator Author

Superseded by PR #2165 from tlaurion/heads (correct fork). This PR will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants