Skip to content

Fix EFI to use HDR_CMDLINE only from the signed part of the manifest - #974

Merged
danielinux merged 1 commit into
wolfSSL:masterfrom
dgarske:efi_cmdline
Nov 6, 2026
Merged

danielinux merged 1 commit into
wolfSSL:masterfrom
dgarske:efi_cmdline

Conversation

@dgarske

@dgarske dgarske commented Nov 5, 2026

Copy link
Copy Markdown
Member

wolfBoot_efi_get_cmdline() took the first HDR_CMDLINE TLV anywhere in the manifest, but the image signature covers the manifest only up to the digest TLV. It now uses the command line only when the whole TLV lies before the digest TLV, and returns none otherwise. unit-efi-x86-open-image covers both placements on a real TLV layout.

@dgarske dgarske self-assigned this Nov 5, 2026
Copilot AI balanced review requested due to automatic review settings November 5, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the EFI command-line boundary hardening.

No open issues 🎉

What changed in this PR

This PR hardens EFI command-line handling by accepting HDR_CMDLINE only when the complete TLV lies within the signed portion of the image manifest.

Changes:

  • Rejects command lines that extend beyond the digest TLV boundary or lack a digest TLV.
  • Adds unit tests for signed, unsigned, and absent command lines using a TLV-walking test helper.
File Description
tools/​unit-tests/​unit-efi-x86-open-image.c Adds manifest fixtures, allocation mocking, and command-line validation tests.
include/​wolfboot_efi.h Enforces the signed-manifest boundary before returning an EFI command line.

Review effort: Balanced

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #974

Scan targets checked: wolfboot-src, wolfboot-bugs
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Max

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #974

Scan targets checked: wolfboot-src, wolfboot-bugs
Coverage: 1 of 1 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@wolfSSL-Fenrir-bot
wolfSSL-Fenrir-bot dismissed their stale review November 5, 2026 22:32

Fenrir's latest completed scan found no issues; clearing the prior automated change request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the EFI command-line boundary changes.

No open issues 🎉

Review effort: Balanced

@dgarske dgarske assigned danielinux and wolfSSL-Bot and unassigned dgarske Nov 5, 2026
@dgarske
dgarske requested a review from danielinux November 5, 2026 23:34
@danielinux
danielinux merged commit 3309e77 into wolfSSL:master Nov 6, 2026
527 of 575 checks passed
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.

5 participants