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

Issue 3177029: Upgrade TPM key storage from downlevel versions. (Closed)

Created:
10 years, 4 months ago by fes
Modified:
9 years, 7 months ago
Reviewers:
Sumit, Will Drewry
CC:
chromium-os-reviews_chromium.org, Chris Masone, gauravsh, Will Drewry
Base URL:
http://src.chromium.org/git/cryptohome.git
Visibility:
Public.

Description

Upgrade TPM key storage from downlevel versions. This CL addresses a problem with the final key storage location where it would not upgrade a cryptohome system key that was stored in the TSS persistent storage. The CL will first check for the key in the correct location, and if it does not exist, it will attempt to locate the key by UUID in the TSS persistent store. If it exists, it will load that key and also save it to the correct location. The CL also upgrades vault keysets wrapped by pre-0.8.66.1 builds, where the cryptohome system key's public key hash was not stored in the vault keyset. Storign this hash is necessary to detect TPM resets that result in unrecoverable vaults. By verifying the public key hash, the code can re-create the cryptohome without user intervention, as there would be no way to recover anyway. The manual testing involved for this CL was: 1. Install an 0.8.64 build. 2. Wait for TPM initialization/ownership 3. Log in to create a TPM-wrapped vault keyset 4. Navigate to a web page. 5. Log out 6. Reboot and install 0.8.66 with this patch. 7. Log back in, and the web page from step 4 should appear 8. Open a shell and verify that the crytpohome system key is in /home/.shadow/cryptohome.key 9. Open a shell and verify that the user's vault keyset has a public key hash using cryptohome --dump_keyset --user=<user> These steps verified the upgrade path. I should point out that before upgrading to 0.8.66, I dumped the stored keyset and verified that it was TPM-wrapped, and without a public key hash. In addition, I tested clearing the TPM as usual and the build successfully detects that and re-creates the user's cryptohome. Change-Id: I2d94149025d9e325b1a5acb99036657cf35fcede BUG=none TEST=manual

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -22 lines) Patch
M crypto.h View 1 chunk +1 line, -0 lines 0 comments Download
M crypto.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M mount.cc View 1 chunk +10 lines, -6 lines 0 comments Download
M tpm.h View 1 chunk +3 lines, -0 lines 0 comments Download
M tpm.cc View 4 chunks +41 lines, -16 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
fes
10 years, 4 months ago (2010-08-20 19:05:54 UTC) #1
Will Drewry
10 years, 4 months ago (2010-08-20 19:21:32 UTC) #2
LGTM

Man... there's a lot of magic in there :/

Powered by Google App Engine
This is Rietveld 408576698