diff options
| author | Stanislaw Grams <stanislaw.grams@intel.com> | 2026-09-30 12:25:21 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-10-19 07:26:39 +0300 |
| commit | 6951a9edbb32a5b77b80781a0a3f0edee1205541 (patch) | |
| tree | 3184b2e1eda00ac97e8a6887b01a23293922c3e2 /UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem | |
| parent | 0a402bd060cd496e2ffb1f323d34b89ca350d7b0 (diff) | |
| download | edk2-6951a9edbb32a5b77b80781a0a3f0edee1205541.tar.xz | |
OvmfPkg/QemuFwCfgLib: Bound fw_cfg size before BuildGuidHob
CacheFwCfgInfoWithOptionalMeasurment() derives the cached-item HOB
size from a VMM-controlled fw_cfg file and stores it in a UINT32. An
oversized item could wrap that size, so BuildGuidHob() would allocate the
wrapped length while QemuFwCfgReadBytes() copies the full file into it.
Compute the HOB size 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
