opencryptoki-3.24.0-2.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-121): [#def1]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/misc_tests/tok2tok_transport.c:30: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c: scope_hint: In function ‘create_DESKey’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c:259:5: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/misc_tests/tok2tok_transport.c:27: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c:259:5: note: write of 16 bytes to beyond the end of ‘value’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c:259:5: note: valid subscripts for ‘value’ are ‘[0]’ to ‘[7]’
#  257|   
#  258|       memset(value, 0, sizeof(value));
#  259|->     memcpy(value, key, klen);
#  260|       rc = funcs->C_CreateObject(session, keyTemplate, 5, h_key);
#  261|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-121): [#def2]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c: scope_hint: In function ‘create_DES2Key’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c:291:5: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c:291:5: note: write of 8 bytes to beyond the end of ‘value’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/common/common.c:291:5: note: valid subscripts for ‘value’ are ‘[0]’ to ‘[15]’
#  289|   
#  290|       memset(value, 0, sizeof(value));
#  291|->     memcpy(value, key, klen);
#  292|       rc = funcs->C_CreateObject(session, keyTemplate, 5, h_key);
#  293|       if (rc != CKR_OK) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def3]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/crypto/des_func.c: scope_hint: In function ‘do_DecryptDES’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/crypto/des_func.c:428:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘h_key’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/crypto/des_func.c:17: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/crypto/des_func.c:19: included_from: Included from here.
#  426|   
#  427|       /** clean up **/
#  428|->     rc = funcs->C_DestroyObject(session, h_key);
#  429|       if (rc != CKR_OK) {
#  430|           testcase_error("C_DestroyObject rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/crypto/kyber_func.c: scope_hint: In function ‘run_TransferKyberKeyPair’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/crypto/kyber_func.c:1012:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘wrapped_keylen’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/crypto/kyber_func.c:19: included_from: Included from here.
# 1010|   
# 1011|           /* Unwrap Kyber private key */
# 1012|->         rc = unwrapKey(session, &wrap_mech, wrapped_key, wrapped_keylen,
# 1013|                          secret_key, &unwrapped_key);
# 1014|           testcase_new_assertion();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/login/init_tok.c: scope_hint: In function ‘main’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/login/init_tok.c:78:28: warning[-Wanalyzer-malloc-leak]: leak of ‘pass’
#   76|       SLOT_ID = 0;
#   77|   
#   78|->     for (i = 1; i < argc; i++) {
#   79|           if (strcmp(argv[i], "-slot") == 0) {
#   80|               if (i + 1 >= argc) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def6]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/misc_tests/obj_lock.c: scope_hint: In function ‘main’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/misc_tests/obj_lock.c:397:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘id[i]’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/misc_tests/obj_lock.c:28: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/misc_tests/obj_lock.c:29: included_from: Included from here.
#  395|       // wait for all threads to end
#  396|       for (i = 0; i < num_usage_threads + num_alter_threads; i++) {
#  397|->         pthread_join(id[i], NULL);
#  398|       }
#  399|       testcase_notice("All threads have ended.");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def7]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/pkcs11/sess_opstate.c: scope_hint: In function ‘sess_opstate_funcs’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/testcases/pkcs11/sess_opstate.c:210:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘opstatelen’
#  208|   
#  209|       // restore op state on session 2
#  210|->     rc = funcs->C_SetOperationState(s2, opstate, opstatelen, 0, 0);
#  211|       if (rc != CKR_OK) {
#  212|           testcase_error("C_SetOperationState rc=%s", p11_get_ckr(rc));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/api/hashmap.c: scope_hint: In function 'grow'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/api/hashmap.c:160:26: warning[-Wanalyzer-null-dereference]: dereference of NULL '*h.buckets'
#  158|           return 1;
#  159|       for (i = 0; i < h->capa; ++i) {
#  160|->         if (h->buckets[i].key) {
#  161|               walk = &h->buckets[i];
#  162|               while (walk) {

Error: GCC_ANALYZER_WARNING (CWE-121): [#def9]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/cca_stdll/cca_mkchange.c: scope_hint: In function 'cca_select_single_apqn'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/cca_stdll/cca_mkchange.c:245:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/cca_stdll/cca_mkchange.c:24: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/trace.h:147:68: note: in definition of macro 'TRACE_DEVEL'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/cca_stdll/cca_mkchange.c:245:9: note: write of 8 bytes to beyond the end of 'rule_array'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/cca_stdll/cca_mkchange.c:245:9: note: valid subscripts for 'rule_array' are '[0]' to '[255]'
#  243|   
#  244|       if (cca_private->dom_any) {
#  245|->         sprintf((char *)(rule_array + CCA_KEYWORD_SIZE), "DOMN%04u", ssd.domain);
#  246|           rule_array_count = 2;
#  247|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def10]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function 'ber_encode_DHPublicKey'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:3451:5: warning[-Wanalyzer-null-argument]: use of NULL 'buf2' where non-null expected
<built-in>: note: argument 2 of '__builtin_memcpy' must be non-null
# 3449|           return rc;
# 3450|       }
# 3451|->     memcpy(buf + offset, buf2, len);
# 3452|       offset += len;
# 3453|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function ‘ber_encode_DHPublicKey’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:3451:5: warning[-Wanalyzer-null-argument]: use of NULL ‘buf2’ where non-null expected
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 3449|           return rc;
# 3450|       }
# 3451|->     memcpy(buf + offset, buf2, len);
# 3452|       offset += len;
# 3453|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def12]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function ‘ber_encode_IBM_DilithiumPublicKey’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:3703:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 3701|           goto error;
# 3702|       }
# 3703|->     memcpy(buf + offset, buf2, len);
# 3704|       offset += len;
# 3705|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def13]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:3755:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'algid_len'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:26: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:615:9: note: in expansion of macro 'TRACE_ERROR'
# 3753|       }
# 3754|   
# 3755|->     total_len = algid_len;
# 3756|       memcpy(buf3, algid, algid_len);
# 3757|       free(algid);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def14]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:3755:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘algid_len’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:26: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:615:9: note: in expansion of macro ‘TRACE_ERROR’
# 3753|       }
# 3754|   
# 3755|->     total_len = algid_len;
# 3756|       memcpy(buf3, algid, algid_len);
# 3757|       free(algid);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def15]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:3771:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'len4'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro 'TRACE_ERROR'
# 3769|           goto error;
# 3770|       }
# 3771|->     memcpy(buf3 + total_len, buf4, len4);
# 3772|       total_len += len4;
# 3773|       free(buf4);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def16]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:3771:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘len4’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro ‘TRACE_ERROR’
# 3769|           goto error;
# 3770|       }
# 3771|->     memcpy(buf3 + total_len, buf4, len4);
# 3772|       total_len += len4;
# 3773|       free(buf4);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def17]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function 'ber_encode_IBM_DilithiumPrivateKey'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4026:5: warning[-Wanalyzer-null-argument]: use of NULL 'buf2' where non-null expected
<built-in>: note: argument 2 of '__builtin_memcpy' must be non-null
# 4024|           goto error;
# 4025|       }
# 4026|->     memcpy(buf + offset, buf2, len);
# 4027|       offset += len;
# 4028|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def18]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function ‘ber_encode_IBM_DilithiumPrivateKey’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4026:5: warning[-Wanalyzer-null-argument]: use of NULL ‘buf2’ where non-null expected
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 4024|           goto error;
# 4025|       }
# 4026|->     memcpy(buf + offset, buf2, len);
# 4027|       offset += len;
# 4028|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def19]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4038:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro ‘TRACE_ERROR’
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 4036|           goto error;
# 4037|       }
# 4038|->     memcpy(buf + offset, buf2, len);
# 4039|       offset += len;
# 4040|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def20]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4050:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro ‘TRACE_ERROR’
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 4048|           goto error;
# 4049|       }
# 4050|->     memcpy(buf + offset, buf2, len);
# 4051|       offset += len;
# 4052|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def21]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4062:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro ‘TRACE_ERROR’
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 4060|           goto error;
# 4061|       }
# 4062|->     memcpy(buf + offset, buf2, len);
# 4063|       offset += len;
# 4064|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def22]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4074:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro ‘TRACE_ERROR’
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 4072|           goto error;
# 4073|       }
# 4074|->     memcpy(buf + offset, buf2, len);
# 4075|       offset += len;
# 4076|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def23]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function 'ber_encode_IBM_KyberPublicKey'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4515:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'algid_len'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:615:9: note: in expansion of macro 'TRACE_ERROR'
# 4513|       }
# 4514|   
# 4515|->     total_len = algid_len;
# 4516|       memcpy(buf3, algid, algid_len);
# 4517|       free(algid);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def24]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function ‘ber_encode_IBM_KyberPublicKey’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4515:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘algid_len’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:615:9: note: in expansion of macro ‘TRACE_ERROR’
# 4513|       }
# 4514|   
# 4515|->     total_len = algid_len;
# 4516|       memcpy(buf3, algid, algid_len);
# 4517|       free(algid);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def25]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4530:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'len4'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro 'TRACE_ERROR'
# 4528|           goto error;
# 4529|       }
# 4530|->     memcpy(buf3 + total_len, buf4, len4);
# 4531|       total_len += len4;
# 4532|       free(buf4);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4530:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘len4’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro ‘TRACE_ERROR’
# 4528|           goto error;
# 4529|       }
# 4530|->     memcpy(buf3 + total_len, buf4, len4);
# 4531|       total_len += len4;
# 4532|       free(buf4);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def27]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function 'ber_encode_IBM_KyberPrivateKey'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4739:5: warning[-Wanalyzer-null-argument]: use of NULL 'buf2' where non-null expected
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro 'TRACE_ERROR'
<built-in>: note: argument 2 of '__builtin_memcpy' must be non-null
# 4737|           goto error;
# 4738|       }
# 4739|->     memcpy(buf + offset, buf2, len);
# 4740|       offset += len;
# 4741|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def28]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c: scope_hint: In function ‘ber_encode_IBM_KyberPrivateKey’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:4739:5: warning[-Wanalyzer-null-argument]: use of NULL ‘buf2’ where non-null expected
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/asn1.c:452:9: note: in expansion of macro ‘TRACE_ERROR’
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
# 4737|           goto error;
# 4738|       }
# 4739|->     memcpy(buf + offset, buf2, len);
# 4740|       offset += len;
# 4741|       free(buf2);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c: scope_hint: In function 'publ_key_set_default_attributes.part.0'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:664:8: warning[-Wanalyzer-malloc-leak]: leak of 'wraptmpl_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:83: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:604:9: note: in expansion of macro 'TRACE_DEVEL'
#  662|       if (pki_attr)
#  663|           free(pki_attr);
#  664|->     if (wraptmpl_attr)
#  665|           free(wraptmpl_attr);
#  666|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1056:8: warning[-Wanalyzer-malloc-leak]: leak of 'always_auth_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:948:9: note: in expansion of macro 'TRACE_DEVEL'
# 1054|       if (unwraptmpl_attr)
# 1055|           free(unwraptmpl_attr);
# 1056|->     if (derivetmpl_attr)
# 1057|           free(derivetmpl_attr);
# 1058|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1056:8: warning[-Wanalyzer-malloc-leak]: leak of 'always_sens_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:948:9: note: in expansion of macro 'TRACE_DEVEL'
# 1054|       if (unwraptmpl_attr)
# 1055|           free(unwraptmpl_attr);
# 1056|->     if (derivetmpl_attr)
# 1057|           free(derivetmpl_attr);
# 1058|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1056:8: warning[-Wanalyzer-malloc-leak]: leak of 'derivetmpl_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:948:9: note: in expansion of macro 'TRACE_DEVEL'
# 1054|       if (unwraptmpl_attr)
# 1055|           free(unwraptmpl_attr);
# 1056|->     if (derivetmpl_attr)
# 1057|           free(derivetmpl_attr);
# 1058|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c: scope_hint: In function 'priv_key_set_default_attributes.part.0'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1056:8: warning[-Wanalyzer-malloc-leak]: leak of 'never_extr_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:948:9: note: in expansion of macro 'TRACE_DEVEL'
# 1054|       if (unwraptmpl_attr)
# 1055|           free(unwraptmpl_attr);
# 1056|->     if (derivetmpl_attr)
# 1057|           free(derivetmpl_attr);
# 1058|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1056:8: warning[-Wanalyzer-malloc-leak]: leak of 'pki_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:948:9: note: in expansion of macro 'TRACE_DEVEL'
# 1054|       if (unwraptmpl_attr)
# 1055|           free(unwraptmpl_attr);
# 1056|->     if (derivetmpl_attr)
# 1057|           free(derivetmpl_attr);
# 1058|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1056:8: warning[-Wanalyzer-malloc-leak]: leak of 'unwraptmpl_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:948:9: note: in expansion of macro 'TRACE_DEVEL'
# 1054|       if (unwraptmpl_attr)
# 1055|           free(unwraptmpl_attr);
# 1056|->     if (derivetmpl_attr)
# 1057|           free(derivetmpl_attr);
# 1058|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1056:8: warning[-Wanalyzer-malloc-leak]: leak of 'wrap_trusted_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:948:9: note: in expansion of macro 'TRACE_DEVEL'
# 1054|       if (unwraptmpl_attr)
# 1055|           free(unwraptmpl_attr);
# 1056|->     if (derivetmpl_attr)
# 1057|           free(derivetmpl_attr);
# 1058|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'always_sens_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'chkval_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'derivetmpl_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c: scope_hint: In function 'secret_key_set_default_attributes.part.0'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'extractable_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'never_extr_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'trusted_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'unwraptmpl_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'wrap_trusted_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1696:8: warning[-Wanalyzer-malloc-leak]: leak of 'wraptmpl_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:1572:9: note: in expansion of macro 'TRACE_DEVEL'
# 1694|       if (unwraptmpl_attr)
# 1695|           free(unwraptmpl_attr);
# 1696|->     if (derivetmpl_attr)
# 1697|           free(derivetmpl_attr);
# 1698|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c: scope_hint: In function 'ecdsa_publ_set_default_attributes'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:4123:8: warning[-Wanalyzer-malloc-leak]: leak of 'ec_point_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:4105:9: note: in expansion of macro 'TRACE_ERROR'
# 4121|       if (params_attr)
# 4122|           free(params_attr);
# 4123|->     if (ec_point_attr)
# 4124|           free(ec_point_attr);
# 4125|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c: scope_hint: In function 'dh_publ_set_default_attributes'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:4642:9: warning[-Wanalyzer-malloc-leak]: leak of 'base_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:4615:9: note: in expansion of macro 'TRACE_ERROR'
# 4640|           free(base_attr);
# 4641|       if (value_attr)
# 4642|->         free(value_attr);
# 4643|   
# 4644|       return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c: scope_hint: In function 'ibm_dilithium_publ_set_default_attributes'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:5171:9: warning[-Wanalyzer-malloc-leak]: leak of 't1_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:5144:9: note: in expansion of macro 'TRACE_ERROR'
# 5169|           free(t1_attr);
# 5170|       if (value_attr)
# 5171|->         free(value_attr);
# 5172|   
# 5173|      return rc;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c: scope_hint: In function 'ibm_kyber_publ_set_default_attributes'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:5387:8: warning[-Wanalyzer-malloc-leak]: leak of 'value_attr'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/key.c:5369:9: note: in expansion of macro 'TRACE_ERROR'
# 5385|       if (pk_attr)
# 5386|           free(pk_attr);
# 5387|->     if (value_attr)
# 5388|           free(value_attr);
# 5389|   

Error: GCC_ANALYZER_WARNING (CWE-789): [#def50]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'load_private_token_objects_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:920:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'load_private_token_objects_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'load_private_token_objects_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:920:27: note: heap-based allocation
#  918|   
#  919|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
#  920|->         buf = (CK_BYTE *) malloc(size);
#  921|           if (!buf) {
#  922|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def51]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘load_private_token_objects_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:920:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘load_private_token_objects_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘load_private_token_objects_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:920:27: note: heap-based allocation
#  918|   
#  919|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
#  920|->         buf = (CK_BYTE *) malloc(size);
#  921|           if (!buf) {
#  922|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def52]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'restore_private_token_object_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1491:25: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1491:25: note: heap-based allocation
# 1489|       clear_len = len;
# 1490|   
# 1491|->     clear = (CK_BYTE *) malloc(len);
# 1492|       if (!clear) {
# 1493|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-789): [#def53]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘restore_private_token_object_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1491:25: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1491:25: note: heap-based allocation
# 1489|       clear_len = len;
# 1490|   
# 1491|->     clear = (CK_BYTE *) malloc(len);
# 1492|       if (!clear) {
# 1493|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-789): [#def54]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'reload_token_object_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1625:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1625:23: note: heap-based allocation
# 1623|       size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1624|   
# 1625|->     buf = (CK_BYTE *) malloc(size);
# 1626|       if (!buf) {
# 1627|           rc = CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-789): [#def55]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘reload_token_object_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1625:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1625:23: note: heap-based allocation
# 1623|       size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1624|   
# 1625|->     buf = (CK_BYTE *) malloc(size);
# 1626|       if (!buf) {
# 1627|           rc = CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-789): [#def56]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'load_public_token_objects_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1763:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'load_public_token_objects_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function 'load_public_token_objects_old'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1763:27: note: heap-based allocation
# 1761|   
# 1762|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1763|->         buf = (CK_BYTE *) malloc(size);
# 1764|           if (!buf) {
# 1765|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def57]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘load_public_token_objects_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1763:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘load_public_token_objects_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c: scope_hint: In function ‘load_public_token_objects_old’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/loadsave.c:1763:27: note: heap-based allocation
# 1761|   
# 1762|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1763|->         buf = (CK_BYTE *) malloc(size);
# 1764|           if (!buf) {
# 1765|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-122): [#def58]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_rsa.c: scope_hint: In function ‘mgf1’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_rsa.c:2490:9: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
# 2488|           /* concatenate seed and octet string */
# 2489|           memset(seed_buffer, 0, seedlen + 4);
# 2490|->         memcpy(seed_buffer, seed, seedlen);
# 2491|           memcpy(seed_buffer + seedlen, counter, 4);
# 2492|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c: scope_hint: In function 'ssl3_kmd_process_mac_keys'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:1757:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:27: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:1595:13: note: in expansion of macro 'TRACE_ERROR'
# 1755|           }
# 1756|   
# 1757|->         free(new_attrs);
# 1758|       }
# 1759|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c: scope_hint: In function ‘ssl3_kmd_process_mac_keys’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:1757:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:27: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:1595:13: note: in expansion of macro ‘TRACE_ERROR’
# 1755|           }
# 1756|   
# 1757|->         free(new_attrs);
# 1758|       }
# 1759|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c: scope_hint: In function 'ssl3_kmd_process_write_keys'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:2022:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:1812:13: note: in expansion of macro 'TRACE_ERROR'
# 2020|           }
# 2021|   
# 2022|->         free(new_attrs);
# 2023|       }
# 2024|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c: scope_hint: In function ‘ssl3_kmd_process_write_keys’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:2022:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/common/mech_ssl3.c:1812:13: note: in expansion of macro ‘TRACE_ERROR’
# 2020|           }
# 2021|   
# 2022|->         free(new_attrs);
# 2023|       }
# 2024|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function 'config_create_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1756:12: warning[-Wanalyzer-malloc-leak]: leak of 'configalloc(64, yyscanner)'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1742:21: note: in expansion of macro 'yy_create_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1746:24: note: in expansion of macro 'yyalloc'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2414:7: note: in expansion of macro 'yyalloc'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1746:24: note: in expansion of macro 'yyalloc'
# 1754|   	 * we need to put in 2 end-of-buffer characters.
# 1755|   	 */
# 1756|-> 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1757|   	if ( ! b->yy_ch_buf )
# 1758|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function ‘config_create_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1756:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1742:21: note: in expansion of macro ‘yy_create_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1746:24: note: in expansion of macro ‘yyalloc’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function ‘config_create_buffer’
# 1754|   	 * we need to put in 2 end-of-buffer characters.
# 1755|   	 */
# 1756|-> 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1757|   	if ( ! b->yy_ch_buf )
# 1758|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def65]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function 'config_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1798:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1677:10: note: in expansion of macro 'yyrestart'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1682:16: note: in expansion of macro 'yyensure_buffer_stack'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1900:13: note: in expansion of macro 'yyensure_buffer_stack'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1682:16: note: in expansion of macro 'yyensure_buffer_stack'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1684:27: note: in expansion of macro 'yy_create_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1742:21: note: in expansion of macro 'yy_create_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1761:2: note: in expansion of macro 'yy_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1790:17: note: in expansion of macro 'yy_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro 'yy_flush_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1819:10: note: in expansion of macro 'yy_flush_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro 'yy_flush_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1761:2: note: in expansion of macro 'yy_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1684:27: note: in expansion of macro 'yy_create_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1687:2: note: in expansion of macro 'yy_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1687:2: note: in expansion of macro 'yy_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1687:2: note: in expansion of macro 'yy_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1790:17: note: in expansion of macro 'yy_init_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro 'yy_flush_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1819:10: note: in expansion of macro 'yy_flush_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro 'yy_flush_buffer'
# 1796|   
# 1797|   	yy_flush_buffer( b , yyscanner);
# 1798|-> 
# 1799|   	b->yy_input_file = file;
# 1800|   	b->yy_fill_buffer = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def66]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function ‘config_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1798:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1677:10: note: in expansion of macro ‘yyrestart’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1682:16: note: in expansion of macro ‘yyensure_buffer_stack’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1900:13: note: in expansion of macro ‘yyensure_buffer_stack’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1682:16: note: in expansion of macro ‘yyensure_buffer_stack’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1684:27: note: in expansion of macro ‘yy_create_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1742:21: note: in expansion of macro ‘yy_create_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1761:2: note: in expansion of macro ‘yy_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1790:17: note: in expansion of macro ‘yy_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro ‘yy_flush_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1819:10: note: in expansion of macro ‘yy_flush_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro ‘yy_flush_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1761:2: note: in expansion of macro ‘yy_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1684:27: note: in expansion of macro ‘yy_create_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1687:2: note: in expansion of macro ‘yy_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1687:2: note: in expansion of macro ‘yy_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1687:2: note: in expansion of macro ‘yy_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1790:17: note: in expansion of macro ‘yy_init_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro ‘yy_flush_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1819:10: note: in expansion of macro ‘yy_flush_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1796:2: note: in expansion of macro ‘yy_flush_buffer’
# 1796|   
# 1797|   	yy_flush_buffer( b , yyscanner);
# 1798|-> 
# 1799|   	b->yy_input_file = file;
# 1800|   	b->yy_fill_buffer = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function 'config_scan_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2016:25: warning[-Wanalyzer-malloc-leak]: leak of 'configalloc(n,  yyscanner)'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2000:17: note: in expansion of macro 'yy_scan_bytes'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2009:24: note: in expansion of macro 'yyalloc'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2414:7: note: in expansion of macro 'yyalloc'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2009:24: note: in expansion of macro 'yyalloc'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2018:6: note: in expansion of macro 'yy_scan_buffer'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1950:17: note: in expansion of macro 'yy_scan_buffer'
# 2014|   	for ( i = 0; i < _yybytes_len; ++i )
# 2015|   		buf[i] = yybytes[i];
# 2016|-> 
# 2017|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2018|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function ‘config_scan_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2016:25: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2000:17: note: in expansion of macro ‘yy_scan_bytes’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2009:24: note: in expansion of macro ‘yyalloc’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c: scope_hint: In function ‘config_scan_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:2018:6: note: in expansion of macro ‘yy_scan_buffer’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfglex.c:1950:17: note: in expansion of macro ‘yy_scan_buffer’
# 2014|   	for ( i = 0; i < _yybytes_len; ++i )
# 2015|   		buf[i] = yybytes[i];
# 2016|-> 
# 2017|   	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2018|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def69]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c: scope_hint: In function 'configparse'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:429:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:414:9: note: in expansion of macro 'YYCOPY'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1688:9: note: in expansion of macro 'YYSTACK_RELOCATE'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1537:1: note: in expansion of macro 'yyparse'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:414:9: note: in expansion of macro 'YYCOPY'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1688:9: note: in expansion of macro 'YYSTACK_RELOCATE'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:414:9: note: in expansion of macro 'YYCOPY'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1688:9: note: in expansion of macro 'YYSTACK_RELOCATE'
#  427|   #  if defined __GNUC__ && 1 < __GNUC__
#  428|   #   define YYCOPY(Dst, Src, Count) \
#  429|->       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  430|   #  else
#  431|   #   define YYCOPY(Dst, Src, Count)              \

Error: GCC_ANALYZER_WARNING (CWE-457): [#def70]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c: scope_hint: In function ‘configparse’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:429:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:414:9: note: in expansion of macro ‘YYCOPY’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1688:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1537:1: note: in expansion of macro ‘yyparse’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:414:9: note: in expansion of macro ‘YYCOPY’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1688:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:414:9: note: in expansion of macro ‘YYCOPY’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/cfgparse.c:1688:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
#  427|   #  if defined __GNUC__ && 1 < __GNUC__
#  428|   #   define YYCOPY(Dst, Src, Count) \
#  429|->       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  430|   #  else
#  431|   #   define YYCOPY(Dst, Src, Count)              \

Error: GCC_ANALYZER_WARNING (CWE-415): [#def71]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocidxstructdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:556:17: warning[-Wanalyzer-double-free]: double-'free' of 'cmt'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function 'confignode_allocidxstructdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocidxstructdumpable'
#  554|               confignode_freeeoc(eoc);
#  555|               if (cmt != NULL)
#  556|->                 free(cmt);
#  557|               free(dkey);
#  558|           }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def72]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocidxstructdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:556:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘cmt’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function ‘confignode_allocidxstructdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocidxstructdumpable’
#  554|               confignode_freeeoc(eoc);
#  555|               if (cmt != NULL)
#  556|->                 free(cmt);
#  557|               free(dkey);
#  558|           }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def73]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocstructdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:596:17: warning[-Wanalyzer-double-free]: double-'free' of 'cmt'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function 'confignode_allocstructdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocstructdumpable'
#  594|               confignode_freeeoc(eoc);
#  595|               if (cmt != NULL)
#  596|->                 free(cmt);
#  597|               free(dkey);
#  598|           }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def74]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocstructdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:596:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘cmt’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function ‘confignode_allocstructdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocstructdumpable’
#  594|               confignode_freeeoc(eoc);
#  595|               if (cmt != NULL)
#  596|->                 free(cmt);
#  597|               free(dkey);
#  598|           }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def75]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocbarelistdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:637:17: warning[-Wanalyzer-double-free]: double-'free' of 'cmt'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function 'confignode_allocbarelistdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocbarelistdumpable'
#  635|               confignode_freeeoc(eoc);
#  636|               if (cmt != NULL)
#  637|->                 free(cmt);
#  638|               free(dkey);
#  639|           }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def76]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocbarelistdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:637:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘cmt’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function ‘confignode_allocbarelistdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocbarelistdumpable’
#  635|               confignode_freeeoc(eoc);
#  636|               if (cmt != NULL)
#  637|->                 free(cmt);
#  638|               free(dkey);
#  639|           }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def77]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocnumpairlistdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:787:17: warning[-Wanalyzer-double-free]: double-'free' of 'cmt'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function 'confignode_allocnumpairlistdumpable'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocnumpairlistdumpable'
#  785|               confignode_freeeoc(eoc);
#  786|               if (cmt != NULL)
#  787|->                 free(cmt);
#  788|               free(dkey);
#  789|               free(dend);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def78]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocnumpairlistdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c:787:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘cmt’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h: scope_hint: In function ‘confignode_allocnumpairlistdumpable’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocnumpairlistdumpable’
#  785|               confignode_freeeoc(eoc);
#  786|               if (cmt != NULL)
#  787|->                 free(cmt);
#  788|               free(dkey);
#  789|               free(dend);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h:727:23: warning[-Wanalyzer-malloc-leak]: leak of 'confignode_alloceoc(cmt,  line)'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function 'confignode_allocnumpairdumpable'
#  725|               tmp = n2->prev;
#  726|               n2->prev = n1->prev;
#  727|->             tmp->next = n1;
#  728|               n1->prev = tmp;
#  729|               return n1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.h:727:23: warning[-Wanalyzer-malloc-leak]: leak of ‘confignode_alloceoc(cmt,  line)’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/config/configuration.c: scope_hint: In function ‘confignode_allocnumpairdumpable’
#  725|               tmp = n2->prev;
#  726|               n2->prev = n1->prev;
#  727|->             tmp->next = n1;
#  728|               n1->prev = tmp;
#  729|               return n1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c: scope_hint: In function 'hsm_mk_change_apqns_unflatten'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:214:26: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:27: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:624:5: note: in expansion of macro 'TRACE_DEVEL'
/usr/include/sys/types.h:176: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:11: included_from: Included from here.
#  212|           apqn = (struct apqn *)buff;
#  213|   
#  214|->         (*apqns)[i].card = be16toh(apqn->card);
#  215|           (*apqns)[i].domain = be16toh(apqn->domain);
#  216|           buff += sizeof(struct apqn);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c: scope_hint: In function 'hsm_mk_change_mkvps_clean'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:255:4: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:624:5: note: in expansion of macro 'TRACE_DEVEL'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:354:13: note: in expansion of macro 'TRACE_ERROR'
#  253|      }
#  254|   
#  255|->    memset(mkvps, 0, num_mkvps * sizeof(struct hsm_mkvp));
#  256|   }
#  257|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c: scope_hint: In function 'hsm_mk_change_mkvps_unflatten'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:340:26: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:624:5: note: in expansion of macro 'TRACE_DEVEL'
#  338|   
#  339|           hdr = (struct hsm_mkvp_hdr *)buff;
#  340|->         (*mkvps)[i].type = be32toh(hdr->type);
#  341|           (*mkvps)[i].mkvp_len = be32toh(hdr->mkvp_len);
#  342|           buff += sizeof(struct hsm_mkvp_hdr);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def84]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c: scope_hint: In function 'hsm_mk_change_slots_unflatten'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:556:21: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/hsm_mk_change/hsm_mk_change.c:624:5: note: in expansion of macro 'TRACE_DEVEL'
#  554|       for (i = 0; i < *num_slots; i++) {
#  555|           slot = (CK_SLOT_ID_32 *)buff;
#  556|->         (*slots)[i] = be32toh(*slot);
#  557|           buff += sizeof(CK_SLOT_ID_32);
#  558|           *bytes_read += sizeof(CK_SLOT_ID_32);

Error: CPPCHECK_WARNING (CWE-476): [#def85]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf.c:143: error[ctunullpointer]: Null pointer dereference: orig
#  141|   static void strpad(char *dest, const char *orig, size_t len, int padding_char)
#  142|   {
#  143|->     size_t str_len = strlen(orig);
#  144|   
#  145|       UNUSED(padding_char);

Error: CPPCHECK_WARNING (CWE-476): [#def86]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf.c:143: warning[nullPointer]: Possible null pointer dereference: orig
#  141|   static void strpad(char *dest, const char *orig, size_t len, int padding_char)
#  142|   {
#  143|->     size_t str_len = strlen(orig);
#  144|   
#  145|       UNUSED(padding_char);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def87]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf.c: scope_hint: In function 'icsf_ber_decode_get_attribute_list'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf.c:2214:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 2 of '__builtin_memcpy' must be non-null
# 2212|               } else if (attrs[i].ulValueLen >= attrbval.bv_len) {
# 2213|                   if ((tag & LBER_BIG_TAG_MASK) == 0) {
# 2214|->                     memcpy(attrs[i].pValue, attrbval.bv_val, attrbval.bv_len);
# 2215|                   } else {
# 2216|                       *((CK_ULONG *) attrs[i].pValue) = intval;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def88]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c: scope_hint: In function 'token_specific_init_token_data'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:679:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '&config.name'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:43: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:670:5: note: in expansion of macro 'TRACE_DEVEL'
#  677|   
#  678|       /* Copy general info */
#  679|->     memcpy(tokdata->nv_token_data->token_info.label, config.name,
#  680|              strlen(config.name));
#  681|       memcpy(tokdata->nv_token_data->token_info.manufacturerID, config.manuf,

Error: GCC_ANALYZER_WARNING (CWE-121): [#def89]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c: scope_hint: In function 'login'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: note: valid subscripts for 'fname' are '[0]' to '[4095]'
#  884|           
#  885|           if (PATH_MAX - strlen(fname) > strlen("/MK_SO")) {
#  886|->             strcat(fname, "/MK_SO");
#  887|           } else {
#  888|               TRACE_ERROR("MK_SO buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def90]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c: scope_hint: In function 'icsftok_set_pin'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: note: valid subscripts for 'fname' are '[0]' to '[4095]'
# 1211|               }
# 1212|               if (PATH_MAX - strlen(fname) > strlen("/MK_USER")) {
# 1213|->                 strcat(fname, "/MK_USER");
# 1214|               } else {
# 1215|                   TRACE_ERROR("MK_USER buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def91]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: note: valid subscripts for 'fname' are '[0]' to '[4095]'
# 1267|               }
# 1268|               if (PATH_MAX - strlen(fname) > strlen("/MK_SO")) {
# 1269|->                 strcat(fname, "/MK_SO");
# 1270|               } else {
# 1271|                   TRACE_ERROR("MK_SO buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def92]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c: scope_hint: In function 'icsftok_login'
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: note: valid subscripts for 'fname' are '[0]' to '[4095]'
# 1644|               }
# 1645|               if (PATH_MAX - strlen(fname) > strlen("/MK_USER")) {
# 1646|->                 strcat(fname, "/MK_USER");
# 1647|               } else {
# 1648|                   TRACE_ERROR("MK_USER buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-121): [#def93]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: note: valid subscripts for 'fname' are '[0]' to '[4095]'
# 1676|               }
# 1677|               if (PATH_MAX - strlen(fname) > strlen("/MK_SO")) {
# 1678|->                 strcat(fname, "/MK_SO");
# 1679|               } else {
# 1680|                   TRACE_ERROR("MK_SO buffer overflow\n");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def94]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcscca/pkcscca.c: scope_hint: In function ‘main’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcscca/pkcscca.c:1736:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mk_type’ where non-null expected
/usr/include/memory.h:29: included_from: Included from here.
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcscca/pkcscca.c:20: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
# 1734|           case 'k':
# 1735|               mk_type = strdup(optarg);
# 1736|->             if (strcmp(mk_type, "aes") == 0) {
# 1737|                   masterkey = MK_AES;
# 1738|               } else if (strcmp(mk_type, "apka") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def95]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcscca/pkcscca.c:1752:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘m_type’ where non-null expected
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
# 1750|           case 'm':
# 1751|               m_type = strdup(optarg);
# 1752|->             if (strcmp(m_type, "v2objectsv3") == 0) {
# 1753|                   m_version = 1;
# 1754|               } else if (strcmp(m_type, "keys") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def96]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcsicsf/pkcsicsf.c: scope_hint: In function ‘main’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcsicsf/pkcsicsf.c:684:13: warning[-Wanalyzer-null-argument]: use of NULL ‘tokenname’ where non-null expected
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcsicsf/pkcsicsf.c:25: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
#  682|       /* Add token(s) */
#  683|       if (flags & CFG_ADD) {
#  684|->         if (strcmp(tokenname, "all") == 0) {
#  685|               rc = retrieve_all(racfpwd);
#  686|               if (rc) {

Error: GCC_ANALYZER_WARNING (CWE-789): [#def97]
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c: scope_hint: In function ‘read_object_00’
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:548:11: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘size + 4294967291’ as allocation size without upper-bounds checking
opencryptoki-3.24.0-build/opencryptoki-3.24.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:548:11: note: heap-based allocation
#  546|       /* Allocate buffer for obj */
#  547|       size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
#  548|->     buf = malloc(size);
#  549|       if (!buf) {
#  550|           TRACE_ERROR("Cannot malloc %d bytes for object %s.\n", size, name);

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-218.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameopencryptoki-3.24.0-2.fc42
store-results-to/tmp/tmp6auyu1lc/opencryptoki-3.24.0-2.fc42.tar.xz
time-created2024-11-13 02:17:24
time-finished2024-11-13 02:25:18
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp6auyu1lc/opencryptoki-3.24.0-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp6auyu1lc/opencryptoki-3.24.0-2.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9