summaryrefslogtreecommitdiff
path: root/host/lib/signature_digest.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2016-11-03 10:12:16 -0700
committerRandall Spangler <rspangler@chromium.org>2016-11-06 02:32:07 +0000
commita03a164a76a97f3f6a60ddf18c466b38f8a77400 (patch)
treeeaa48fbcb2a142043e82edafbeebb8f0497133c4 /host/lib/signature_digest.c
parent754ebdb8c39e693a1979e1f1089c3376390d9aa7 (diff)
downloadvboot-a03a164a76a97f3f6a60ddf18c466b38f8a77400.tar.gz
vboot2: Allocate more buffer for kernel verification
The low-level verification functions' *_WORKBUF_BYTES constants assume the work buffer is already aligned to VB2_WORKBUF_ALIGN. But malloc() may return a less-aligned pointer, in which case vb2_workbuf_init() aligns it (and loses a bit of space in the process). This can cause an error "vb2_rsa_verify_digest: ERROR - vboot2 work buffer too small!". High-level functions should be using the *_WORKBUF_RECOMMENDED_SIZE constants for allocation, which have enough padding to compensate for alignment problems. BUG=chrome-os-partner:59306 BRANCH=none TEST=make runtests; boot a recovery image on reef Change-Id: I1055fa56072b3fe1cd07c5c090293635c42c77a2 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/406526 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'host/lib/signature_digest.c')
0 files changed, 0 insertions, 0 deletions