opencryptoki-3.26.0-2.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
opencryptoki-3.26.0/testcases/login/init_tok.c:78:27: warning[-Wanalyzer-malloc-leak]: leak of ‘pass’
opencryptoki-3.26.0/testcases/login/init_tok.c:78:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
opencryptoki-3.26.0/testcases/login/init_tok.c:79:24: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:79:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:86:20: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:86:19: branch_true: following ‘true’ branch (when the strings are equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:87:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:87:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/login/init_tok.c:91:46: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:91:34: acquire_memory: allocated here
opencryptoki-3.26.0/testcases/login/init_tok.c:78:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
opencryptoki-3.26.0/testcases/login/init_tok.c:79:24: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:79:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:86:20: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:86:19: branch_true: following ‘true’ branch (when the strings are equal)...
opencryptoki-3.26.0/testcases/login/init_tok.c:87:17: branch_true: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:87:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/login/init_tok.c:91:46: branch_false: ...to here
opencryptoki-3.26.0/testcases/login/init_tok.c:78:27: danger: ‘pass’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   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): [#def2]
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:210:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘opstatelen’
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:67:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:72:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:73:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:78:34: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:78:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:85:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:86:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:91:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:92:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:92:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:98:23: branch_false: following ‘false’ branch (when ‘counter >= loops’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:210:15: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_opstate.c:210:10: danger: use of uninitialized value ‘opstatelen’ here
#  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-122): [#def3]
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:10: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:163:5: enter_function: entry to ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:176:8: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:182:17: branch_false: following ‘false’ branch (when ‘count <= i’)...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:191:5: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:192:10: call_function: calling ‘encrypt_DATA’ from ‘do_SessionPerformance’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:192:10: return_function: returning to ‘do_SessionPerformance’ from ‘encrypt_DATA’
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:193:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:45: branch_false: ...to here
opencryptoki-3.26.0/testcases/pkcs11/sess_perf.c:198:10: danger: read of 8 bytes at offset ‘(long unsigned int)(count + 4294967295) * 16 + 8’ exceeds the buffer
#  196|       }
#  197|   
#  198|->     rc = encrypt_DATA(t[count - 1].hsess, t[count - 1].hkey, 16);
#  199|       if (rc == FALSE) {
#  200|           testcase_error("encrypt_DATA #2");

Error: GCC_ANALYZER_WARNING (CWE-789): [#def4]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:964:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2655:7: enter_function: entry to 'load_private_token_objects'
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2668:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2669:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2669:16: call_function: calling 'load_private_token_objects_old' from 'load_private_token_objects'
#  962|   
#  963|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
#  964|->         buf = (CK_BYTE *) malloc(size);
#  965|           if (!buf) {
#  966|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def5]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:964:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2655:7: enter_function: entry to ‘load_private_token_objects’
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2668:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2669:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2669:16: call_function: calling ‘load_private_token_objects_old’ from ‘load_private_token_objects’
#  962|   
#  963|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
#  964|->         buf = (CK_BYTE *) malloc(size);
#  965|           if (!buf) {
#  966|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def6]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:1539:25: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2800:7: enter_function: entry to 'reload_token_object'
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2813:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: call_function: calling 'reload_token_object_old' from 'reload_token_object'
# 1537|       clear_len = len;
# 1538|   
# 1539|->     clear = (CK_BYTE *) malloc(len);
# 1540|       if (!clear) {
# 1541|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-789): [#def7]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:1539:25: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2800:7: enter_function: entry to ‘reload_token_object’
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2813:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: call_function: calling ‘reload_token_object_old’ from ‘reload_token_object’
# 1537|       clear_len = len;
# 1538|   
# 1539|->     clear = (CK_BYTE *) malloc(len);
# 1540|       if (!clear) {
# 1541|           TRACE_ERROR("%s\n", ock_err(ERR_HOST_MEMORY));

Error: GCC_ANALYZER_WARNING (CWE-789): [#def8]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:1668:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2800:7: enter_function: entry to 'reload_token_object'
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2813:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: call_function: calling 'reload_token_object_old' from 'reload_token_object'
# 1666|       size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1667|   
# 1668|->     buf = (CK_BYTE *) malloc(size);
# 1669|       if (!buf) {
# 1670|           rc = CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-789): [#def9]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:1668:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2800:7: enter_function: entry to ‘reload_token_object’
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2813:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2814:16: call_function: calling ‘reload_token_object_old’ from ‘reload_token_object’
# 1666|       size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1667|   
# 1668|->     buf = (CK_BYTE *) malloc(size);
# 1669|       if (!buf) {
# 1670|           rc = CKR_HOST_MEMORY;

Error: GCC_ANALYZER_WARNING (CWE-789): [#def10]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:1802:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value '(unsigned int)size' as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2966:7: enter_function: entry to 'load_public_token_objects'
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2978:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2979:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2979:16: call_function: calling 'load_public_token_objects_old' from 'load_public_token_objects'
# 1800|   
# 1801|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1802|->         buf = (CK_BYTE *) malloc(size);
# 1803|           if (!buf) {
# 1804|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def11]
opencryptoki-3.26.0/usr/lib/common/loadsave.c:1802:27: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(unsigned int)size’ as allocation size without upper-bounds checking
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2966:7: enter_function: entry to ‘load_public_token_objects’
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2978:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2979:16: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/loadsave.c:2979:16: call_function: calling ‘load_public_token_objects_old’ from ‘load_public_token_objects’
# 1800|   
# 1801|           size -= sizeof(CK_ULONG_32) + sizeof(CK_BBOOL);
# 1802|->         buf = (CK_BYTE *) malloc(size);
# 1803|           if (!buf) {
# 1804|               fclose(fp2);

Error: GCC_ANALYZER_WARNING (CWE-122): [#def12]
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2499:9: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2614:7: enter_function: entry to 'decode_eme_oaep'
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2649:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2654:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2656:8: branch_false: following 'false' branch (when 'db' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2666:32: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_rsa.c:2671:9: call_function: calling 'mgf1' from 'decode_eme_oaep'
# 2497|           /* concatenate seed and octet string */
# 2498|           memset(seed_buffer, 0, seedlen + 4);
# 2499|->         memcpy(seed_buffer, seed, seedlen);
# 2500|           memcpy(seed_buffer + seedlen, counter, 4);
# 2501|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1740:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1743:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1743:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1746:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1746:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1748:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1748:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1750:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1750:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1752:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1752:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_true: following 'true' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1756:21: branch_false: following 'false' branch (when 'ulCount <= i')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 1759|           }
# 1760|   
# 1761|->         free(new_attrs);
# 1762|       }
# 1763|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: following ‘false’ branch (when ‘new_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1582:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following ‘true’ branch (when ‘i != 3’)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1596:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1602:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1593:17: branch_true: following ‘true’ branch (when ‘i != 3’)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1594:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1597:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1599:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1740:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1743:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1743:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1746:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1746:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1748:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1748:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1750:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1750:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1752:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1752:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_true: following ‘true’ branch (when ‘new_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1755:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1756:21: branch_false: following ‘false’ branch (when ‘ulCount <= i’)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1761:9: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 1759|           }
# 1760|   
# 1761|->         free(new_attrs);
# 1762|       }
# 1763|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following 'false' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following 'true' branch (when 'i != 3')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2002:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2005:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2005:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2011:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2011:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2013:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2013:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2015:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2015:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2017:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2017:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_true: following 'true' branch (when 'new_attrs' is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2021:21: branch_false: following 'false' branch (when 'ulCount <= i')...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 2024|           }
# 2025|   
# 2026|->         free(new_attrs);
# 2027|       }
# 2028|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: following ‘false’ branch (when ‘new_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1800:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following ‘true’ branch (when ‘i != 3’)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1814:37: acquire_memory: allocated here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1819:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1811:17: branch_true: following ‘true’ branch (when ‘i != 3’)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1812:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1815:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:1816:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2002:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2005:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2005:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2011:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2011:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2013:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2013:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2015:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2015:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2017:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2017:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_true: following ‘true’ branch (when ‘new_attrs’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2020:8: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2021:21: branch_false: following ‘false’ branch (when ‘ulCount <= i’)...
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/common/mech_ssl3.c:2026:9: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 2024|           }
# 2025|   
# 2026|->         free(new_attrs);
# 2027|       }
# 2028|   

Error: CPPCHECK_WARNING (CWE-682): [#def17]
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:129: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  127|   
#  128|       i = 0;
#  129|->     *it++ = '/';
#  130|       if (file_path[0] == '/')
#  131|           i++;

Error: CPPCHECK_WARNING (CWE-476): [#def18]
opencryptoki-3.26.0/usr/lib/common/shared_memory.c:129: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: it++
#  127|   
#  128|       i = 0;
#  129|->     *it++ = '/';
#  130|       if (file_path[0] == '/')
#  131|           i++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: warning[-Wanalyzer-malloc-leak]: leak of 'configalloc(64, yyscanner)'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1742:21: enter_function: entry to 'config_create_buffer'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1746:24: call_function: calling 'configalloc' from 'config_create_buffer'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1746:24: return_function: returning to 'config_create_buffer' from 'configalloc'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1747:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1750:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: danger: 'configalloc(64, yyscanner)' leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 1753|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 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 )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1742:21: enter_function: entry to ‘config_create_buffer’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1746:24: call_function: inlined call to ‘configalloc’ from ‘config_create_buffer’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1747:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1750:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1755:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1753|   	/* yy_ch_buf has to be 2 characters longer than the size given because
# 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 )

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1798:2: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1677:10: enter_function: entry to 'configrestart'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: call_function: calling 'configensure_buffer_stack' from 'configrestart'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: return_function: returning to 'configrestart' from 'configensure_buffer_stack'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: call_function: calling 'config_create_buffer' from 'configrestart'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: return_function: returning to 'configrestart' from 'config_create_buffer'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: call_function: calling 'config_init_buffer' from 'configrestart'
# 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): [#def22]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1798:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1677:10: enter_function: entry to ‘configrestart’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: call_function: calling ‘configensure_buffer_stack’ from ‘configrestart’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1682:16: return_function: returning to ‘configrestart’ from ‘configensure_buffer_stack’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: call_function: calling ‘config_create_buffer’ from ‘configrestart’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1684:27: return_function: returning to ‘configrestart’ from ‘config_create_buffer’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:1687:2: call_function: calling ‘config_init_buffer’ from ‘configrestart’
# 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): [#def23]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2016:26: warning[-Wanalyzer-malloc-leak]: leak of 'configalloc(n,  yyscanner)'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2000:17: enter_function: entry to 'config_scan_bytes'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2009:24: call_function: calling 'configalloc' from 'config_scan_bytes'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2009:24: return_function: returning to 'config_scan_bytes' from 'configalloc'
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2018:6: call_function: calling 'config_scan_buffer' from 'config_scan_bytes'
# 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): [#def24]
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2016:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2000:17: enter_function: entry to ‘config_scan_bytes’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2009:24: call_function: inlined call to ‘configalloc’ from ‘config_scan_bytes’
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2010:12: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/cfglex.c:2018:6: call_function: calling ‘config_scan_buffer’ from ‘config_scan_bytes’
# 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): [#def25]
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:1688:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:333:5: enter_function: entry to 'parse_configlib_file'
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:341:11: call_function: calling 'configparse' from 'parse_configlib_file'
# 1686|           if (! yyptr)
# 1687|             YYNOMEM;
# 1688|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1689|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1690|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
opencryptoki-3.26.0/usr/lib/config/cfgparse.c:1688:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:333:5: enter_function: entry to ‘parse_configlib_file’
opencryptoki-3.26.0/usr/lib/config/cfgparse.y:341:11: call_function: calling ‘configparse’ from ‘parse_configlib_file’
# 1686|           if (! yyptr)
# 1687|             YYNOMEM;
# 1688|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1689|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1690|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: warning[-Wanalyzer-malloc-leak]: leak of 'confignode_alloceoc(cmt,  line)'
opencryptoki-3.26.0/usr/lib/config/configuration.c:793:1: enter_function: entry to 'confignode_allocbarestringconstdumpable'
opencryptoki-3.26.0/usr/lib/config/configuration.c:799:8: branch_false: following 'false' branch (when 'comment' is NULL)...
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: call_function: calling 'confignode_allocbarestringconst' from 'confignode_allocbarestringconstdumpable'
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: return_function: returning to 'confignode_allocbarestringconstdumpable' from 'confignode_allocbarestringconst'
opencryptoki-3.26.0/usr/lib/config/configuration.c:805:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: call_function: calling 'confignode_alloceoc' from 'confignode_allocbarestringconstdumpable'
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: return_function: returning to 'confignode_allocbarestringconstdumpable' from 'confignode_alloceoc'
opencryptoki-3.26.0/usr/lib/config/configuration.c:807:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:808:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: danger: 'confignode_alloceoc(cmt,  line)' leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  575|   
#  576|       if (res) {
#  577|->         res->base.next = res->base.prev = &(res->base);
#  578|           res->base.key = comment;
#  579|           res->base.type = CT_EOC;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: warning[-Wanalyzer-malloc-leak]: leak of ‘confignode_alloceoc(cmt,  line)’
opencryptoki-3.26.0/usr/lib/config/configuration.c:793:1: enter_function: entry to ‘confignode_allocbarestringconstdumpable’
opencryptoki-3.26.0/usr/lib/config/configuration.c:799:8: branch_false: following ‘false’ branch (when ‘comment’ is NULL)...
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: call_function: calling ‘confignode_allocbarestringconst’ from ‘confignode_allocbarestringconstdumpable’
opencryptoki-3.26.0/usr/lib/config/configuration.c:804:11: return_function: returning to ‘confignode_allocbarestringconstdumpable’ from ‘confignode_allocbarestringconst’
opencryptoki-3.26.0/usr/lib/config/configuration.c:805:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: call_function: calling ‘confignode_alloceoc’ from ‘confignode_allocbarestringconstdumpable’
opencryptoki-3.26.0/usr/lib/config/configuration.c:806:15: return_function: returning to ‘confignode_allocbarestringconstdumpable’ from ‘confignode_alloceoc’
opencryptoki-3.26.0/usr/lib/config/configuration.c:807:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/config/configuration.c:808:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/config/configuration.h:577:43: danger: ‘confignode_alloceoc(cmt,  line)’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  575|   
#  576|       if (res) {
#  577|->         res->base.next = res->base.prev = &(res->base);
#  578|           res->base.key = comment;
#  579|           res->base.type = CT_EOC;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:214:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:941:7: enter_function: entry to 'hsm_mk_change_op_iterate'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:958:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:959:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:964:14: call_function: calling 'hsm_mk_change_op_load' from 'hsm_mk_change_op_iterate'
#  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-476): [#def30]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:251:12: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mkvps'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:941:7: enter_function: entry to 'hsm_mk_change_op_iterate'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:958:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:959:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:964:14: call_function: calling 'hsm_mk_change_op_load' from 'hsm_mk_change_op_iterate'
#  249|   
#  250|      for (i = 0; i < num_mkvps; i++) {
#  251|->        if (mkvps[i].mkvp != NULL)
#  252|              free(mkvps[i].mkvp);
#  253|      }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:255:4: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:941:7: enter_function: entry to 'hsm_mk_change_op_iterate'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:958:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:959:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:964:14: call_function: calling 'hsm_mk_change_op_load' from 'hsm_mk_change_op_iterate'
#  253|      }
#  254|   
#  255|->    memset(mkvps, 0, num_mkvps * sizeof(struct hsm_mkvp));
#  256|   }
#  257|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:340:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:941:7: enter_function: entry to 'hsm_mk_change_op_iterate'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:958:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:959:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:964:14: call_function: calling 'hsm_mk_change_op_load' from 'hsm_mk_change_op_iterate'
#  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): [#def33]
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:556:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:941:7: enter_function: entry to 'hsm_mk_change_op_iterate'
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:952:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:958:17: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:959:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/hsm_mk_change/hsm_mk_change.c:964:14: call_function: calling 'hsm_mk_change_op_load' from 'hsm_mk_change_op_iterate'
#  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): [#def34]
opencryptoki-3.26.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): [#def35]
opencryptoki-3.26.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): [#def36]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: warning[-Wanalyzer-null-argument]: use of NULL 'attrbval.bv_val' where non-null expected
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2161:19: release_memory: 'attrbval.bv_val' is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2197:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:21: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: release_memory: 'attrbval.bv_val' is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: danger: argument 2 ('attrbval.bv_val') NULL where non-null expected
# 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-688): [#def37]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: warning[-Wanalyzer-null-argument]: use of NULL ‘attrbval.bv_val’ where non-null expected
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2161:19: release_memory: ‘attrbval.bv_val’ is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2195:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2197:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:21: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:22: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:45: release_memory: ‘attrbval.bv_val’ is NULL
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2214:21: danger: argument 2 (‘attrbval.bv_val’) NULL where non-null expected
# 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): [#def38]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'intval'
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following 'false' branch (when 'attr_set' is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: danger: use of uninitialized value 'intval' here
# 2214|                       memcpy(attrs[i].pValue, attrbval.bv_val, attrbval.bv_len);
# 2215|                   } else {
# 2216|->                     *((CK_ULONG *) attrs[i].pValue) = intval;
# 2217|                   }
# 2218|                   attrs[i].ulValueLen = attrbval.bv_len;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def39]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘intval’
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2170:8: branch_false: following ‘false’ branch (when ‘attr_set’ is non-NULL)...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2175:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2181:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2185:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2189:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2191:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2192:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2205:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2206:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:17: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2210:16: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2212:23: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:21: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2213:20: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf.c:2216:21: danger: use of uninitialized value ‘intval’ here
# 2214|                       memcpy(attrs[i].pValue, attrbval.bv_val, attrbval.bv_len);
# 2215|                   } else {
# 2216|->                     *((CK_ULONG *) attrs[i].pValue) = intval;
# 2217|                   }
# 2218|                   attrs[i].ulValueLen = attrbval.bv_len;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def40]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:846:8: branch_false: following 'false' branch (when 'slot_id <= 1023')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:851:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:852:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:858:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:858:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:867:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:872:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:872:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:875:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:880:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:885:24: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:885:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:886:13: danger: out-of-bounds write on 'fname'
#  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): [#def41]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1180:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:8: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1201:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1200:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1207:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1207:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1208:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1208:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1212:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1212:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1213:17: danger: out-of-bounds write on 'fname'
# 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): [#def42]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1180:8: branch_false: following 'false' branch (when 'rc == 0')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1186:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:9: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1192:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1197:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1244:15: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1244:15: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1248:14: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1247:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1255:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1255:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1260:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1260:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1264:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1264:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1268:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1268:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1269:17: danger: out-of-bounds write on 'fname'
# 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): [#def43]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1603:8: branch_false: following 'false' branch (when 'slot_id <= 1023')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1609:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1610:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1615:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1616:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_true: following 'true' branch (when 'userType == 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1623:20: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1623:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1631:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1631:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1639:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1639:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1640:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1640:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1645:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1645:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1646:17: danger: out-of-bounds write on 'fname'
# 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): [#def44]
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1603:8: branch_false: following 'false' branch (when 'slot_id <= 1023')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1609:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1610:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1615:10: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1616:8: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1621:8: branch_false: following 'false' branch (when 'userType != 1')...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1663:20: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1663:12: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1670:13: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1670:12: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1672:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1672:16: branch_false: following 'false' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1677:28: branch_false: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1677:16: branch_true: following 'true' branch...
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: branch_true: ...to here
opencryptoki-3.26.0/usr/lib/icsf_stdll/icsf_specific.c:1678:17: danger: out-of-bounds write on 'fname'
# 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): [#def45]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:901:41: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘strdup(*node.u.text_value)’ where non-null expected
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:855:19: enter_function: entry to ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: call_function: calling ‘kmip_node_new’ from ‘kmip_node_clone’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:860:17: return_function: returning to ‘kmip_node_clone’ from ‘kmip_node_new’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:861:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:864:17: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:897:20: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:898:45: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:898:45: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:899:28: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:901:41: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.c:901:41: danger: argument 1 (‘strdup(*node.u.text_value)’) from [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14) could be NULL where non-null expected
#  899|   			if (node->text_value == NULL)
#  900|   				goto error;
#  901|-> 			clone->length = strlen(clone->text_value);
#  902|   		}
#  903|   		break;

Error: COMPILER_WARNING (CWE-477): [#def46]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c: scope_hint: In function ‘kmip_connection_tls_init’
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:382:17: warning[-Wdeprecated-declarations]: ‘SSL_set1_host’ is deprecated: Since OpenSSL 4.0
#  382 |                 if (SSL_set1_host(conn->plain_tls.ssl, hostname) != 1) {
#      |                 ^~
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/kmip.h:17: included_from: Included from here.
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:20: included_from: Included from here.
/usr/include/openssl/ssl.h:1928:34: note: declared here
# 1928 | OSSL_DEPRECATEDIN_4_0 __owur int SSL_set1_host(SSL *s, const char *host);
#      |                                  ^~~~~~~~~~~~~
#  380|   		SSL_set_hostflags(conn->plain_tls.ssl,
#  381|   				  X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
#  382|-> 		if (SSL_set1_host(conn->plain_tls.ssl, hostname) != 1) {
#  383|   			kmip_debug(debug, "SSL_set1_host failed");
#  384|   			if (debug)

Error: COMPILER_WARNING (CWE-477): [#def47]
opencryptoki-3.26.0/usr/sbin/p11kmip/kmipclient/tls.c:382:17: warning[-Wdeprecated-declarations]: ‘SSL_set1_host’ is deprecated: Since OpenSSL 4.0
#  380|   		SSL_set_hostflags(conn->plain_tls.ssl,
#  381|   				  X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
#  382|-> 		if (SSL_set1_host(conn->plain_tls.ssl, hostname) != 1) {
#  383|   			kmip_debug(debug, "SSL_set1_host failed");
#  384|   			if (debug)

Error: COMPILER_WARNING (CWE-477): [#def48]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c: scope_hint: In function ‘p11kmip_check_certificate’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1194:5: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1194 |     *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
#      |     ^
/usr/include/openssl/pem.h:23: included_from: Included from here.
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:37: included_from: Included from here.
/usr/include/openssl/x509.h:694:27: note: declared here
#  694 | OSSL_DEPRECATEDIN_4_0 int X509_cmp_current_time(const ASN1_TIME *s);
#      |                           ^~~~~~~~~~~~~~~~~~~~~
# 1192|                                     X509_get_issuer_name(cert)) == 0);
# 1193|   
# 1194|->     *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|                 X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   

Error: COMPILER_WARNING (CWE-477): [#def49]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1194:5: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1192|                                     X509_get_issuer_name(cert)) == 0);
# 1193|   
# 1194|->     *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|                 X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   

Error: COMPILER_WARNING (CWE-477): [#def50]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1195:15: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1195 |               X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
#      |               ^~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/x509.h:694:27: note: declared here
#  694 | OSSL_DEPRECATEDIN_4_0 int X509_cmp_current_time(const ASN1_TIME *s);
#      |                           ^~~~~~~~~~~~~~~~~~~~~
# 1193|   
# 1194|       *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|->               X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   
# 1197|       X509_free(cert);

Error: COMPILER_WARNING (CWE-477): [#def51]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:1195:15: warning[-Wdeprecated-declarations]: ‘X509_cmp_current_time’ is deprecated: Since OpenSSL 4.0
# 1193|   
# 1194|       *valid = (X509_cmp_current_time(X509_get0_notBefore(cert)) < 0 &&
# 1195|->               X509_cmp_current_time(X509_get0_notAfter(cert)) > 0);
# 1196|   
# 1197|       X509_free(cert);

Error: GCC_ANALYZER_WARNING: [#def52]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2500:13: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to ‘memcpy’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2491:8: branch_false: following ‘false’ branch (when ‘rc == 0’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2491:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2498:17: branch_true: following ‘true’ branch (when ‘i < wrapped_key_num_attrs’)...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2499:30: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2499:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2501:17: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2500:13: danger: overlapping buffers passed as arguments to ‘memcpy’
# 2498|       for (i = 0; i < wrapped_key_num_attrs; i++) {
# 2499|           if (wrapped_key_attrs[i].type == CKA_TOKEN) {
# 2500|->             memcpy(wrapped_key_attrs[0].pValue, wrapped_key_attrs[i].pValue, 
# 2501|                   wrapped_key_attrs[i].ulValueLen);
# 2502|           } else if (wrapped_key_attrs[i].type == CKA_SENSITIVE) {

Error: CPPCHECK_WARNING (CWE-476): [#def53]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2926: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: attrs
# 2924|   
# 2925|       /* Set the label */
# 2926|->     attrs[k] =
# 2927|           kmip_new_name((char *) label, KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 2928|       if (attrs[k] == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def54]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2926:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2884:14: enter_function: entry to ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2904:16: call_function: inlined call to ‘get_kmip_obj_class_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2906:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2913:15: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_locate_remote_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2915:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2922:13: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2926:5: danger: ‘attrs’ could be NULL: unchecked value from [(12)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/11)
# 2924|   
# 2925|       /* Set the label */
# 2926|->     attrs[k] =
# 2927|           kmip_new_name((char *) label, KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 2928|       if (attrs[k] == NULL) {

Error: CPPCHECK_WARNING (CWE-476): [#def55]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:2928: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: attrs
# 2926|       attrs[k] =
# 2927|           kmip_new_name((char *) label, KMIP_NAME_TYPE_UNINTERPRETED_TEXT_STRING);
# 2928|->     if (attrs[k] == NULL) {
# 2929|           rc = CKR_HOST_MEMORY;
# 2930|           warnx("Allocate KMIP node failed");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def56]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3837:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3674:14: enter_function: entry to ‘p11kmip_retrieve_remote_public_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3701:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3707:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3707:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3713:14: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3715:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3721:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3721:10: call_function: calling ‘perform_kmip_request’ from ‘p11kmip_retrieve_remote_public_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3721:10: return_function: returning to ‘p11kmip_retrieve_remote_public_key’ from ‘perform_kmip_request’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3723:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3728:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3729:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3735:24: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3735:24: call_function: inlined call to ‘get_p11_obj_class_from_kmip’ from ‘p11kmip_retrieve_remote_public_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3736:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3742:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3744:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3750:10: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3752:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3758:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3758:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3764:22: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3771:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3777:5: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3796:12: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3837:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3837:9: danger: dereference of NULL ‘0’
# 3835|           }
# 3836|   #else
# 3837|->         EVP_PKEY_set_bn_param(*pub_key, OSSL_PKEY_PARAM_RSA_N, *modulus_ptr);
# 3838|           EVP_PKEY_set_bn_param(*pub_key, OSSL_PKEY_PARAM_RSA_E, *pub_exp_ptr);
# 3839|   #endif

Error: GCC_ANALYZER_WARNING (CWE-476): [#def57]
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘attrs’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3870:14: enter_function: entry to ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3885:13: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3887:18: call_function: inlined call to ‘get_kmip_alg_from_p11’ from ‘p11kmip_generate_remote_secret_key’
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3889:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:18: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/p11kmip/p11kmip.c:3894:5: danger: ‘attrs’ could be NULL: unchecked value from [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
# 3892|           goto out;
# 3893|       }
# 3894|->     attrs[idx] = kmip_new_cryptographic_algorithm(secret_alg);
# 3895|   
# 3896|       if (attrs[idx] == NULL) {

Error: COMPILER_WARNING (CWE-704): [#def58]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c: scope_hint: In function ‘parse_key_pair_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3687:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 3687 |     ch = strchr(attrs, ':');
#      |        ^
# 3685|       }
# 3686|   
# 3687|->     ch = strchr(attrs, ':');
# 3688|   
# 3689|       if (ch == NULL) {

Error: COMPILER_WARNING (CWE-704): [#def59]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:3687:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 3685|       }
# 3686|   
# 3687|->     ch = strchr(attrs, ':');
# 3688|   
# 3689|       if (ch == NULL) {

Error: COMPILER_WARNING (CWE-704): [#def60]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c: scope_hint: In function ‘p11sak_import_x509_attrs’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5929:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5929 |     name = X509_get_subject_name(x509);
#      |          ^
# 5927|   
# 5928|       /* CKA_SUBJECT: DER-encoding of the cert subject name */
# 5929|->     name = X509_get_subject_name(x509);
# 5930|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 5931|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Error: COMPILER_WARNING (CWE-704): [#def61]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5929:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5927|   
# 5928|       /* CKA_SUBJECT: DER-encoding of the cert subject name */
# 5929|->     name = X509_get_subject_name(x509);
# 5930|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 5931|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Error: COMPILER_WARNING (CWE-704): [#def62]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5938:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5938 |     name = X509_get_issuer_name(x509);
#      |          ^
# 5936|   
# 5937|       /* CKA_ISSUER: DER-encoding of the cert issuer name */
# 5938|->     name = X509_get_issuer_name(x509);
# 5939|       if (!X509_NAME_get0_der(name, &issuer_name, &issuer_name_len)) {
# 5940|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's issuer name");

Error: COMPILER_WARNING (CWE-704): [#def63]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:5938:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 5936|   
# 5937|       /* CKA_ISSUER: DER-encoding of the cert issuer name */
# 5938|->     name = X509_get_issuer_name(x509);
# 5939|       if (!X509_NAME_get0_der(name, &issuer_name, &issuer_name_len)) {
# 5940|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's issuer name");

Error: COMPILER_WARNING (CWE-704): [#def64]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c: scope_hint: In function ‘p11sak_extract_x509_pk’
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:6082:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6082 |     name = X509_get_subject_name(x509);
#      |          ^
# 6080|       }
# 6081|   
# 6082|->     name = X509_get_subject_name(x509);
# 6083|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 6084|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Error: COMPILER_WARNING (CWE-704): [#def65]
opencryptoki-3.26.0/usr/sbin/p11sak/p11sak.c:6082:10: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6080|       }
# 6081|   
# 6082|->     name = X509_get_subject_name(x509);
# 6083|       if (!X509_NAME_get0_der(name, &subj_name, &subj_name_len)) {
# 6084|           warnx("OpenSSL X509_NAME_get0_der failed to return the certificate's subj name");

Error: CPPCHECK_WARNING (CWE-476): [#def66]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1840: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mk_type
# 1838|           case 'k':
# 1839|               mk_type = strdup(optarg);
# 1840|->             if (strcmp(mk_type, "aes") == 0) {
# 1841|                   masterkey = MK_AES;
# 1842|               } else if (strcmp(mk_type, "apka") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def67]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1840:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mk_type’ where non-null expected
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1829:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1831:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1839:23: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1840:17: danger: argument 1 (‘mk_type’) from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
# 1838|           case 'k':
# 1839|               mk_type = strdup(optarg);
# 1840|->             if (strcmp(mk_type, "aes") == 0) {
# 1841|                   masterkey = MK_AES;
# 1842|               } else if (strcmp(mk_type, "apka") == 0) {

Error: CPPCHECK_WARNING (CWE-476): [#def68]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1856: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: m_type
# 1854|           case 'm':
# 1855|               m_type = strdup(optarg);
# 1856|->             if (strcmp(m_type, "v2objectsv3") == 0) {
# 1857|                   m_version = 1;
# 1858|               } else if (strcmp(m_type, "keys") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def69]
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1856:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘m_type’ where non-null expected
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1829:12: branch_true: following ‘true’ branch (when ‘opt != -1’)...
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1831:9: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1855:22: acquire_memory: this call could return NULL
opencryptoki-3.26.0/usr/sbin/pkcscca/pkcscca.c:1856:17: danger: argument 1 (‘m_type’) from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
# 1854|           case 'm':
# 1855|               m_type = strdup(optarg);
# 1856|->             if (strcmp(m_type, "v2objectsv3") == 0) {
# 1857|                   m_version = 1;
# 1858|               } else if (strcmp(m_type, "keys") == 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def70]
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:684:13: warning[-Wanalyzer-null-argument]: use of NULL ‘tokenname’ where non-null expected
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:539:11: release_memory: ‘buf_racfpwd’ is NULL
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:622:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:626:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:626:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:626:23: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:630:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:634:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:654:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:660:9: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:660:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:683:8: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:684:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcsicsf/pkcsicsf.c:684:13: danger: argument 1 (‘tokenname’) NULL where non-null expected
#  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): [#def71]
opencryptoki-3.26.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.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1866:14: enter_function: entry to ‘count_objects’
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: following ‘false’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1883:8: branch_false: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1890:12: branch_true: following ‘true’ branch...
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1891:13: branch_true: ...to here
opencryptoki-3.26.0/usr/sbin/pkcstok_migrate/pkcstok_migrate.c:1893:15: call_function: calling ‘read_object’ from ‘count_objects’
#  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.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-127.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameopencryptoki-3.26.0-2.fc44
store-results-to/tmp/tmp9sh5cfme/opencryptoki-3.26.0-2.fc44.tar.xz
time-created2026-08-03 18:56:21
time-finished2026-08-03 19:01:45
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp9sh5cfme/opencryptoki-3.26.0-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp9sh5cfme/opencryptoki-3.26.0-2.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9