diff options
| author | Richard Lyu <richard.lyu@suse.com> | 2026-06-25 10:07:29 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-07-21 00:50:57 +0300 |
| commit | 070c9026f754b2c0b88445c8638eed0609673ccc (patch) | |
| tree | 6500d263b09a2e19e5ee0b0b144598c117ef3d1c /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c | |
| parent | 45732edfffcabd8a96d396029e7269875da05407 (diff) | |
| download | edk2-070c9026f754b2c0b88445c8638eed0609673ccc.tar.xz | |
MdeModulePkg/PartitionDxe: Abort on primary GPT recovery failure
When the primary GPT is invalid, PartitionInstallGptChildHandles()
restores it from the backup and re-validates it. Both the restore write
and the re-validation can fail (e.g. write-protected media, or a backup
AlternateLBA pointing beyond the device), yet the existing code only logs
the failure and parses partitions from a known-invalid PrimaryHeader.
Abort GPT processing when either the restore or the validation fails, so
partitions are only ever parsed from a validated primary GPT. The backup
recovery branch is left unchanged, as the primary is already validated.
A device with an unrecoverable primary GPT now installs no child handles
instead of using an invalid header. This keeps the table PartitionDxe uses
in sync with the one DxeTpm2MeasureBootLib measures into PCR[5].
Ref: https://seclists.org/oss-sec/2026/q2/727
Signed-off-by: Richard Lyu <richard.lyu@suse.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c')
0 files changed, 0 insertions, 0 deletions
