edk2/MdeModulePkg/Library/GptLib
Richard Lyu b1029265b1 MdeModulePkg/GptLib: Add host-based unit tests for malformed GPT input
Extend the GptLib host-based tests with negative cases that guard the
security hardening in PartitionValidGptTable(), PartitionCheckGptEntry()
and PartitionRestoreGptTable() against future regressions. These tests
exercise the shared parser, not the specific fix itself.

The new cases drive the parser with malformed GPT structures that an
attacker may present: bad signature/revision, header-size boundaries,
CRC corruption, MyLBA replay, zero/non-power-of-two entry sizes, LBA
multiplication overflow, out-of-range and overlapping entries, and
restore failure on write-protected media. The INF file header is
updated to note the added malformed coverage.

Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-07-20 21:50:57 +00:00
..
UnitTest MdeModulePkg/GptLib: Add host-based unit tests for malformed GPT input 2026-07-20 21:50:57 +00:00
Gpt.c MdeModulePkg/GptLib: Validate GPT header fields before use 2026-07-20 21:50:57 +00:00
GptLib.inf MdeModulePkg/GptLib: Extract shareable GPT parser into a library 2026-07-20 21:50:57 +00:00