<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Library/GptLib, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-09-18T17:02:19+00:00</updated>
<entry>
<title>MdeModulePkg: Add EFIAPI to GptLib functions</title>
<updated>2026-09-18T17:02:19+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-09-17T15:49:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e2e66ae1d346380c191bb2b4d4badcbefdb22715'/>
<id>urn:sha1:e2e66ae1d346380c191bb2b4d4badcbefdb22715</id>
<content type='text'>
EFIAPI is required on library interface functions to ensure that the
correct calling convention is used.

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/GptLib: Add host-based unit tests for malformed GPT input</title>
<updated>2026-07-20T21:50:57+00:00</updated>
<author>
<name>Richard Lyu</name>
<email>richard.lyu@suse.com</email>
</author>
<published>2026-07-07T14:56:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b1029265b1459a4021df8e7495daf281df3344ef'/>
<id>urn:sha1:b1029265b1459a4021df8e7495daf281df3344ef</id>
<content type='text'>
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 &lt;richard.lyu@suse.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/GptLib: Add host-based unit tests for valid GPT behavior</title>
<updated>2026-07-20T21:50:57+00:00</updated>
<author>
<name>Richard Lyu</name>
<email>richard.lyu@suse.com</email>
</author>
<published>2026-07-07T12:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=77585e50049839856baed37d120d4f705a2cf1d0'/>
<id>urn:sha1:77585e50049839856baed37d120d4f705a2cf1d0</id>
<content type='text'>
Add the positive-path host-based tests for the shared GptLib parser
(extracted as part of the parser security hardening), ensuring the
tightened checks in PartitionValidGptTable(), PartitionCheckGptEntry()
and PartitionRestoreGptTable() do not falsely reject well-formed GPTs.

The tests run against an in-memory mock disk and cover accepted
primary/backup headers, boundary but legal header/entry sizes, correct
entry-status flagging on valid entries, and primary/backup restore
round-trips.

Signed-off-by: Richard Lyu &lt;richard.lyu@suse.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/GptLib: Validate GPT header fields before use</title>
<updated>2026-07-20T21:50:57+00:00</updated>
<author>
<name>Richard Lyu</name>
<email>richard.lyu@suse.com</email>
</author>
<published>2026-06-30T08:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=45732edfffcabd8a96d396029e7269875da05407'/>
<id>urn:sha1:45732edfffcabd8a96d396029e7269875da05407</id>
<content type='text'>
PartitionValidGptTable() checked the signature, header CRC32, MyLBA, the
entry-array CRC32 and the entry-array size overflow, but not several other
UEFI-mandated GPT header constraints. DxeTpm2MeasureBootLib used to enforce
these via Tpm2SanitizeEfiPartitionTableHeader(); once it switched to this
shared parser, the checks were lost on the path.

Also reject a header unless Header.Revision is GPT_HEADER_REVISION_V1,
HeaderSize is at least the 92-byte minimum, NumberOfPartitionEntries is
non-zero, SizeOfPartitionEntry is 128 * 2^n, and PartitionEntryLBA *
BlockSize cannot overflow. The "entries lie before FirstUsableLBA" rule is
intentionally omitted, as this routine also validates the backup header
whose entry array follows the usable region.

This restores the validation the measurement path lost and, because GptLib
is shared, tightens PartitionDxe the same way: malformed headers are now
rejected and the parse and measure paths stay identical.

Ref: https://seclists.org/oss-sec/2026/q2/727
Signed-off-by: Richard Lyu &lt;richard.lyu@suse.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/GptLib: Extract shareable GPT parser into a library</title>
<updated>2026-07-20T21:50:57+00:00</updated>
<author>
<name>Richard Lyu</name>
<email>richard.lyu@suse.com</email>
</author>
<published>2026-06-25T06:17:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=00a865d595591fef44dc9f23353f5c3d50152e04'/>
<id>urn:sha1:00a865d595591fef44dc9f23353f5c3d50152e04</id>
<content type='text'>
As reported in CVE-2024-13745 via oss-sec, DxeTpm2MeasureBootLib can
measure a partition table that differs from the one parsed by the
PartitionDxe driver.

To address this, the more complete GPT parsing logic from PartitionDxe
is extracted into a standalone GptLib library so it can be
shared between PartitionDxe and DxeTpm2MeasureBootLib. This ensures
that the exact same partition table measured into PCR[5] is the one
parsed and used by the system. PartitionDxe behavior is unchanged.

Ref: https://seclists.org/oss-sec/2026/q2/727
Signed-off-by: Richard Lyu &lt;richard.lyu@suse.com&gt;
</content>
</entry>
</feed>
