From fe19f86dcd9c5c40b5ed487ee7eacd93a013a044 Mon Sep 17 00:00:00 2001 From: "INDIA\\sachinganesh" Date: Fri, 20 Jun 2025 01:42:17 +0530 Subject: [PATCH] MdeModulePkg/SmmCore: Modify check for Mm Communicate Buffer without data Modify communication buffer size check to take into consideration that buffer might not have data. Signed-off-by: Sachin Ganesh --- MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c index 1b2b8857c5..100e00697c 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c @@ -734,7 +734,7 @@ SmmEntryPoint ( // Check for over or underflows // if (!SmmIsBufferOutsideSmmValid ((UINTN)CommunicationBuffer, BufferSize) || - IsOverlapped || (BufferSize < sizeof (EFI_SMM_COMMUNICATE_HEADER))) + IsOverlapped || (BufferSize < OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))) { // // If CommunicationBuffer is not in valid address scope,