diff options
author | Vadim Bendebury <vbendeb@google.com> | 2023-03-07 13:28:12 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-07 22:46:39 +0000 |
commit | 8b6ac106ba968bb3321e0fae98be00b29156232a (patch) | |
tree | 0b83546e586fc745c4d8a3b3aec4e8af19470793 /extra/usb_updater/gsctool.c | |
parent | 84267aafea80423ed40024006e0a05a7acc03fc9 (diff) | |
download | chrome-ec-8b6ac106ba968bb3321e0fae98be00b29156232a.tar.gz |
upgrade_fw: do not accept headers smaller than a flash page
Headers smaller than flash page are not valid, let's not accept them
durinf firmware updates.
BUG=b:272058500
TEST=using dd corrupted an existing image header size field to be set
to 0x400, and tried to download the image using gsctool and
observed the expected error message on the Cr50 console:
fw_upgrade_command_handler:505 image at 4000 too small
and in the host terminal:
Error: status 0xb
Change-Id: I27b0bbd6a1204b20bd2d0ac1ce88082ed911d339
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4316741
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'extra/usb_updater/gsctool.c')
0 files changed, 0 insertions, 0 deletions