Fuzz introspector: fuzz_gcrypt_cipher
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
73 73 1 :

['mbedtls_gcm_update']

73 73 mbedtls_cipher_update call site: 00035 /src/ndpi/src/lib/third_party/src/gcrypt/cipher.c:245
66 66 1 :

['mbedtls_gcm_starts']

66 66 mbedtls_cipher_set_iv call site: 00022 /src/ndpi/src/lib/third_party/src/gcrypt/cipher.c:171
4 4 2 :

['mbedtls_internal_aes_decrypt', 'mbedtls_internal_aes_encrypt']

4 4 mbedtls_aes_crypt_ecb call site: 00000 /src/ndpi/src/lib/third_party/src/gcrypt/aes.c:506
0 0 None 66 66 mbedtls_cipher_set_iv call site: 00022 /src/ndpi/src/lib/third_party/src/gcrypt/cipher.c:158
0 0 None 0 2 mbedtls_aes_setkey_dec call site: 00000 /src/ndpi/src/lib/third_party/src/gcrypt/aes.c:302
0 0 None 0 2 mbedtls_aes_setkey_dec call site: 00000 /src/ndpi/src/lib/third_party/src/gcrypt/aes.c:308
0 0 None 0 0 mbedtls_cipher_get_block_size call site: 00035 /src/ndpi/src/lib/third_party/include/gcrypt/cipher.h:576
0 0 None 0 0 mbedtls_aes_setkey_enc call site: 00000 /src/ndpi/src/lib/third_party/src/gcrypt/aes.c:208
0 0 None 0 0 aes_gen_tables call site: 00000 /src/ndpi/src/lib/third_party/src/gcrypt/aes.c:71
0 0 None 0 0 mbedtls_aesni_has_support call site: 00000 /src/ndpi/src/lib/third_party/src/gcrypt/aesni.c:68
0 0 None 0 0 mbedtls_cipher_setkey call site: 00019 /src/ndpi/src/lib/third_party/src/gcrypt/cipher.c:136
0 0 None 0 0 mbedtls_cipher_set_iv call site: 00022 /src/ndpi/src/lib/third_party/src/gcrypt/cipher.c:151

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 posix_memalign [call site] 00001
1 posix_memalign [call site] 00002
1 mbedtls_cipher_list [function] [call site] 00003
1 mbedtls_cipher_info_from_type [function] [call site] 00004
1 mbedtls_cipher_init [function] [call site] 00005
1 mbedtls_cipher_init [function] [call site] 00006
1 mbedtls_cipher_info_from_string [function] [call site] 00007
2 strcmp [call site] 00008
1 mbedtls_cipher_info_get_mode(mbedtls_cipher_info_t const*) [function] [call site] 00009
1 mbedtls_cipher_info_get_type(mbedtls_cipher_info_t const*) [function] [call site] 00010
1 mbedtls_cipher_info_get_name(mbedtls_cipher_info_t const*) [function] [call site] 00011
1 mbedtls_cipher_info_has_variable_key_bitlen(mbedtls_cipher_info_t const*) [function] [call site] 00012
1 mbedtls_cipher_info_get_iv_size(mbedtls_cipher_info_t const*) [function] [call site] 00013
1 mbedtls_cipher_info_get_block_size(mbedtls_cipher_info_t const*) [function] [call site] 00014
1 mbedtls_cipher_get_cipher_mode(mbedtls_cipher_context_t const*) [function] [call site] 00015
1 mbedtls_cipher_info_get_key_bitlen(mbedtls_cipher_info_t const*) [function] [call site] 00016
1 posix_memalign [call site] 00017
1 posix_memalign [call site] 00018
1 mbedtls_cipher_setkey [function] [call site] 00019
1 mbedtls_cipher_setkey [function] [call site] 00020
1 mbedtls_cipher_crypt [function] [call site] 00021
2 mbedtls_cipher_set_iv [function] [call site] 00022
3 mbedtls_gcm_starts [function] [call site] 00023
4 __bswap_64 [function] [call site] 00024
4 gcm_mult [function] [call site] 00026
5 __bswap_64 [function] [call site] 00027
5 __bswap_64 [function] [call site] 00028
5 mbedtls_aesni_gcm_mult [function] [call site] 00029
5 __bswap_64 [function] [call site] 00030
5 __bswap_64 [function] [call site] 00031
4 mbedtls_cipher_update [function] [call site] 00034
5 mbedtls_cipher_get_block_size [function] [call site] 00035
5 mbedtls_gcm_update [function] [call site] 00036
2 mbedtls_cipher_reset [function] [call site] 00048
2 mbedtls_cipher_update [function] [call site] 00049
2 mbedtls_cipher_finish [function] [call site] 00050
1 mbedtls_cipher_set_iv [function] [call site] 00051
1 mbedtls_cipher_set_iv [function] [call site] 00052
1 mbedtls_cipher_reset [function] [call site] 00053
1 mbedtls_cipher_reset [function] [call site] 00054
1 mbedtls_cipher_update [function] [call site] 00055
1 mbedtls_cipher_finish [function] [call site] 00056
1 mbedtls_cipher_update [function] [call site] 00057
1 mbedtls_cipher_finish [function] [call site] 00058