Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Issue 1430001: VBoot Reference: Fix splicing bugs in Firmware and Kernel verification. (Closed)

Created:
10 years, 9 months ago by gauravsh
Modified:
9 years, 6 months ago
Reviewers:
Will Drewry
CC:
chromium-os-reviews_chromium.org, gauravsh
Visibility:
Public.

Description

VBoot Reference: Fix splicing bugs in Firmware and Kernel verification. BUG=670 TESTS=Adds new tests which verify this doesn't occur anymore. Existing tests still pass. The existing code computes and verifies signatures on firmware/kernel data and firmware/kernel versions separately. This causes a image splicing bug where it is possible to combine together a version signature from a valid new firmware with firmware data and signature from an older version. The same problem exists with kernel verification. This CL fixes this by changing the firmware/kernel signatures to also include the version information. For the Firmware, there's a separate signature on the preamble (which contains the version) but the firmware signature now also includes this preamble in addition to the firmware data. For the Kernel, there's a separate signature on the kernel config/options (wich also contains the version), but the kernel signature now also includes these config/options in addition to the kernel data.

Patch Set 1 #

Patch Set 2 : . #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+363 lines, -65 lines) Patch
M src/platform/vboot_reference/crypto/rsa_utility.c View 1 chunk +31 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/include/firmware_image.h View 2 chunks +7 lines, -3 lines 0 comments Download
M src/platform/vboot_reference/include/kernel_image.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/platform/vboot_reference/include/rsa_utility.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/tests/Makefile View 1 4 chunks +12 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/tests/firmware_image_tests.c View 1 chunk +2 lines, -1 line 0 comments Download
A src/platform/vboot_reference/tests/firmware_splicing_tests.c View 1 chunk +76 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/tests/kernel_image_tests.c View 2 chunks +3 lines, -2 lines 0 comments Download
A src/platform/vboot_reference/tests/kernel_splicing_tests.c View 1 chunk +79 lines, -0 lines 1 comment Download
M src/platform/vboot_reference/tests/test_common.h View 2 chunks +5 lines, -2 lines 0 comments Download
M src/platform/vboot_reference/tests/test_common.c View 8 chunks +14 lines, -8 lines 0 comments Download
M src/platform/vboot_reference/utils/firmware_image.c View 10 chunks +62 lines, -25 lines 0 comments Download
M src/platform/vboot_reference/utils/kernel_image.c View 10 chunks +61 lines, -23 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
gauravsh
10 years, 9 months ago (2010-03-26 17:46:24 UTC) #1
gauravsh
ping? On Fri, Mar 26, 2010 at 10:46 AM, <gauravsh@chromium.org> wrote: > Reviewers: Will Drewry, ...
10 years, 9 months ago (2010-03-29 17:50:16 UTC) #2
Will Drewry
10 years, 9 months ago (2010-03-29 23:03:40 UTC) #3
LGTM

Feel free to submit - I may take a look through all of this again(!) (including
code not changed) to make sure I understand all the checks.

Thanks!!

http://codereview.chromium.org/1430001/diff/2001/3009
File src/platform/vboot_reference/tests/kernel_splicing_tests.c (right):

http://codereview.chromium.org/1430001/diff/2001/3009#newcode28
src/platform/vboot_reference/tests/kernel_splicing_tests.c:28: &len);
spacing ;)

Powered by Google App Engine
This is Rietveld 408576698