]> git.baikalelectronics.ru Git - uboot.git/commit
image-sig: Ensure that hashed-nodes is null-terminated
authorKonrad Beckmann <konrad.beckmann@gmail.com>
Wed, 7 Nov 2018 19:51:45 +0000 (14:51 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 16 Nov 2018 21:52:01 +0000 (16:52 -0500)
commit3405e3e18e69dd7052562734d9a1561309f55759
treec442e39843d945fb0df01ce2af6e431fc718a402
parent178e08cdd370cd944bc666be5e5ce74681800410
image-sig: Ensure that hashed-nodes is null-terminated

A specially crafted FIT image leads to memory corruption in the stack
when using the verified boot feature. The function fit_config_check_sig
has a logic error that makes it possible to write past the end of the
stack allocated array node_inc. This could potentially be used to bypass
the signature check when using verified boot.

This change ensures that the number of strings is correct when counted.

Signed-off-by: Konrad Beckmann <konrad.beckmann@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/image-sig.c