From 3a50f54cabc6399eb425c564315036aa48135743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Ha=CC=88user?= <8659494+mhaeuser@users.noreply.github.com> Date: Fri, 5 May 2023 11:31:15 +0200 Subject: [PATCH] MdeModulePkg/DxeCore: Check FileAuthenticationStatus for caller buffers --- MdeModulePkg/Core/Dxe/Image/Image.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index 0e9424eca1..b0bc8e71f0 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1113,6 +1113,18 @@ CoreLoadImageCommon ( } if (SourceSize > 0) { + if (DeviceHandle != NULL) { + Status = CoreOpenProtocol ( + DeviceHandle, + &gEfiFirmwareVolume2ProtocolGuid, + NULL, + NULL, + NULL, + EFI_OPEN_PROTOCOL_TEST_PROTOCOL + ); + ImageIsFromFv = !EFI_ERROR (Status); + } + Status = EFI_SUCCESS; } else { Status = EFI_LOAD_ERROR;