Searched hist:"2373 e1b994ffd66a0cb1872a17a0d3d825eeda4e" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/lib/libtomcrypt/ |
| H A D | ccm.c | 2373e1b994ffd66a0cb1872a17a0d3d825eeda4e Thu Sep 01 06:46:35 UTC 2022 Jens Wiklander <jens.wiklander@linaro.org> core: add overflow checks in crypto_aes_ccm_init()
aad_len and payload_len are of the type size_t which has a greater range than int which is used for the corresponding arguments when passed to ccm_init(). So to guard against wrapped or truncated values check that the variables can be in a int first before calling ccm_init().
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|