New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 825894 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Dec 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

vboot_reference: tlcl for TPM2.0 uses improper type for RC in response header

Project Member Reported by apronin@chromium.org, Mar 26 2018

Issue description

Tlcl currently uses struct tpm_header (shared between commands and responses) for response header, which defines tpm_code as TPM_CC. It should be TPM_RC instead.

Both types have the same size and no RC-specific checks are performed when unmarshaling the response, so using the wrong type doesn't have any undesired consequences. Still, it makes sense to fix it to avoid any confusion.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/a872e9b49e2690da00baf183e216931ba1ef0e6b

commit a872e9b49e2690da00baf183e216931ba1ef0e6b
Author: Andrey Pronin <apronin@chromium.org>
Date: Tue Mar 27 21:58:11 2018

firmware: tpm2_lite: fix command/response code type

Responses and commands share the same header structure. The
tpm_code field corresponds to TPM_CC in one case and TPM_RC
in the other. Make it uint32_t (instead of TPM_CC) in the
structure to avoid confusion when dealing with responses.

BUG= chromium:825894 
BRANCH=none
TEST=build

Change-Id: I07821f35b0f539a863ee97c0a08c141d0533a4de
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/981111
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>

[modify] https://crrev.com/a872e9b49e2690da00baf183e216931ba1ef0e6b/firmware/include/tpm2_tss_constants.h
[modify] https://crrev.com/a872e9b49e2690da00baf183e216931ba1ef0e6b/firmware/lib/tpm2_lite/marshaling.c

Components: OS>Systems>Security
Status: Fixed (was: Available)
IIUC this is fixed

Sign in to add a comment