diff options
| author | Stanislaw Grams <stanislaw.grams@intel.com> | 2026-09-16 16:50:17 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-10-19 07:26:39 +0300 |
| commit | 0a402bd060cd496e2ffb1f323d34b89ca350d7b0 (patch) | |
| tree | 7d9610960143968a95793ec6b291c058f4619b1e /UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem | |
| parent | 0b14d8c58c8379d25fde73e2a64dd16c5d1c7062 (diff) | |
| download | edk2-0a402bd060cd496e2ffb1f323d34b89ca350d7b0.tar.xz | |
OvmfPkg/TdxMeasurementLib: Bound event size before BuildGuidHob
TdxMeasurementBuildGuidHob() passes a fixed header size plus the
caller-supplied EventSize to BuildGuidHob() and then copies EventSize
bytes into the returned buffer. Where UINTN is 32 bits, that sum can wrap,
so BuildGuidHob() would allocate the wrapped length while CopyMem() still
writes EventSize bytes past the end of the HOB.
Compute the payload length with SafeUint32Add() and fail with
EFI_INVALID_PARAMETER on overflow. BuildGuidHob() enforces the maximum
GUID HOB payload and returns NULL for oversized requests, which the
existing NULL check already handles.
Signed-off-by: Stanislaw Grams <stanislaw.grams@intel.com>
Diffstat (limited to 'UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem')
0 files changed, 0 insertions, 0 deletions
