audk/UefiCpuPkg
Kun Qin a7d8e28b29 UefiCpuPkg: PiSmmCpuDxeSmm: Check buffer size before accessing
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3283

Current SMM Save State routine does not check the number of bytes to be
read, when it comse to read IO_INFO, before casting the incoming buffer
to EFI_SMM_SAVE_STATE_IO_INFO. This could potentially cause memory
corruption due to extra bytes are written out of buffer boundary.

This change adds a width check before copying IoInfo into output buffer.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210406195254.1018-2-kuqin12@gmail.com>
2021-04-12 17:23:54 +00:00
..
Application/Cpuid UefiCpuPkg: strip trailing whitespace 2019-10-04 11:18:32 +01:00
CpuDxe UefiCpuPkg/CpuDxe: Guarantee GDT is below 4GB 2021-03-18 01:11:23 +00:00
CpuFeatures UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuIo2Dxe UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuIo2Smm UefiCpuPkg: CpuIo2Smm: Support of CpuIo driver under StandaloneMm 2021-02-01 10:04:42 -08:00
CpuIoPei UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuMpPei UefiCpuPkg: Move MigrateGdt from DiscoverMemory to TempRamDone. (CVE-2019-11098) 2021-02-04 01:30:05 +00:00
CpuS3DataDxe UefiCpuPkg/CpuS3DataDxe: do not allocate useless register tables 2021-01-20 18:20:14 +00:00
Include UefiCpuPkg: Add MicrocodeLib for loading microcode 2021-04-09 01:43:18 +00:00
Library UefiCpuPkg/CpuTimerLib: Update LIBRARY_CLASS of Base instance. 2021-04-12 03:20:24 +00:00
PiSmmCommunication UefiCpuPkg/SmmCommunication: Remove out-dated comments 2021-03-25 02:34:29 +00:00
PiSmmCpuDxeSmm UefiCpuPkg: PiSmmCpuDxeSmm: Check buffer size before accessing 2021-04-12 17:23:54 +00:00
ResetVector UefiCpuPkg: Add a 16-bit protected mode code segment descriptor 2020-08-17 02:46:39 +00:00
SecCore UefiCpuPkg: Move MigrateGdt from DiscoverMemory to TempRamDone. (CVE-2019-11098) 2021-02-04 01:30:05 +00:00
SecMigrationPei UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098) 2020-07-28 01:43:16 +00:00
Test UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test 2020-08-12 11:38:37 +00:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Remove PcdFrameworkCompatibilitySupport usage 2019-05-09 09:42:55 +08:00
UefiCpuPkg.ci.yaml UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for Ecc check 2020-08-17 03:28:09 +00:00
UefiCpuPkg.dec UefiCpuPkg: Add MicrocodeLib for loading microcode 2021-04-09 01:43:18 +00:00
UefiCpuPkg.dsc UefiCpuPkg: Add MicrocodeLib for loading microcode 2021-04-09 01:43:18 +00:00
UefiCpuPkg.uni UefiCpuPkg: Create an SEV-ES workarea PCD 2020-08-17 02:46:39 +00:00
UefiCpuPkgExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00