OSDN Git Service

crytpfs: fix clobbering of crypto info on keymaster failure
authorJP Abgrall <jpa@google.com>
Wed, 11 Feb 2015 21:44:32 +0000 (13:44 -0800)
committerJP Abgrall <jpa@google.com>
Wed, 11 Feb 2015 21:44:32 +0000 (13:44 -0800)
commit933216c8861b6b3f0e65cd27812ce2e3c26721c4
treed39889f24469054d890e4d70e01e7cd5ebb6791e
parentd32b75e6dc329fc8b15d0ae48cf932f091ed6299
crytpfs: fix clobbering of crypto info on keymaster failure

Changing the device lock (even from swipe to none) will cause the
master key to be re-encrypted.
If at that point keymaster fails (e.g. due to an incompatible keymaster update)
cryptfs will write back the now-incomplete crypto metadata.
Upon next reboot, userdata can't be decrypted.

Now we don't bother writing on keymaster failure.

Bug: 19301883
Change-Id: I2b9a1278f8b4d333ac8d567e17e2263005e99409
cryptfs.c