audk/SecurityPkg
Laszlo Ersek 0b143fa43e SecurityPkg/DxeImageVerificationLib: catch alignment overflow (CVE-2019-14562)
The DxeImageVerificationHandler() function currently checks whether
"SecDataDir" has enough room for "WinCertificate->dwLength". However, for
advancing "OffSet", "WinCertificate->dwLength" is aligned to the next
multiple of 8. If "WinCertificate->dwLength" is large enough, the
alignment will return 0, and "OffSet" will be stuck at the same value.

Check whether "SecDataDir" has room left for both
"WinCertificate->dwLength" and the alignment.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Wenyi Xie <xiewenyi2@huawei.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2215
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200901091221.20948-4-lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Wenyi Xie <xiewenyi2@huawei.com>
Reviewed-by: Min M Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2020-09-02 10:16:18 +00:00
..
FvReportPei SecurityPkg: Fix spelling errors 2019-10-23 10:23:23 -07:00
Hash2DxeCrypto SecurityPkg/Hash2DxeCrypto: Fix few typos 2020-02-10 22:30:07 +00:00
HddPassword SecurityPkg/HddPassword: Use BaseLib linked list iteration macros 2020-04-21 02:20:51 +00:00
Include SecurityPkg/Tcg2: handle PRE HASH and LOG ONLY 2020-08-26 15:56:11 +00:00
Library SecurityPkg/DxeImageVerificationLib: catch alignment overflow (CVE-2019-14562) 2020-09-02 10:16:18 +00:00
Pkcs7Verify/Pkcs7VerifyDxe SecurityPkg: Fix few typos 2020-02-10 22:30:07 +00:00
RandomNumberGenerator/RngDxe SecurityPkg: Fix few typos 2020-02-10 22:30:07 +00:00
Tcg SecurityPkg: Initailize variable Status before it is consumed. 2020-09-01 16:11:24 +00:00
VariableAuthenticated/SecureBootConfigDxe SecurityPkg/VariableAuthenticated: Fix few typos 2020-02-10 22:30:07 +00:00
SecurityPkg.ci.yaml SecurityPkg/SecurityPkg.ci.yaml: Add configuration for Ecc check 2020-08-17 03:28:09 +00:00
SecurityPkg.dec SecurityPkg/dsc: add FvEventLogRecordLib 2020-08-26 15:56:11 +00:00
SecurityPkg.dsc SecurityPkg/dsc: add FvEventLogRecordLib 2020-08-26 15:56:11 +00:00
SecurityPkg.uni SecurityPkg: Fix spelling errors 2019-10-23 10:23:23 -07:00
SecurityPkgExtra.uni SecurityPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:23 -07:00