Task #91674 - fixed.err

back to task #91674
download
Error: GCC_ANALYZER_WARNING (CWE-404):
openssl-3.5.1/apps/storeutl.c:338:11: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
openssl-3.5.1/apps/storeutl.c:336:5: acquire_resource: 'va_start' called here
openssl-3.5.1/apps/storeutl.c:338:11: throw: if 'BIO_printf' throws an exception...
openssl-3.5.1/apps/storeutl.c:338:11: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  336|       va_start(args, format);
#  337|   
#  338|->     ret = BIO_printf(bio, "%*s", indent, "") + BIO_vprintf(bio, format, args);
#  339|   
#  340|       va_end(args);

Error: GCC_ANALYZER_WARNING (CWE-404):
openssl-3.5.1/apps/storeutl.c:338:48: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
openssl-3.5.1/apps/storeutl.c:336:5: acquire_resource: 'va_start' called here
openssl-3.5.1/apps/storeutl.c:338:48: throw: if 'BIO_vprintf' throws an exception...
openssl-3.5.1/apps/storeutl.c:338:48: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  336|       va_start(args, format);
#  337|   
#  338|->     ret = BIO_printf(bio, "%*s", indent, "") + BIO_vprintf(bio, format, args);
#  339|   
#  340|       va_end(args);

Error: COMPILER_WARNING (CWE-590):
openssl-3.5.1/crypto/mem.c:353:5: warning[-Wfree-nonheap-object]: 'free' called on unallocated object 'recp'
#  353 |     free(str);
#      |     ^
openssl-3.5.1/crypto/bn/bn_exp.c: scope_hint: In function 'BN_mod_exp_recp'
openssl-3.5.1/crypto/bn/bn_exp.c:177:17: note: declared here
#  177 |     BN_RECP_CTX recp;
#      |                 ^
#  351|       }
#  352|   
#  353|->     free(str);
#  354|   }
#  355|   

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:47:5: warning[-Wanalyzer-malloc-leak]: leak of 'pathname'
openssl-3.5.1/fuzz/test-corpus.c:61:5: enter_function: entry to 'main'
openssl-3.5.1/fuzz/test-corpus.c:66:17: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:67:41: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:76:16: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: following 'true' branch (when 'pathname' is NULL)...
openssl-3.5.1/fuzz/test-corpus.c:79:28: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:79:28: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:80:20: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:82:38: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:90:13: call_function: calling 'testfile' from 'main'
#   45|           return;
#   46|       printf("# %s\n", pathname);
#   47|->     fflush(stdout);
#   48|       f = fopen(pathname, "rb");
#   49|       if (f == NULL)

