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

Issue 2786005: Protect the kernel version space from redefinition. (Closed)

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

Description

Protect the kernel version space from redefinition.

Patch Set 1 #

Patch Set 2 : More stuff. #

Total comments: 7

Patch Set 3 : fix permission check #

Total comments: 5

Patch Set 4 : change MAXNVWRITE strategy #

Patch Set 5 : GRWL! #

Total comments: 1

Patch Set 6 : several small fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -110 lines) Patch
M vboot_firmware/include/rollback_index.h View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download
M vboot_firmware/include/tlcl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M vboot_firmware/lib/include/tss_constants.h View 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M vboot_firmware/lib/rollback_index.c View 1 2 3 4 5 5 chunks +165 lines, -109 lines 0 comments Download
M vboot_firmware/stub/tlcl.c View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Luigi Semenzato
This fixes the problem we discussed today, in which an attacker can try to redefine ...
10 years, 6 months ago (2010-06-10 05:18:58 UTC) #1
gauravsh
http://codereview.chromium.org/2786005/diff/2001/1005 File vboot_firmware/include/rollback_index.h (right): http://codereview.chromium.org/2786005/diff/2001/1005#newcode31 vboot_firmware/include/rollback_index.h:31: #define KERNEL_SPACE_UID "GRWL" /* Our initials :-) */ nit: ...
10 years, 6 months ago (2010-06-10 15:56:35 UTC) #2
Luigi Semenzato
I uploaded a change to the MAXNVWRITE strategy, PTAL http://codereview.chromium.org/2786005/diff2/5001:13001/14004 The only question I have ...
10 years, 6 months ago (2010-06-10 17:07:05 UTC) #3
gauravsh
10 years, 6 months ago (2010-06-10 17:34:43 UTC) #4
lgtm

http://codereview.chromium.org/2786005/diff/2001/1008
File vboot_firmware/lib/rollback_index.c (right):

http://codereview.chromium.org/2786005/diff/2001/1008#newcode184
vboot_firmware/lib/rollback_index.c:184: if (read_OK) {
On 2010/06/10 17:07:05, Luigi Semenzato wrote:
> On 2010/06/10 15:56:36, gauravsh wrote:
> > is this assuming TPM_SUCCESS is non-zero? shouldn't you check if TPM_SUCESS
==
> > read_OK?
> 
> Maybe you didn't read the whole line.  I am checking that the return code is
> TPM_SUCCESS.
> 

Ah yes, missed that. :)

http://codereview.chromium.org/2786005/diff/5001/6004#newcode229
vboot_firmware/lib/rollback_index.c:229: if (kernel_versions != backup_versions)
{
On 2010/06/10 17:07:07, Luigi Semenzato wrote:
> On 2010/06/10 15:56:37, gauravsh wrote:
> > would it be safe to say that backup_version should always <= kernel_versions
> (if
> > kernel_versions can be trusted). Can you add that as an additional sanity
> check
> > before the write? 
> 
> So at this point kernel version can be trusted, therefore yes, backup version
> should be <=.  (Backup version can always be trusted.)  But what should I do
if
> backup version > kernel version?

recovery I guess, or maybe internal error and system halt.

http://codereview.chromium.org/2786005/diff/16001/2002
File vboot_firmware/include/rollback_index.h (right):

http://codereview.chromium.org/2786005/diff/16001/2002#newcode31
vboot_firmware/include/rollback_index.h:31: #define KERNEL_SPACE_UID "GRWL"  /*
Gaurav, Randall, Will, Luigi --of course! */
Actually, I think it is better to not have this comment. Vanity and all.

Powered by Google App Engine
This is Rietveld 408576698