Revision: 16462
http://sourceforge.net/p/edk2/code/16462
Author: vanjeff
Date: 2014-12-01 08:55:15 +0000 (Mon, 01 Dec 2014)
Log Message:
-----------
Correct the alignment calculation of PE/COFF attribute certificate entry.
This is to resolve the possible certificate entry retrieving issue caused by
un-aligned (8-bytes) VirtualAddress in some PE/COFF image, which may break
secure boot.
(Sync patch r16449 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <[email protected]>
Reviewed-by: Siyuan Fu <[email protected]>
Reviewed-by: Guo Dong <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/16449
Modified Paths:
--------------
branches/UDK2014.SP1/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
Modified:
branches/UDK2014.SP1/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
===================================================================
---
branches/UDK2014.SP1/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
2014-12-01 08:54:20 UTC (rev 16461)
+++
branches/UDK2014.SP1/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
2014-12-01 08:55:15 UTC (rev 16462)
@@ -1253,7 +1253,7 @@
//
for (OffSet = SecDataDir->VirtualAddress;
OffSet < (SecDataDir->VirtualAddress + SecDataDir->Size);
- OffSet += WinCertificate->dwLength, OffSet += ALIGN_SIZE (OffSet)) {
+ OffSet += (WinCertificate->dwLength + ALIGN_SIZE
(WinCertificate->dwLength))) {
WinCertificate = (WIN_CERTIFICATE *) (mImageBase + OffSet);
if ((SecDataDir->VirtualAddress + SecDataDir->Size - OffSet) <= sizeof
(WIN_CERTIFICATE) ||
(SecDataDir->VirtualAddress + SecDataDir->Size - OffSet) <
WinCertificate->dwLength) {
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits