git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8287b0
)
efi_loader: fix possible buffer overflow
author
Masahisa Kojima
<masahisa.kojima@linaro.org>
Wed, 14 Apr 2021 02:55:49 +0000
(11:55 +0900)
committer
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sat, 17 Apr 2021 18:01:32 +0000
(20:01 +0200)
Variable "final" will have SHA512 digest, but currently
the array size is not sufficient. Let's fix it.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_tcg2.c
patch
|
blob
|
history
diff --git
a/lib/efi_loader/efi_tcg2.c
b/lib/efi_loader/efi_tcg2.c
index
ed86a22
..
d5eca68
100644
(file)
--- a/
lib/efi_loader/efi_tcg2.c
+++ b/
lib/efi_loader/efi_tcg2.c
@@
-515,7
+515,7
@@
static efi_status_t tcg2_create_digest(const u8 *input, u32 length,
sha1_context ctx;
sha256_context ctx_256;
sha512_context ctx_512;
- u8 final[TPM2_
ALG_SHA512
];
+ u8 final[TPM2_
SHA512_DIGEST_SIZE
];
efi_status_t ret;
u32 active;
int i;