summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
diff options
context:
space:
mode:
authorRichard Lyu <richard.lyu@suse.com>2026-06-25 10:07:29 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-07-21 00:50:57 +0300
commit070c9026f754b2c0b88445c8638eed0609673ccc (patch)
tree6500d263b09a2e19e5ee0b0b144598c117ef3d1c /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
parent45732edfffcabd8a96d396029e7269875da05407 (diff)
downloadedk2-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