Error: GCC_ANALYZER_WARNING (CWE-775):
openssl-3.5.1/fuzz/test-corpus.c:51:18: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(pathname, "rb")'
openssl-3.5.1/fuzz/test-corpus.c:44:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:48:9: acquire_resource: opened here
openssl-3.5.1/fuzz/test-corpus.c:49:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:51:18: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:52:8: branch_true: following 'true' branch (when 'buf' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:53:13: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:51:18: danger: 'fopen(pathname, "rb")' leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   49|       if (f == NULL)
#   50|           return;
#   51|->     buf = malloc(st.st_size);
#   52|       if (buf != NULL) {
#   53|           s = fread(buf, 1, st.st_size, f);

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:51:18: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(pathname, "rb")'
openssl-3.5.1/fuzz/test-corpus.c:44:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:48:9: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:49:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:51:18: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:52:8: branch_true: following 'true' branch (when 'buf' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:53:13: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:51:18: danger: 'fopen(pathname, "rb")' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   49|       if (f == NULL)
#   50|           return;
#   51|->     buf = malloc(st.st_size);
#   52|       if (buf != NULL) {
#   53|           s = fread(buf, 1, st.st_size, f);

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:54:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
openssl-3.5.1/fuzz/test-corpus.c:44:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:49:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:51:18: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:51:11: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:52:8: branch_true: following 'true' branch (when 'buf' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:53:13: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:54:9: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:54:9: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:54:9: throw: if 'OPENSSL_die' throws an exception...
openssl-3.5.1/fuzz/test-corpus.c:54:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   52|       if (buf != NULL) {
#   53|           s = fread(buf, 1, st.st_size, f);
#   54|->         OPENSSL_assert(s == (size_t)st.st_size);
#   55|           FuzzerTestOneInput(buf, s);
#   56|           free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:54:9: warning[-Wanalyzer-malloc-leak]: leak of 'pathname'
openssl-3.5.1/fuzz/test-corpus.c:61:5: enter_function: entry to 'main'
openssl-3.5.1/fuzz/test-corpus.c:66:17: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:67:41: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:76:16: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: following 'true' branch (when 'pathname' is NULL)...
openssl-3.5.1/fuzz/test-corpus.c:79:28: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:79:28: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:80:20: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:82:38: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:90:13: call_function: calling 'testfile' from 'main'
#   52|       if (buf != NULL) {
#   53|           s = fread(buf, 1, st.st_size, f);
#   54|->         OPENSSL_assert(s == (size_t)st.st_size);
#   55|           FuzzerTestOneInput(buf, s);
#   56|           free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:55:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
openssl-3.5.1/fuzz/test-corpus.c:44:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:49:8: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:51:18: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:51:11: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:52:8: branch_true: following 'true' branch (when 'buf' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:53:13: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:54:9: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:55:9: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:55:9: throw: if 'FuzzerTestOneInput' throws an exception...
openssl-3.5.1/fuzz/test-corpus.c:55:9: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#   53|           s = fread(buf, 1, st.st_size, f);
#   54|           OPENSSL_assert(s == (size_t)st.st_size);
#   55|->         FuzzerTestOneInput(buf, s);
#   56|           free(buf);
#   57|       }

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:55:9: warning[-Wanalyzer-malloc-leak]: leak of 'pathname'
openssl-3.5.1/fuzz/test-corpus.c:61:5: enter_function: entry to 'main'
openssl-3.5.1/fuzz/test-corpus.c:66:17: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:67:41: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:76:16: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: following 'true' branch (when 'pathname' is NULL)...
openssl-3.5.1/fuzz/test-corpus.c:79:28: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:79:28: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:80:20: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:82:38: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:90:13: call_function: calling 'testfile' from 'main'
#   53|           s = fread(buf, 1, st.st_size, f);
#   54|           OPENSSL_assert(s == (size_t)st.st_size);
#   55|->         FuzzerTestOneInput(buf, s);
#   56|           free(buf);
#   57|       }

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:76:28: warning[-Wanalyzer-malloc-leak]: leak of 'pathname'
openssl-3.5.1/fuzz/test-corpus.c:66:17: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:67:41: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:76:16: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: following 'true' branch (when 'pathname' is NULL)...
openssl-3.5.1/fuzz/test-corpus.c:79:28: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:79:28: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:80:20: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:82:38: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:76:28: throw: if 'OPENSSL_DIR_read' throws an exception...
openssl-3.5.1/fuzz/test-corpus.c:76:28: danger: 'pathname' leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#   74|            * We start with trying to read the given path as a directory.
#   75|            */
#   76|->         while ((filename = OPENSSL_DIR_read(&ctx, argv[n])) != NULL) {
#   77|               wasdir = 1;
#   78|               if (pathname == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401):
openssl-3.5.1/fuzz/test-corpus.c:92:9: warning[-Wanalyzer-malloc-leak]: leak of 'pathname'
openssl-3.5.1/fuzz/test-corpus.c:66:17: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:67:41: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:76:16: branch_true: following 'true' branch...
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:78:16: branch_true: following 'true' branch (when 'pathname' is NULL)...
openssl-3.5.1/fuzz/test-corpus.c:79:28: branch_true: ...to here
openssl-3.5.1/fuzz/test-corpus.c:79:28: acquire_memory: allocated here
openssl-3.5.1/fuzz/test-corpus.c:80:20: branch_false: following 'false' branch (when 'pathname' is non-NULL)...
openssl-3.5.1/fuzz/test-corpus.c:82:38: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:76:16: branch_false: following 'false' branch...
openssl-3.5.1/fuzz/test-corpus.c:92:9: branch_false: ...to here
openssl-3.5.1/fuzz/test-corpus.c:92:9: throw: if 'OPENSSL_DIR_end' throws an exception...
openssl-3.5.1/fuzz/test-corpus.c:92:9: danger: 'pathname' leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#   90|               testfile(pathname);
#   91|           }
#   92|->         OPENSSL_DIR_end(&ctx);
#   93|   
#   94|           /* If it wasn't a directory, treat it as a file instead */

Error: GCC_ANALYZER_WARNING (CWE-476):
openssl-3.5.1/ssl/d1_lib.c:871:11: warning[-Wanalyzer-null-dereference]: dereference of NULL 'sc'
openssl-3.5.1/ssl/d1_lib.c:864:26: branch_true: following 'true' branch (when 's' is non-NULL)...
openssl-3.5.1/ssl/d1_lib.c:864:26: branch_true: ...to here
openssl-3.5.1/ssl/d1_lib.c:864:26: branch_false: following 'false' branch...
openssl-3.5.1/ssl/d1_lib.c:869:12: branch_false: ...to here
openssl-3.5.1/ssl/d1_lib.c:870:8: branch_true: following 'true' branch...
openssl-3.5.1/ssl/d1_lib.c:871:11: danger: dereference of NULL 'sc'
#  869|       wbio = SSL_get_wbio(s);
#  870|       if (wbio != NULL && BIO_dgram_is_sctp(wbio) &&
#  871|->         !(sc->shutdown & SSL_SENT_SHUTDOWN)) {
#  872|           ret = BIO_dgram_sctp_wait_for_dry(wbio);
#  873|           if (ret < 0)