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 <sachinganesh@ami.com>
This commit is contained in:
INDIA\sachinganesh
2025-06-20 01:42:17 +05:30
committed by mergify[bot]
parent 0cb71c18c5
commit fe19f86dcd

View File

@@ -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,