diff options
author | Gregory Price <gourry@gourry.net> | 2024-09-13 19:19:51 -0400 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2024-10-15 20:27:29 +0200 |
commit | e6d654e9f5a97742cfe794b1c4bb5d3fb2d25e98 (patch) | |
tree | b87836391d58966792aa1a107604c0f8d6450ddf /scripts/bpf_doc.py | |
parent | c004703ed7ae6be30ee7dcb37801bda4c6a24c3b (diff) |
tpm: fix signed/unsigned bug when checking event logs
A prior bugfix that fixes a signed/unsigned error causes
another signed unsigned error.
A situation where log_tbl->size is invalid can cause the
size passed to memblock_reserve to become negative.
log_size from the main event log is an unsigned int, and
the code reduces to the following
u64 value = (int)unsigned_value;
This results in sign extension, and the value sent to
memblock_reserve becomes effectively negative.
Fixes: be59d57f9806 ("efi/tpm: Fix sanity check of unsigned tbl_size being less than zero")
Signed-off-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions