Home
last modified time | relevance | path

Searched hist:"6 b5d1120816429cfa56ff32383b07070a0335edd" (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/crypto/
H A Dsigned_hdr.c6b5d1120816429cfa56ff32383b07070a0335edd Tue May 21 09:13:57 UTC 2024 Jens Wiklander <jens.wiklander@linaro.org> core: fix possible overflow in shdr_alloc_and_copy()

Prior to this patch, if SHDR_GET_SIZE() overflows it will return 0 and
further down in the function lead to an out-of-bounds access. So fix
this with an explicit test before using shdr_size in
shdr_alloc_and_copy().

Fixes: 064663e8bd27 ("core: crypto: add struct shdr helper functions")
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>