Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: cfe4be367f2abda070cc5314600252cb5cc25941
      
https://github.com/tianocore/edk2/commit/cfe4be367f2abda070cc5314600252cb5cc25941
  Author: Michael Kubacki <[email protected]>
  Date:   2026-02-23 (Mon, 23 Feb 2026)

  Changed paths:
    M StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c

  Log Message:
  -----------
  StandaloneMmPkg/MmCommunicationDxe: Enforce CommSize validation

CommSize is an optional parameter to ProcessCommunicationBuffer().

If it is provided, the size it points to must match the total incoming
comm buffer size (header + data) where that size is calculated as
needed for the comm header version.

If the sizes do not match, the copy from the user provided comm buffer
(pointed to by the CommBuffer parameter) to the shared comm buffer
(mMmCommonBuffer.PhysicalStart) could be incorrect, for example, only
copying part of the buffer.

This change returns EFI_INVALID_PARAMETER if the provided CommSize
does not match the expected size instead of asserting to ensure this
behavior is enforced in scenarios when asserts are disabled and to
allow the caller to operate on the return status.

In addition, for the copy from the user provided buffer to the common
buffer to be valid, the total size must be less than or equal to the
size of the common buffer.  This change adds that validation as well.

Signed-off-by: Michael Kubacki <[email protected]>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to