fwTPM: append-only NV journal for write-once flash + swtpm UART symlinks#540
Merged
aidangarske merged 1 commit intoJun 29, 2026
Merged
Conversation
Copilot stopped reviewing on behalf of
dgarske due to an error
June 24, 2026 22:38
47e2ee4 to
724ffdf
Compare
aidangarske
reviewed
Jun 25, 2026
aidangarske
left a comment
Member
There was a problem hiding this comment.
Skoll Multi-Scan Review
Modes: review + review-security + bugsOverall recommendation: REQUEST_CHANGES
Findings: 4 total — 4 posted, 0 skipped
4 finding(s) posted as inline comments (see file-level comments below)
Posted findings
- [High] [review-security] Append-only NV tamper can roll state back to an earlier checkpoint —
src/fwtpm/fwtpm_nv.c:1517-1604 - [High] [bugs] Append-only recovery misses a torn header at the next append offset —
src/fwtpm/fwtpm_nv.c:1514-1604 - [Medium] [review] Document zero-initialization requirement for extended NV HAL —
wolftpm/fwtpm/fwtpm_nv.h:182-184 - [Medium] [review] Add coverage for no-key append-only images without a checkpoint —
src/fwtpm/fwtpm_nv.c:1545-1557
Review generated by Skoll
a547438 to
d3651bd
Compare
…RT symlink support
d3651bd to
b8709b1
Compare
aidangarske
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
writePosby scanning, seals each commit with an appended MAC checkpoint, and streams granule-aligned writes so a sector is erased only on compaction. This avoids wearing the header sector and survives a torn final commit (power loss). It plugs into the existingFWTPM_NV_HAL(read/write/erase) - a port setshal.appendOnly = 1andhal.writeAlign; no separate adapter. Opt-in and off by default (--enable-fwtpm-nv-appendonly/ CMakeWOLFTPM_FWTPM_NV_APPEND_ONLY); the file backend and default builds are unchanged and carry no extra memory.O_NOFOLLOW; keepsS_ISCHR/O_NOCTTY, addsO_NONBLOCK).Tests: new unit test (RAM-backed write-once HAL) covers persist/reboot, torn-tail recovery, and tamper rejection. Verified clean with the option both off and on.
Docs:
docs/FWTPM.mdandsrc/fwtpm/ports/README.md(links wolftpm-examples; ports: STM32H5, PolarFire SoC U54, ZCU102 R5 lock-step).