android_system_core/fs_mgr/libfs_avb
Bowgo Tsai ec10d3cf6e libfs_avb: verifying vbmeta digest early
We should check FLAGS_VERIFICATION_DISABLED is set or not
after verifying the vbmeta digest against `androidboot.vbmeta.digest`
from bootloader. This is to ensure the /vbmeta content is not
changed since the bootloader has verified it.

We still allow vbmeta digest verification error if the device is
unlocked. Note that this change will introduce a limitation that
the device will not boot if:

  1. The image is signed with FLAGS_VERIFICATION_DISABLED is set
  2. The device state is locked

However, it should not be a concern as we shouldn't boot a locked
device without verification.

Bug: 179452884
Test: build image with BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2,
      boot the device, then `adb shell touch /metadata/gsi/dsu/avb_enforce`.
      Reboot the device, checks the device does not boot because
      `androidboot.vbmeta.digest` is empty but AVB is enforced.

Change-Id: Id15a25403d16b36d528dc3b8998910807e801ad2
2021-02-08 21:36:15 +08:00
..
include/fs_avb add API to get hash descriptor 2020-05-17 17:06:59 -07:00
tests libfs_avb: Fix unit test failures 2021-01-25 16:19:03 +08:00
Android.bp Ensure compile first to make avbtool work 2021-01-27 14:06:50 -08:00
avb_ops.cpp Use more inclusive language for #inclusivefixit 2020-07-23 11:13:37 -07:00
avb_ops.h avb_ops: support reading from a logical partition 2019-04-11 10:58:30 +08:00
avb_util.cpp add API to get hash descriptor 2020-05-17 17:06:59 -07:00
avb_util.h add API to get hash descriptor 2020-05-17 17:06:59 -07:00
fs_avb.cpp libfs_avb: verifying vbmeta digest early 2021-02-08 21:36:15 +08:00
fs_avb_util.cpp add API to get hash descriptor 2020-05-17 17:06:59 -07:00
run_tests.sh libfs_avb: adding two public APIs 2019-02-12 22:03:20 +08:00
sha.h fs_mgr: move AVB related source into libfs_avb 2018-11-29 22:21:33 +08:00
TEST_MAPPING Move the tests to postsubmit group 2019-02-04 10:31:32 -08:00
types.cpp libfs_avb: adding two public APIs 2019-02-12 22:03:20 +08:00
util.cpp Allowing the fs_mgr flag of avb_keys to be a dir 2019-12-09 14:29:52 +08:00
util.h Allowing the fs_mgr flag of avb_keys to be a dir 2019-12-09 14:29:52 +08:00