Skip to content

fix: analyze standalone UEFI variable stores that have no FV header - #31

Merged
nmatt0 merged 1 commit into
masterfrom
fix/uefi-nvar-defaults-container
Sep 18, 2026
Merged

nmatt0 merged 1 commit into
masterfrom
fix/uefi-nvar-defaults-container

Conversation

@nmatt0

@nmatt0 nmatt0 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

What

The boot pass only ran the UEFI Secure Boot analyzer when the input carried a firmware-volume header signature (_FVH). A UEFI variable store extracted on its own — the usual chipsec/UEFITool artifact — has no FV wrapper, so it was silently skipped and reported nothing, even though it contains the PK/KEK/db/dbx variables. A full BIOS image (which does carry _FVH) was unaffected, which is why the gap wasn't obvious.

Fix

Trigger the analyzer on a standalone store too: an EDK2 authenticated/variable store begins with its store GUID, and an AMI store begins with an NVAR entry, so route the input to the analyzer when either sits at offset 0, in addition to the existing _FVH path. analyze_uefi already self-filters (it emits nothing unless it recovers a real variable), so the looser trigger adds no false positives.

Tests

Added a synthetic regression test: a raw AMI NVAR store with no FV wrapper (and a leading defaults-container entry, as real BIOSes have) must still recover the Platform Key / Secure Boot posture and enumerate dbx. Full unit suite (1406 checks) and integration suite pass; clean under ASan+UBSan.

The boot pass only ran the UEFI Secure Boot analyzer when the input carried a
firmware-volume header signature ("_FVH"). A UEFI variable store extracted on
its own -- the usual chipsec/UEFITool artifact -- has no FV wrapper, so it was
silently skipped and reported nothing, even though it contains the PK/KEK/db/dbx
variables. A full BIOS image (which does carry "_FVH") was unaffected.

Trigger the analyzer on a standalone store too: an EDK2 authenticated/variable
store begins with its store GUID, and an AMI store begins with an "NVAR" entry,
so route the input to the analyzer when either sits at offset 0, in addition to
the existing "_FVH" path. The analyzer already self-filters (it emits nothing
unless it recovers a real variable), so the looser trigger adds no false
positives.

Add a synthetic regression test: a raw AMI NVAR store with no FV wrapper (and a
leading defaults-container entry, as real BIOSes have) must still recover the
Platform Key / Secure Boot posture and enumerate dbx.
@nmatt0
nmatt0 merged commit de8c14e into master Sep 18, 2026
4 checks passed
@nmatt0
nmatt0 deleted the fix/uefi-nvar-defaults-container branch September 18, 2026 06:16
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.

1 participant