Task #90282 - added.err
back to task #90282download
Error: GCC_ANALYZER_WARNING (CWE-775):
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:136:54: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/run/audit/af_unix.state", "w")’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:128:19: acquire_resource: opened here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:130:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:133:22: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:137:9: throw: if ‘q_queue_length’ throws an exception...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:136:54: danger: ‘fopen("/run/audit/af_unix.state", "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 134| strftime(buf, sizeof(buf), "%x %X", localtime(&now));
# 135| fprintf(f, "current time = %s\n", buf);
# 136|-> fprintf(f, "client_connected = %s\n", client ? "yes" : "no");
# 137| fprintf(f, "queue_length = %zu\n", q_queue_length(queue));
# 138| fprintf(f, "max_queue_length = %zu\n", q_max_queue_length(queue));
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:136:54: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/run/audit/af_unix.state", "w")’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:128:19: acquire_memory: allocated here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:130:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:133:22: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:137:9: throw: if ‘q_queue_length’ throws an exception...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:136:54: danger: ‘fopen("/run/audit/af_unix.state", "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 134| strftime(buf, sizeof(buf), "%x %X", localtime(&now));
# 135| fprintf(f, "current time = %s\n", buf);
# 136|-> fprintf(f, "client_connected = %s\n", client ? "yes" : "no");
# 137| fprintf(f, "queue_length = %zu\n", q_queue_length(queue));
# 138| fprintf(f, "max_queue_length = %zu\n", q_max_queue_length(queue));
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:446:45: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:373:6: enter_function: entry to ‘read_audit_record’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:409:12: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:414:23: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:414:23: call_function: calling ‘read_binary_record’ from ‘read_audit_record’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:414:23: return_function: returning to ‘read_audit_record’ from ‘read_binary_record’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:415:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:421:21: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:421:20: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:422:28: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:439:35: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:439:35: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:440:60: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:441:45: acquire_memory: allocated here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:442:36: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:443:41: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:446:45: throw: if ‘q_append’ throws an exception...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:446:45: danger: ‘buf’ leaks here; was allocated at [(17)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/16)
# 444| memcpy(buf + sizeof(*hdr), data,
# 445| hdr->size);
# 446|-> if (q_append(queue, buf, total) != 0) {
# 447| if (failed_append < 5)
# 448| syslog(LOG_ERR,
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:448:57: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:373:6: enter_function: entry to ‘read_audit_record’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:409:12: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:414:23: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:414:23: call_function: calling ‘read_binary_record’ from ‘read_audit_record’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:414:23: return_function: returning to ‘read_audit_record’ from ‘read_binary_record’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:415:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:421:21: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:421:20: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:422:28: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:439:35: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:439:35: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:440:60: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:441:45: acquire_memory: allocated here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:442:36: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:443:41: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:446:44: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:447:53: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:447:52: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:450:69: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:448:57: throw: if ‘syslog’ throws an exception...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:448:57: danger: ‘buf’ leaks here; was allocated at [(17)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/16)
# 446| if (q_append(queue, buf, total) != 0) {
# 447| if (failed_append < 5)
# 448|-> syslog(LOG_ERR,
# 449| "Dropping event - queue append failed (%s)",
# 450| strerror(errno));
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:484:61: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:409:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:409:12: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:462:28: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:463:37: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:463:36: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:470:51: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:473:49: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:478:61: acquire_memory: allocated here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:479:52: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:480:57: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:484:61: throw: if ‘q_append’ throws an exception...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:484:61: danger: ‘buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
# 482| memcpy(buf+sizeof(hdr),
# 483| rx_buf, len);
# 484|-> if (q_append(queue, buf,
# 485| total) != 0)
# 486| syslog(LOG_ERR,
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:486:65: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:409:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:409:12: branch_false: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:462:28: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:463:37: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:463:36: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:470:51: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:473:49: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:478:61: acquire_memory: allocated here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:479:52: branch_true: following ‘true’ branch (when ‘buf’ is non-NULL)...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:480:57: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:484:60: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:488:73: branch_true: ...to here
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:486:65: throw: if ‘syslog’ throws an exception...
audit-userspace-4.1.2/audisp/plugins/af_unix/audisp-af_unix.c:486:65: danger: ‘buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
# 484| if (q_append(queue, buf,
# 485| total) != 0)
# 486|-> syslog(LOG_ERR,
# 487| "Queue append failed (%s)",
# 488| strerror(errno));
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:88:14: warning[-Wanalyzer-malloc-leak]: leak of ‘auparse_init(1, "./test.log")’
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:85:14: acquire_memory: allocated here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:86:9: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:88:14: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:88:14: throw: if ‘ausearch_add_expression’ throws an exception...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:88:14: danger: ‘auparse_init(1, "./test.log")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 86| assert(au != NULL);
# 87|
# 88|-> rc = ausearch_add_expression(au,
# 89| "\\timestamp == ts:1.999",
# 90| &err, AUSEARCH_RULE_CLEAR);
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:120:14: warning[-Wanalyzer-malloc-leak]: leak of ‘id.cwd’
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:117:18: acquire_memory: allocated here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:118:21: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:119:17: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:120:14: throw: if ‘auparse_init’ throws an exception...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:120:14: danger: ‘id.cwd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 118| for (i = 0; i < sizeof(fuzz) - 1; i++)
# 119| seeds *= 3;
# 120|-> au = auparse_init(AUSOURCE_FILE, "/dev/null");
# 121| assert(au != NULL);
# 122| for (unsigned s = 0; s < seeds; s++) {
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: warning[-Wanalyzer-malloc-leak]: leak of ‘auparse_init(1, "/dev/null")’
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:118:21: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:119:17: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:120:14: acquire_memory: allocated here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:121:9: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:121:9: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:122:30: branch_true: following ‘true’ branch (when ‘seeds > s’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:122:30: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:124:29: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:124:29: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:128:17: throw: if ‘audit_encode_value’ throws an exception...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: danger: ‘auparse_init(1, "/dev/null")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 123| unsigned k = s;
# 124| for (i = 0; i < sizeof(fuzz) - 1; i++, k /= 3)
# 125|-> fuzz[i] = chars[k % 3];
# 126|
# 127| fuzz[sizeof(fuzz) - 1] = '\0';
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:128:17: warning[-Wanalyzer-malloc-leak]: leak of ‘id.cwd’
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:117:18: acquire_memory: allocated here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:118:21: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:119:17: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:121:9: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:121:9: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:122:30: branch_true: following ‘true’ branch (when ‘seeds > s’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:122:30: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:124:29: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:124:29: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:128:17: throw: if ‘audit_encode_value’ throws an exception...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:128:17: danger: ‘id.cwd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 126|
# 127| fuzz[sizeof(fuzz) - 1] = '\0';
# 128|-> audit_encode_value(val, fuzz, sizeof(fuzz));
# 129| id.val = val;
# 130| out = auparse_do_interpretation(au, AUPARSE_TYPE_ESCAPED_FILE,
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:130:23: warning[-Wanalyzer-malloc-leak]: leak of ‘id.cwd’
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:117:18: acquire_memory: allocated here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:118:21: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:119:17: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:121:9: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:121:9: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:122:30: branch_true: following ‘true’ branch (when ‘seeds > s’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:122:30: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:124:29: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:124:29: branch_true: following ‘true’ branch (when ‘i != 9’)...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:125:41: branch_true: ...to here
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:130:23: throw: if ‘auparse_do_interpretation’ throws an exception...
audit-userspace-4.1.2/auparse/test/auparse_extra_test.c:130:23: danger: ‘id.cwd’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 128| audit_encode_value(val, fuzz, sizeof(fuzz));
# 129| id.val = val;
# 130|-> out = auparse_do_interpretation(au, AUPARSE_TYPE_ESCAPED_FILE,
# 131| &id, AUPARSE_ESC_RAW);
# 132| assert(out != NULL);
Error: GCC_ANALYZER_WARNING (CWE-775):
audit-userspace-4.1.2/common/common.c:81:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/console", 1)'
audit-userspace-4.1.2/common/common.c:77:19: acquire_resource: opened here
audit-userspace-4.1.2/common/common.c:77:12: branch_false: following 'false' branch...
audit-userspace-4.1.2/common/common.c:80:9: branch_false: ...to here
audit-userspace-4.1.2/common/common.c:81:13: throw: if 'vdprintf' throws an exception...
audit-userspace-4.1.2/common/common.c:81:13: danger: 'open("/dev/console", 1)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 79|
# 80| va_start(args, fmt);
# 81|-> if (vdprintf(fd, fmt, args) < 0)
# 82| res = 0;
# 83|
Error: GCC_ANALYZER_WARNING (CWE-404):
audit-userspace-4.1.2/common/common.c:81:13: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
audit-userspace-4.1.2/common/common.c:77:12: branch_false: following 'false' branch...
audit-userspace-4.1.2/common/common.c:80:9: branch_false: ...to here
audit-userspace-4.1.2/common/common.c:80:9: acquire_resource: 'va_start' called here
audit-userspace-4.1.2/common/common.c:81:13: throw: if 'vdprintf' throws an exception...
audit-userspace-4.1.2/common/common.c:81:13: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 79|
# 80| va_start(args, fmt);
# 81|-> if (vdprintf(fd, fmt, args) < 0)
# 82| res = 0;
# 83|
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/src/aureport.c:202:13: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
audit-userspace-4.1.2/src/aureport.c:194:20: acquire_memory: allocated here
audit-userspace-4.1.2/src/aureport.c:195:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
audit-userspace-4.1.2/src/aureport.c:202:13: branch_false: ...to here
audit-userspace-4.1.2/src/aureport.c:202:13: throw: if ‘audit_log_list’ throws an exception...
audit-userspace-4.1.2/src/aureport.c:202:13: danger: ‘filename’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 200|
# 201| /* Count the logs */
# 202|-> if (audit_log_list(config.log_file, &logs, &log_cnt)) {
# 203| fprintf(stderr, "No memory\n");
# 204| free(filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/src/aureport.c:218:28: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
audit-userspace-4.1.2/src/aureport.c:194:20: acquire_memory: allocated here
audit-userspace-4.1.2/src/aureport.c:195:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
audit-userspace-4.1.2/src/aureport.c:202:13: branch_false: ...to here
audit-userspace-4.1.2/src/aureport.c:202:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/aureport.c:209:13: branch_false: ...to here
audit-userspace-4.1.2/src/aureport.c:209:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/aureport.c:218:28: branch_false: ...to here
audit-userspace-4.1.2/src/aureport.c:218:28: throw: if ‘audit_log_find_start’ throws an exception...
audit-userspace-4.1.2/src/aureport.c:218:28: danger: ‘filename’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 216|
# 217| /* Locate the starting file that is in range */
# 218|-> files_to_process = audit_log_find_start(logs, log_cnt, start_time);
# 219| audit_log_free(logs, log_cnt);
# 220|
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/src/aureport.c:219:9: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
audit-userspace-4.1.2/src/aureport.c:194:20: acquire_memory: allocated here
audit-userspace-4.1.2/src/aureport.c:195:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
audit-userspace-4.1.2/src/aureport.c:202:13: branch_false: ...to here
audit-userspace-4.1.2/src/aureport.c:202:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/aureport.c:209:13: branch_false: ...to here
audit-userspace-4.1.2/src/aureport.c:209:12: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/aureport.c:218:28: branch_false: ...to here
audit-userspace-4.1.2/src/aureport.c:219:9: throw: if ‘audit_log_free’ throws an exception...
audit-userspace-4.1.2/src/aureport.c:219:9: danger: ‘filename’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 217| /* Locate the starting file that is in range */
# 218| files_to_process = audit_log_find_start(logs, log_cnt, start_time);
# 219|-> audit_log_free(logs, log_cnt);
# 220|
# 221| /* Got it, now process logs from last to first */
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/src/ausearch-parse.c:2902:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
audit-userspace-4.1.2/src/ausearch-parse.c:2879:5: enter_function: entry to ‘audit_log_list’
audit-userspace-4.1.2/src/ausearch-parse.c:2889:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
audit-userspace-4.1.2/src/ausearch-parse.c:2892:9: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch-parse.c:2898:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/ausearch-parse.c:2900:21: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch-parse.c:2900:20: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/src/ausearch-parse.c:2901:25: branch_true: ...to here
audit-userspace-4.1.2/src/ausearch-parse.c:2903:20: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
audit-userspace-4.1.2/src/ausearch-parse.c:2909:21: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch-parse.c:2909:34: acquire_memory: allocated here
audit-userspace-4.1.2/src/ausearch-parse.c:2910:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/ausearch-parse.c:2915:17: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch-parse.c:2898:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/ausearch-parse.c:2900:21: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch-parse.c:2900:21: call_function: calling ‘read_first_ts’ from ‘audit_log_list’
audit-userspace-4.1.2/src/ausearch-parse.c:2900:21: return_function: returning to ‘audit_log_list’ from ‘read_first_ts’
audit-userspace-4.1.2/src/ausearch-parse.c:2900:20: branch_true: following ‘true’ branch...
audit-userspace-4.1.2/src/ausearch-parse.c:2901:25: branch_true: ...to here
audit-userspace-4.1.2/src/ausearch-parse.c:2902:23: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/10)
# 2900| if (read_first_ts(filename, &sec, &milli))
# 2901| sec = 0;
# 2902|-> tmp = realloc(list, (num + 1) * sizeof(*list));
# 2903| if (tmp == NULL) {
# 2904| free(filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/src/ausearch.c:325:21: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
audit-userspace-4.1.2/src/ausearch.c:257:20: acquire_memory: allocated here
audit-userspace-4.1.2/src/ausearch.c:258:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
audit-userspace-4.1.2/src/ausearch.c:268:13: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch.c:325:21: throw: if ‘audit_log_list’ throws an exception...
audit-userspace-4.1.2/src/ausearch.c:325:21: danger: ‘filename’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 323|
# 324| /* Count logs */
# 325|-> if (audit_log_list(config.log_file, &logs, &log_cnt)) {
# 326| fprintf(stderr, "No memory\n");
# 327| free(filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/src/ausearch.c:342:36: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
audit-userspace-4.1.2/src/ausearch.c:257:20: acquire_memory: allocated here
audit-userspace-4.1.2/src/ausearch.c:258:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
audit-userspace-4.1.2/src/ausearch.c:268:13: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch.c:325:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/ausearch.c:332:21: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch.c:332:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/ausearch.c:342:36: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch.c:342:36: throw: if ‘audit_log_find_start’ throws an exception...
audit-userspace-4.1.2/src/ausearch.c:342:36: danger: ‘filename’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 340|
# 341| /* Locate the starting file that's in range */
# 342|-> files_to_process = audit_log_find_start(logs, log_cnt,
# 343| start_time);
# 344| audit_log_free(logs, log_cnt);
Error: GCC_ANALYZER_WARNING (CWE-401):
audit-userspace-4.1.2/src/ausearch.c:344:17: warning[-Wanalyzer-malloc-leak]: leak of ‘filename’
audit-userspace-4.1.2/src/ausearch.c:257:20: acquire_memory: allocated here
audit-userspace-4.1.2/src/ausearch.c:258:12: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
audit-userspace-4.1.2/src/ausearch.c:268:13: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch.c:325:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/ausearch.c:332:21: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch.c:332:20: branch_false: following ‘false’ branch...
audit-userspace-4.1.2/src/ausearch.c:342:36: branch_false: ...to here
audit-userspace-4.1.2/src/ausearch.c:344:17: throw: if ‘audit_log_free’ throws an exception...
audit-userspace-4.1.2/src/ausearch.c:344:17: danger: ‘filename’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 342| files_to_process = audit_log_find_start(logs, log_cnt,
# 343| start_time);
# 344|-> audit_log_free(logs, log_cnt);
# 345| }
# 346|