mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 01:21:49 +00:00
Detect GBB 1.1 also as impcompatible version
Older GBB headers (e.g. 1.0 and 1.1) do not have hwid_digest. In such cases, PCR1 is currently extended from 0, causing a remote attestation failure. This change makes all GBB headers older than 1.2 incompatible. BUG=none BRANCH=tot TEST=make -j runtests Change-Id: I7a3b19c2da325a3fa4b9c1fe06ed6f43cb51fb9e Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/270796 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
bf9c2760d2
commit
dc49a68276
@@ -49,8 +49,8 @@ int vb2_read_gbb_header(struct vb2_context *ctx, struct vb2_gbb_header *gbb)
|
||||
if (gbb->major_version != VB2_GBB_MAJOR_VER)
|
||||
return VB2_ERROR_GBB_VERSION;
|
||||
|
||||
/* Current code is not backwards-compatible to 1.0 headers */
|
||||
if (gbb->minor_version == 0)
|
||||
/* Current code is not backwards-compatible to 1.1 headers or older */
|
||||
if (gbb->minor_version < VB2_GBB_MINOR_VER)
|
||||
return VB2_ERROR_GBB_TOO_OLD;
|
||||
|
||||
/*
|
||||
|
||||
@@ -166,8 +166,8 @@ static void gbb_tests(void)
|
||||
TEST_SUCC(vb2_read_gbb_header(&cc, &gbbdest),
|
||||
"read gbb header minor++");
|
||||
gbb.minor_version = 1;
|
||||
TEST_SUCC(vb2_read_gbb_header(&cc, &gbbdest),
|
||||
"read gbb header 1.1");
|
||||
TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest),
|
||||
VB2_ERROR_GBB_TOO_OLD, "read gbb header 1.1 fails");
|
||||
gbb.minor_version = 0;
|
||||
TEST_EQ(vb2_read_gbb_header(&cc, &gbbdest),
|
||||
VB2_ERROR_GBB_TOO_OLD, "read gbb header 1.0 fails");
|
||||
|
||||
Reference in New Issue
Block a user