ANDROID: dm: android-verity: Verify header before fetching table
authorBadhri Jagan Sridharan <Badhri@google.com>
Thu, 7 Jul 2016 00:16:19 +0000 (17:16 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 18 Dec 2017 15:41:22 +0000 (21:11 +0530)
commit1a83a5833d44c25e656ceecd2b54c5e7217a88a4
treeb0f2b4c2693dafbf2b0108566c1bb74bb3018454
parent2cced7fcad6f75c1b852c325fb9a0424b3571eb7
ANDROID: dm: android-verity: Verify header before fetching table

Move header validation logic before reading the verity_table as
an invalid header implies the table is invalid as well.

(Cherry-picked from:
https://partner-android-review.git.corp.google.com/#/c/625203)

BUG: 29940612
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: Ib34d25c0854202f3e70df0a6d0ef1d96f0250c8e
drivers/md/dm-android-verity.c