Error: SHELLCHECK_WARNING (CWE-563): [#def1] /usr/share/xdp-tools/test_runner.sh:273:11: warning[SC2034]: pids appears unused. Verify use (or export if used externally). # 271| # 272| local OUTPUT_FILE="${STATEDIR}/proc/${PID}" # 273|-> local pids # 274| # 275| kill_process_group $PID Error: SHELLCHECK_WARNING (CWE-758): [#def2] /usr/share/xdp-tools/tests/libxdp/test-libxdp.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # 2| # 3| ALL_TESTS="test_link_so test_link_a test_old_dispatcher test_xdp_devbound test_xdp_frags test_xsk_prog_refcnt_bpffs test_xsk_prog_refcnt_legacy test_xsk_non_privileged test_link_detach test_xsk_umem_flags" Error: SHELLCHECK_WARNING (CWE-563): [#def3] /usr/share/xdp-tools/tests/libxdp/test-libxdp.sh:3:1: warning[SC2034]: ALL_TESTS appears unused. Verify use (or export if used externally). # 1| # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # 2| # 3|-> ALL_TESTS="test_link_so test_link_a test_old_dispatcher test_xdp_devbound test_xdp_frags test_xsk_prog_refcnt_bpffs test_xsk_prog_refcnt_legacy test_xsk_non_privileged test_link_detach test_xsk_umem_flags" # 4| # 5| TESTS_DIR=$(dirname "${BASH_SOURCE[0]}") Error: SHELLCHECK_WARNING (CWE-563): [#def4] /usr/share/xdp-tools/tests/xdp-bench/test-xdp-bench.sh:3:1: warning[SC2034]: ALL_TESTS appears unused. Verify use (or export if used externally). # 1| XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2| XDP_BENCH=${XDP_BENCH:-./xdp-bench} # 3|-> ALL_TESTS="test_drop test_pass test_tx test_xdp_load_bytes test_rxq_stats test_redirect test_redirect_cpu test_redirect_map test_redirect_map_egress test_redirect_multi test_redirect_multi_egress test_xsk_drop test_xsk_tx" # 4| # 5| test_basic() Error: SHELLCHECK_WARNING: [#def5] /usr/share/xdp-tools/tests/xdp-bench/test-xdp-bench.sh:185:13: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten. # 183| if [ "$hugepg" -lt "8" ]; then # 184| echo 8 > /proc/sys/vm/nr_hugepages # 185|-> res=$? # 186| else # 187| res=0 Error: SHELLCHECK_WARNING (CWE-563): [#def6] /usr/share/xdp-tools/tests/xdp-trafficgen/test-xdp-trafficgen.sh:3:1: warning[SC2034]: ALL_TESTS appears unused. Verify use (or export if used externally). # 1| XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2| XDP_TRAFFICGEN=${XDP_TRAFFICGEN:-./xdp-trafficgen} # 3|-> ALL_TESTS="test_udp test_tcp test_no_support test_xsk_udp" # 4| # 5| PIDS="" Error: SHELLCHECK_WARNING: [#def7] /usr/share/xdp-tools/tests/xdp-trafficgen/test-xdp-trafficgen.sh:71:13: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten. # 69| if [ "$hugepg" -lt "8" ]; then # 70| echo 8 > /proc/sys/vm/nr_hugepages # 71|-> res=$? # 72| else # 73| res=0 Error: SHELLCHECK_WARNING (CWE-563): [#def8] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:10:1: warning[SC2034]: TEST_RETRIES appears unused. Verify use (or export if used externally). # 8| XDPDUMP=${XDPDUMP:-./xdpdump} # 9| XDP_LOADER=${XDP_LOADER:-../xdp-loader/xdp-loader} # 10|-> TEST_RETRIES=3 # 11| # 12| RESULT="" Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] xdp-tools-1.6.0/lib/util/params.c:604:41: warning[-Wanalyzer-malloc-leak]: leak of ‘new_options’ xdp-tools-1.6.0/lib/util/params.c:580:34: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/params.c:581:17: branch_true: ...to here xdp-tools-1.6.0/lib/util/params.c:583:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/params.c:584:26: branch_true: ...to here xdp-tools-1.6.0/lib/util/params.c:591:23: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/params.c:592:12: branch_false: following ‘false’ branch (when ‘new_options’ is non-NULL)... xdp-tools-1.6.0/lib/util/params.c:595:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/params.c:598:9: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/params.c:599:21: branch_true: ...to here xdp-tools-1.6.0/lib/util/params.c:601:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/params.c:601:20: branch_true: ...to here xdp-tools-1.6.0/lib/util/params.c:602:39: branch_true: following ‘true’ branch (when ‘c > i’)... xdp-tools-1.6.0/lib/util/params.c:603:37: branch_true: ...to here xdp-tools-1.6.0/lib/util/params.c:604:41: throw: if ‘logging_print’ throws an exception... xdp-tools-1.6.0/lib/util/params.c:604:41: danger: ‘new_options’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) # 602| for (i = buf; i < c; i++) { # 603| if (*i == opt->short_opt) { # 604|-> pr_warn("Duplicate option char: %c\n", # 605| opt->short_opt); # 606| goto err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] xdp-tools-1.6.0/lib/util/xdpsock.c:277:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: call_function: calling ‘get_interrupt_number’ from ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: return_function: returning to ‘xsk_ctx__create’ from ‘get_interrupt_number’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: call_function: calling ‘get_irqs’ from ‘xsk_ctx__create’ # 275| if (f_count_proc == NULL) { # 276| ret = -errno; # 277|-> pr_warn("Failed to open %s: %s\n", count_path, strerror(-ret)); # 278| return ret; # 279| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] xdp-tools-1.6.0/lib/util/xdpsock.c:283:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&count_path, "r")’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: call_function: calling ‘get_interrupt_number’ from ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: return_function: returning to ‘xsk_ctx__create’ from ‘get_interrupt_number’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: call_function: calling ‘get_irqs’ from ‘xsk_ctx__create’ # 281| if (fgets(line, sizeof(line), f_count_proc) == NULL || # 282| line[strlen(line) - 1] != '\n') { # 283|-> pr_warn("Error reading from %s\n", count_path); # 284| ret = -ENOENT; # 285| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] xdp-tools-1.6.0/lib/util/xdpsock.c:283:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: call_function: calling ‘get_interrupt_number’ from ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: return_function: returning to ‘xsk_ctx__create’ from ‘get_interrupt_number’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: call_function: calling ‘get_irqs’ from ‘xsk_ctx__create’ # 281| if (fgets(line, sizeof(line), f_count_proc) == NULL || # 282| line[strlen(line) - 1] != '\n') { # 283|-> pr_warn("Error reading from %s\n", count_path); # 284| ret = -ENOENT; # 285| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] xdp-tools-1.6.0/lib/util/xdpsock.c:283:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&count_path, "r")’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: call_function: calling ‘get_interrupt_number’ from ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: return_function: returning to ‘xsk_ctx__create’ from ‘get_interrupt_number’ xdp-tools-1.6.0/lib/util/xdpsock.c:1780:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1781:31: call_function: calling ‘get_irqs’ from ‘xsk_ctx__create’ # 281| if (fgets(line, sizeof(line), f_count_proc) == NULL || # 282| line[strlen(line) - 1] != '\n') { # 283|-> pr_warn("Error reading from %s\n", count_path); # 284| ret = -ENOENT; # 285| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] xdp-tools-1.6.0/lib/util/xdpsock.c:1012:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1744:16: call_function: calling ‘xsk_configure_umem’ from ‘xsk_ctx__create’ # 1010| return ERR_PTR(-errno); # 1011| # 1012|-> ret = xsk_umem__create(&umem->umem, buffer, size, &umem->fq, &umem->cq, # 1013| &cfg); # 1014| if (ret) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] xdp-tools-1.6.0/lib/util/xdpsock.c:1012:15: warning[-Wanalyzer-malloc-leak]: leak of ‘umem’ xdp-tools-1.6.0/lib/util/xdpsock.c:1008:16: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1009:12: branch_false: following ‘false’ branch (when ‘umem’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1012:15: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1012:15: throw: if ‘xsk_umem__create’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1012:15: danger: ‘umem’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0) # 1010| return ERR_PTR(-errno); # 1011| # 1012|-> ret = xsk_umem__create(&umem->umem, buffer, size, &umem->fq, &umem->cq, # 1013| &cfg); # 1014| if (ret) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] xdp-tools-1.6.0/lib/util/xdpsock.c:1076:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: call_function: calling ‘xsk_configure_socket’ from ‘xsk_ctx__create’ # 1074| rxr = rx ? &xsk->rx : NULL; # 1075| txr = tx ? &xsk->tx : NULL; # 1076|-> ret = xsk_socket__create(&xsk->xsk, opt->iface.ifname, opt->queue_idx, # 1077| umem->umem, rxr, txr, &cfg); # 1078| if (ret) Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] xdp-tools-1.6.0/lib/util/xdpsock.c:1076:15: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.6.0/lib/util/xdpsock.c:1056:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1057:12: branch_false: following ‘false’ branch (when ‘xsk’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1060:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1074:15: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1075:15: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1075:15: branch_false: following ‘false’ branch (when ‘tx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1076:15: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1076:15: throw: if ‘xsk_socket__create’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1076:15: danger: ‘xsk’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0) # 1074| rxr = rx ? &xsk->rx : NULL; # 1075| txr = tx ? &xsk->tx : NULL; # 1076|-> ret = xsk_socket__create(&xsk->xsk, opt->iface.ifname, opt->queue_idx, # 1077| umem->umem, rxr, txr, &cfg); # 1078| if (ret) Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] xdp-tools-1.6.0/lib/util/xdpsock.c:1549:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1789:57: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1790:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1793:24: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1795:12: branch_false: following ‘false’ branch (when ‘bench != 1’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1799:32: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1802:48: call_function: calling ‘load_xdp_program’ from ‘xsk_ctx__create’ # 1547| if (!skel) { # 1548| err = -errno; # 1549|-> pr_warn("Failed to load skeleton: %s\n", strerror(-err)); # 1550| goto err; # 1551| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] xdp-tools-1.6.0/lib/util/xdpsock.c:1604:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1789:57: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1790:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1793:24: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1795:12: branch_false: following ‘false’ branch (when ‘bench != 1’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1799:32: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1802:48: call_function: calling ‘load_xdp_program’ from ‘xsk_ctx__create’ # 1602| return ret_prog; # 1603| err: # 1604|-> xdp_program__close(xdp_prog); # 1605| xdpsock__destroy(skel); # 1606| return ERR_PTR(err); Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] xdp-tools-1.6.0/lib/util/xdpsock.c:1614:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1768:29: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1769:71: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1769:31: call_function: calling ‘apply_busy_poll_opts’ from ‘xsk_ctx__create’ # 1612| # 1613| sock_opt = 1; # 1614|-> if (setsockopt(xsk_socket__fd(xsk), SOL_SOCKET, SO_PREFER_BUSY_POLL, # 1615| (void *)&sock_opt, sizeof(sock_opt)) < 0) # 1616| return -errno; Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] xdp-tools-1.6.0/lib/util/xdpsock.c:1619:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1768:29: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1769:71: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1769:31: call_function: calling ‘apply_busy_poll_opts’ from ‘xsk_ctx__create’ # 1617| # 1618| sock_opt = 20; # 1619|-> if (setsockopt(xsk_socket__fd(xsk), SOL_SOCKET, SO_BUSY_POLL, # 1620| (void *)&sock_opt, sizeof(sock_opt)) < 0) # 1621| return -errno; Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] xdp-tools-1.6.0/lib/util/xdpsock.c:1624:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1768:29: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1769:71: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1769:31: call_function: calling ‘apply_busy_poll_opts’ from ‘xsk_ctx__create’ # 1622| # 1623| sock_opt = batch_size; # 1624|-> if (setsockopt(xsk_socket__fd(xsk), SOL_SOCKET, SO_BUSY_POLL_BUDGET, # 1625| (void *)&sock_opt, sizeof(sock_opt)) < 0) # 1626| return -errno; Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] xdp-tools-1.6.0/lib/util/xdpsock.c:1694:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1789:57: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1789:15: call_function: calling ‘xsk_set_sched_priority’ from ‘xsk_ctx__create’ # 1692| ret = sched_setscheduler(0, sched_policy, &schparam); # 1693| if (ret) # 1694|-> pr_warn("Error(%d) in setting priority(%d): %s\n", # 1695| errno, sched_prio, strerror(errno)); # 1696| Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] xdp-tools-1.6.0/lib/util/xdpsock.c:1739:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_true: following ‘true’ branch (when ‘bufs == 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1739:17: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1739:17: throw: if ‘logging_print’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1739:17: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0) # 1737| MAP_PRIVATE | MAP_ANONYMOUS | mmap_flags, -1, 0); # 1738| if (bufs == MAP_FAILED) { # 1739|-> pr_warn("ERROR: mmap failed\n"); # 1740| goto err; # 1741| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] xdp-tools-1.6.0/lib/util/xdpsock.c:1771:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:12: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1768:29: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1769:71: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1770:28: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1771:33: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1771:33: throw: if ‘logging_print’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1771:33: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0) # 1769| ret = apply_busy_poll_opts(ctx->xsks[i]->xsk, opt->batch_size); # 1770| if (ret) { # 1771|-> pr_warn("ERROR: Couldn't apply busy poll options: %s\n", # 1772| strerror(-ret)); # 1773| goto err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] xdp-tools-1.6.0/lib/util/xdpsock.c:1783:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1780:21: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1780:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1783:25: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1783:25: throw: if ‘logging_print’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1783:25: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0) # 1781| ret = get_irqs(ctx); # 1782| if (ret < 0) { # 1783|-> pr_warn("ERROR: Failed to get irqs for %s\n", opt->irq_string); # 1784| goto err; # 1785| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] xdp-tools-1.6.0/lib/util/xdpsock.c:1842:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_true: following ‘true’ branch (when ‘bench <= 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_true: following ‘true’ branch (when ‘rx != 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1753:52: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1761:31: call_function: inlined call to ‘PTR_ERR’ from ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1841:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1843:37: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1842:17: throw: if ‘xdp_program__detach’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1842:17: danger: ‘ctx’ leaks here; was allocated at [(4)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/3) # 1840| err: # 1841| if (ctx->xdp_prog) { # 1842|-> xdp_program__detach(ctx->xdp_prog, ctx->opt.iface.ifindex, # 1843| ctx->opt.attach_mode, 0); # 1844| xdp_program__close(ctx->xdp_prog); Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] xdp-tools-1.6.0/lib/util/xdpsock.c:1844:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_true: following ‘true’ branch (when ‘bench <= 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_true: following ‘true’ branch (when ‘rx != 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1753:52: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1761:31: call_function: inlined call to ‘PTR_ERR’ from ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1841:12: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1843:37: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1844:17: throw: if ‘xdp_program__close’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1844:17: danger: ‘ctx’ leaks here; was allocated at [(4)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/3) # 1842| xdp_program__detach(ctx->xdp_prog, ctx->opt.iface.ifindex, # 1843| ctx->opt.attach_mode, 0); # 1844|-> xdp_program__close(ctx->xdp_prog); # 1845| } # 1846| for (i = 0; i < ctx->num_socks; i++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] xdp-tools-1.6.0/lib/util/xdpsock.c:1847:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_true: following ‘true’ branch (when ‘bench <= 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_true: following ‘true’ branch (when ‘rx != 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1753:52: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1761:31: call_function: inlined call to ‘PTR_ERR’ from ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1846:21: branch_true: following ‘true’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1847:36: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1847:17: throw: if ‘xsk_socket__delete’ throws an exception... xdp-tools-1.6.0/lib/util/xdpsock.c:1847:17: danger: ‘ctx’ leaks here; was allocated at [(4)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/3) # 1845| } # 1846| for (i = 0; i < ctx->num_socks; i++) { # 1847|-> xsk_socket__delete(ctx->xsks[i]->xsk); # 1848| free(ctx->xsks[i]); # 1849| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:47:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1789:57: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1790:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1793:24: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1795:12: branch_false: following ‘false’ branch (when ‘bench != 1’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1799:32: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1802:48: call_function: calling ‘load_xdp_program’ from ‘xsk_ctx__create’ # 45| return; # 46| if (obj->skeleton) # 47|-> bpf_object__destroy_skeleton(obj->skeleton); # 48| free(obj); # 49| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:70:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.6.0/lib/util/xdpsock.c:1534:28: enter_function: entry to ‘load_xdp_program’ xdp-tools-1.6.0/lib/util/xdpsock.c:1546:16: call_function: inlined call to ‘xdpsock__open’ from ‘load_xdp_program’ # 68| goto err_out; # 69| # 70|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 71| if (err) # 72| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:70:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1789:57: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1790:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1793:24: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1795:12: branch_false: following ‘false’ branch (when ‘bench != 1’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1799:32: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1802:48: call_function: calling ‘load_xdp_program’ from ‘xsk_ctx__create’ # 68| goto err_out; # 69| # 70|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 71| if (err) # 72| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:70:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.6.0/lib/util/xdpsock.c:1534:28: enter_function: entry to ‘load_xdp_program’ xdp-tools-1.6.0/lib/util/xdpsock.c:1546:16: call_function: inlined call to ‘xdpsock__open’ from ‘load_xdp_program’ # 68| goto err_out; # 69| # 70|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 71| if (err) # 72| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:179:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.6.0/lib/util/xdpsock.c:1534:28: enter_function: entry to ‘load_xdp_program’ xdp-tools-1.6.0/lib/util/xdpsock.c:1546:16: call_function: inlined call to ‘xdpsock__open’ from ‘load_xdp_program’ # 177| return 0; # 178| err: # 179|-> bpf_object__destroy_skeleton(s); # 180| return err; # 181| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:179:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: enter_function: entry to ‘xsk_ctx__create’ xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: following ‘false’ branch (when ‘bench > 2’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1700:17: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1731:15: acquire_memory: allocated here xdp-tools-1.6.0/lib/util/xdpsock.c:1732:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)... xdp-tools-1.6.0/lib/util/xdpsock.c:1737:21: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1738:12: branch_false: following ‘false’ branch (when ‘bufs != 18446744073709551615’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1745:35: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1746:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1752:12: branch_false: following ‘false’ branch (when ‘rx == 0’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1758:9: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_true: following ‘true’ branch (when ‘num_xsks > i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1759:47: branch_true: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1760:20: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1764:27: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1758:21: branch_false: following ‘false’ branch (when ‘num_xsks <= i’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1767:13: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1778:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1789:57: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1790:12: branch_false: following ‘false’ branch... xdp-tools-1.6.0/lib/util/xdpsock.c:1793:24: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1795:12: branch_false: following ‘false’ branch (when ‘bench != 1’)... xdp-tools-1.6.0/lib/util/xdpsock.c:1799:32: branch_false: ...to here xdp-tools-1.6.0/lib/util/xdpsock.c:1802:48: call_function: calling ‘load_xdp_program’ from ‘xsk_ctx__create’ # 177| return 0; # 178| err: # 179|-> bpf_object__destroy_skeleton(s); # 180| return err; # 181| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:179:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.6.0/lib/util/xdpsock.c:1534:28: enter_function: entry to ‘load_xdp_program’ xdp-tools-1.6.0/lib/util/xdpsock.c:1546:16: call_function: inlined call to ‘xdpsock__open’ from ‘load_xdp_program’ # 177| return 0; # 178| err: # 179|-> bpf_object__destroy_skeleton(s); # 180| return err; # 181| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] xdp-tools-1.6.0/lib/util/xdpsock.skel.h:179:9: warning[-Wanalyzer-malloc-leak]: leak of ‘s’ xdp-tools-1.6.0/lib/util/xdpsock.c:1534:28: enter_function: entry to ‘load_xdp_program’ xdp-tools-1.6.0/lib/util/xdpsock.c:1546:16: call_function: inlined call to ‘xdpsock__open’ from ‘load_xdp_program’ # 177| return 0; # 178| err: # 179|-> bpf_object__destroy_skeleton(s); # 180| return err; # 181| }
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-188.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | xdp-tools-1.5.6-1.fc43 |
| diffbase-store-results-to | /tmp/tmpi5jq57il/xdp-tools-1.5.6-1.fc43.tar.xz |
| diffbase-time-created | 2026-01-08 22:16:31 |
| diffbase-time-finished | 2026-01-08 22:19:04 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpi5jq57il/xdp-tools-1.5.6-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpi5jq57il/xdp-tools-1.5.6-1.fc43.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-188.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | xdp-tools-1.6.0-1.fc44 |
| store-results-to | /tmp/tmpei3a679n/xdp-tools-1.6.0-1.fc44.tar.xz |
| time-created | 2026-01-08 22:19:36 |
| time-finished | 2026-01-08 22:21:39 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpei3a679n/xdp-tools-1.6.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpei3a679n/xdp-tools-1.6.0-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |