audk/MdeModulePkg
Ard Biesheuvel d430568887 MdeModulePkg/UefiBootManagerLib: fix crash on uninitialized ExitData
As reported by Gary, the recent LoadImage/StartImage changes to
accommodate dispatching PE/COFF images built for foreign architectures
may result in a crash when loading an IA32 option ROM into a X64 VM
running OVMF:

  Loading driver at 0x0007E537000 EntryPoint=0x0007E53C06D 8086100e.efi
  InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F003B98
  ProtectUefiImageCommon - 0x7F002BC0
    - 0x000000007E537000 - 0x000000000009F900
  Image type IA32 can't be started on X64 UEFI system.
  ASSERT MdeModulePkg/Core/Dxe/Mem/Pool.c(698): Head->Signature == ((('p') |
              ('h' << 8)) | ((('d') | ('0' << 8)) << 16)) || Head->Signature
              == ((('p') | ('h' << 8)) | ((('d') | ('1' << 8)) << 16))

This turns out to be caused by the deferred image loading code in BDS,
which ends up trying to free an uninitialized 'ExitData' pointer.

Given that ExitData is never actually used, let's just get rid of it
entirely. While we're at it, drop the pointless assignment of Status
as well.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2019-04-17 18:02:37 -07:00
..
Application MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Bus MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures 2019-04-14 18:37:27 -07:00
Core MdeModulePkg/DxeCore: remove explicit EBC handling 2019-04-14 18:37:39 -07:00
Include MdeModulePkg: introduce PE/COFF image emulator protocol 2019-04-14 18:35:41 -07:00
Library MdeModulePkg/UefiBootManagerLib: fix crash on uninitialized ExitData 2019-04-17 18:02:37 -07:00
Logo MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Universal MdeModulePkg/CapsulePei: Update the debug code to print 64bit data 2019-04-16 13:03:12 +08:00
MdeModulePkg.dec MdeModulePkg: introduce PE/COFF image emulator protocol 2019-04-14 18:35:41 -07:00
MdeModulePkg.dsc MdeModulePkg: Move BaseUefiTianoCustomDecompressLib to 2019-04-10 14:11:48 +08:00
MdeModulePkg.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00