openssl/providers/implementations/macs
James Muir a3d6fc8cf7 evp-cmac: do not seg-fault when getting mac-size before init
Add null check to cmac_size().  This avoids a seg-fault encountered
with cmac when EVP_MAC_CTX_get_mac_size() is called before init.

Extend mac testing in evp_test.c to check that the sizes returned by
EVP_MAC_CTX_get_mac_size() before and after init make sense (this also
ensures that we no longer seg-fault).

Fixes #22842

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22858)

(cherry picked from commit ff181969e2)
2023-12-01 11:55:31 +01:00
..
blake2_mac_impl.c mac: add a getter for the MAC block size. 2021-05-25 17:23:50 +10:00
blake2b_mac.c mac: add a getter for the MAC block size. 2021-05-25 17:23:50 +10:00
blake2s_mac.c mac: add a getter for the MAC block size. 2021-05-25 17:23:50 +10:00
build.info Drop libimplementations.a 2021-05-07 10:17:23 +02:00
cmac_prov.c evp-cmac: do not seg-fault when getting mac-size before init 2023-12-01 11:55:31 +01:00
gmac_prov.c Fix check of EVP_CIPHER_CTX_ctrl 2022-05-24 08:58:20 +02:00
hmac_prov.c Fix a use after free in error handling of hmac_dup 2022-06-10 12:44:37 +02:00
kmac_prov.c Copyright year updates 2023-10-24 14:40:29 +01:00
poly1305_prov.c Update copyright year 2022-05-03 13:36:42 +01:00
siphash_prov.c Update copyright year 2022-05-03 13:36:42 +01:00