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

Issue 2234003: Change kernel vboot header layout and add support for separate header verification. (Closed)

Created:
10 years, 7 months ago by gauravsh
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org
Base URL:
ssh://git@gitrw.chromium.org/chromiumos
Visibility:
Public.

Description

Change kernel vboot header layout and add support for separate header verification. This CL adds 2 things: - Instead of having a kernel config, now we have a kernel preamble which contains some important parameters needed by the bootloader in the firmware to kernel hand-off. These parameters are verified using a separate preamble signature in addition to the kernel signature on actual kernel image data. - Adds a new VerifyKernelHeader() API function which verifies the kernel verified boot header excluding the kernel data and also extracts parameters out of this header needed to verify the actual kernel image data (if deemed necessary). This allows for vboot header verification and data verification to be performed separately.

Patch Set 1 #

Patch Set 2 : add verifykernelheader(). rename old function to verifykernelkeyheader(). #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+248 lines, -202 lines) Patch
M src/platform/vboot_reference/tests/kernel_image_tests.c View 1 chunk +4 lines, -4 lines 0 comments Download
M src/platform/vboot_reference/tests/test_common.c View 1 chunk +3 lines, -1 line 0 comments Download
M src/platform/vboot_reference/utility/include/kernel_utility.h View 1 chunk +0 lines, -5 lines 0 comments Download
M src/platform/vboot_reference/utility/kernel_utility.cc View 8 chunks +0 lines, -21 lines 0 comments Download
M src/platform/vboot_reference/vkernel/include/kernel_image_fw.h View 1 5 chunks +53 lines, -32 lines 0 comments Download
M src/platform/vboot_reference/vkernel/kernel_image.c View 14 chunks +78 lines, -65 lines 0 comments Download
M src/platform/vboot_reference/vkernel/kernel_image_fw.c View 1 9 chunks +110 lines, -74 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
gauravsh
As per our discussion yesterday, here are the changes that hopefully make it possible to ...
10 years, 7 months ago (2010-05-26 14:55:24 UTC) #1
Randall Spangler
LGTM http://codereview.chromium.org/2234003/diff/2001/3007 File src/platform/vboot_reference/vkernel/kernel_image_fw.c (right): http://codereview.chromium.org/2234003/diff/2001/3007#newcode222 src/platform/vboot_reference/vkernel/kernel_image_fw.c:222: /* Note: All the offset calculations are based ...
10 years, 7 months ago (2010-05-26 16:35:23 UTC) #2
Randall Spangler
On 2010/05/26 16:35:23, Randall Spangler wrote: > LGTM (Though needs updating to the new locations ...
10 years, 7 months ago (2010-05-26 16:35:57 UTC) #3
Bill Richardson
This is a good incremental step, but it won't do what we want yet. First, ...
10 years, 7 months ago (2010-05-26 16:41:01 UTC) #4
gauravsh
On Wed, May 26, 2010 at 9:41 AM, <wfrichar@chromium.org> wrote: > This is a good ...
10 years, 7 months ago (2010-05-26 17:03:24 UTC) #5
gauravsh
10 years, 7 months ago (2010-05-26 19:48:31 UTC) #6
On Wed, May 26, 2010 at 10:03 AM, Gaurav Shah <gauravsh@chromium.org> wrote:
> On Wed, May 26, 2010 at 9:41 AM,  <wfrichar@chromium.org> wrote:
>> This is a good incremental step, but it won't do what we want yet. First,
>> I've
>> refactored the directories, so all the _fw.c files are in a new location.
>> Second, we want to verify the components separately. This implementation of
>> VerifyKernel() assumes that the entire disk-partition content is copied into
>> RAM
>> as a single entity. That's not the case. The header from the disk partition
>> is
>> in RAM in one place, and the kernel_data (without any headers) is in RAM in
>> another place.
>>
>
> With this change, VerifyKernel() will no longer need to be called.
> Instead, we call VerifyKernelHeader() first to just verify the vboot
> header. A separate call to VerifyKernelData() [the required parameters
> will be filled in by the first call)] verifies the actual kernel image
> data. Isn't that what is required?
>
>> Also: Do we want to move the kernel_data signature inside the preamble? That
>> would prevent us from needing to re-validate the preamble in order to
>> validate
>> the kernel_data.
>>
> All the preamble data needs to logically considered a part of kernel
> data when the kernel_signature is verified (otherwise we loose the
> preamble-kernel association which makes splicing attacks possible).

With the latest CL that is out for review, kernel_signature is now a
part of the preamble while still defending against splicing attacks.

>
>> http://codereview.chromium.org/2234003/show
>>
>
>
>
> --
> -g
>



-- 
-g

Powered by Google App Engine
This is Rietveld 408576698