[coreboot-gerrit] New patch to review for coreboot: 1c34417 cbfstool: Fix update-fit command

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Sat Dec 27 12:26:15 CET 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7958

-gerrit

commit 1c34417235165862340413b50f8b0854b82a9eda
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Sat Dec 27 13:08:54 2014 +0200

    cbfstool: Fix update-fit command
    
    Regression in commit 3fcde22 caused parse_microcode_blob() to access
    data outside cpu_microcode_blob.bin file in CBFS and create invalid
    Intel Firmware Interface Table entries.
    
    Change-Id: I1a687060084c2acd6cac5f5053b74a332b4ac714
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 util/cbfstool/fit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c
index bf6c6d4..0652129 100644
--- a/util/cbfstool/fit.c
+++ b/util/cbfstool/fit.c
@@ -207,8 +207,8 @@ static int parse_microcode_blob(struct cbfs_image *image,
 	uint32_t current_offset;
 	uint32_t file_length;
 
-	current_offset = (int)((char *)mcode_file - image->buffer.data);
 	fit_header(mcode_file, &current_offset, &file_length);
+	current_offset += (int)((char *)mcode_file - image->buffer.data);
 
 	num_mcus = 0;
 	while (file_length > sizeof(struct microcode_header))



More information about the coreboot-gerrit mailing list