edk2/MdeModulePkg/Library/GptLib/GptLib.inf
Richard Lyu 00a865d595 MdeModulePkg/GptLib: Extract shareable GPT parser into a library
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 <richard.lyu@suse.com>
2026-07-20 21:50:57 +00:00

49 lines
1.5 KiB
INI

## @file
# Shared GUID Partition Table (GPT) parsing and validation library.
#
# Provides the GPT table parsing, validation and restore routines that are
# shared between the Partition driver and other consumers that must parse the
# same on-disk GPT layout.
#
# Caution: This library requires additional review when modified.
# This library will have external input - disk partition.
# This external input must be validated carefully to avoid security issue like
# buffer overflow, integer overflow.
#
# Copyright (c) 2026, SUSE LLC. All rights reserved.<BR>
# Copyright (c) 2018 Qualcomm Datacenter Technologies, Inc.
# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = GptLib
FILE_GUID = E228F30C-C7D5-4A93-BBA7-B4E22327E289
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = GptLib
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC AARCH64 RISCV64 LOONGARCH64
#
[Sources]
Gpt.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
MemoryAllocationLib
UefiBootServicesTableLib
[Guids]
gEfiPartTypeUnusedGuid ## SOMETIMES_CONSUMES ## GUID