audk/UefiCpuPkg
Zhichao Gao c54c856218 UefiCpuPkg/MpInitLib: MicrocodeDetect: Ensure checked range is valid
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1934

0x0       MicrocodeBegin  MicrocodeEntry  MicrocodeEnd      0xffffffff
|--------------|---------------|---------------|---------------|
                                 valid TotalSize
TotalSize is only valid between 0 and (MicrocodeEnd - MicrocodeEntry).
So add '(UINTN)MicrocodeEntryPoint > (MAX_ADDRESS - TotalSize)' before
'((UINTN)MicrocodeEntryPoint + TotalSize) > MicrocodeEnd' to make sure
((UINTN)MicrocodeEntryPoint + TotalSize) wouldn't overflow.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2019-06-27 09:20:53 +08:00
..
Application/Cpuid UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuDxe UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07: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: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuIoPei UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
CpuMpPei UefiCpuPkg/CpuMpPei: Add missing CpuLib class 2019-04-30 16:39:34 -07:00
CpuS3DataDxe UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
Include UefiCpuPkg RegisterCpuFeaturesLib.h: Fix typo 'STRICK' to 'STRIKE' 2019-06-13 09:35:58 +08:00
Library UefiCpuPkg/MpInitLib: MicrocodeDetect: Ensure checked range is valid 2019-06-27 09:20:53 +08:00
PiSmmCommunication UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
PiSmmCpuDxeSmm UefiCpuPkg PiSmmCpuDxeSmm: Only support IN/OUT IO save state read (CVE-2018-12182) 2019-05-14 15:54:57 +08:00
ResetVector UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
SecCore UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Remove PcdFrameworkCompatibilitySupport usage 2019-05-09 09:42:55 +08:00
UefiCpuPkg.dec UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
UefiCpuPkg.dsc UefiCpuPkg/MpInitLibUp: Add uniprocessor MpInitLib 2019-04-30 16:39:34 -07:00
UefiCpuPkg.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
UefiCpuPkgExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00