Error: SHELLCHECK_WARNING (CWE-758): [#def1] /usr/share/xdp-tools/test_config.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> # Test config for having tools in $PATH - to be installed along with the # 2| # test runners in /usr/share/xdp-tools # 3| Error: SHELLCHECK_WARNING (CWE-563): [#def2] /usr/share/xdp-tools/test_config.sh:4:1: warning[SC2034]: XDPDUMP appears unused. Verify use (or export if used externally). # 2| # test runners in /usr/share/xdp-tools # 3| # 4|-> XDPDUMP=xdpdump # 5| XDP_BENCH=xdp-bench # 6| XDP_FILTER=xdp-filter Error: SHELLCHECK_WARNING (CWE-563): [#def3] /usr/share/xdp-tools/test_config.sh:5:1: warning[SC2034]: XDP_BENCH appears unused. Verify use (or export if used externally). # 3| # 4| XDPDUMP=xdpdump # 5|-> XDP_BENCH=xdp-bench # 6| XDP_FILTER=xdp-filter # 7| XDP_FORWARD=xdp-forward Error: SHELLCHECK_WARNING (CWE-563): [#def4] /usr/share/xdp-tools/test_config.sh:6:1: warning[SC2034]: XDP_FILTER appears unused. Verify use (or export if used externally). # 4| XDPDUMP=xdpdump # 5| XDP_BENCH=xdp-bench # 6|-> XDP_FILTER=xdp-filter # 7| XDP_FORWARD=xdp-forward # 8| XDP_LOADER=xdp-loader Error: SHELLCHECK_WARNING (CWE-563): [#def5] /usr/share/xdp-tools/test_config.sh:7:1: warning[SC2034]: XDP_FORWARD appears unused. Verify use (or export if used externally). # 5| XDP_BENCH=xdp-bench # 6| XDP_FILTER=xdp-filter # 7|-> XDP_FORWARD=xdp-forward # 8| XDP_LOADER=xdp-loader # 9| XDP_MONITOR=xdp-monitor Error: SHELLCHECK_WARNING (CWE-563): [#def6] /usr/share/xdp-tools/test_config.sh:8:1: warning[SC2034]: XDP_LOADER appears unused. Verify use (or export if used externally). # 6| XDP_FILTER=xdp-filter # 7| XDP_FORWARD=xdp-forward # 8|-> XDP_LOADER=xdp-loader # 9| XDP_MONITOR=xdp-monitor # 10| XDP_TRAFFICGEN=xdp-trafficgen Error: SHELLCHECK_WARNING (CWE-563): [#def7] /usr/share/xdp-tools/test_config.sh:9:1: warning[SC2034]: XDP_MONITOR appears unused. Verify use (or export if used externally). # 7| XDP_FORWARD=xdp-forward # 8| XDP_LOADER=xdp-loader # 9|-> XDP_MONITOR=xdp-monitor # 10| XDP_TRAFFICGEN=xdp-trafficgen Error: SHELLCHECK_WARNING (CWE-563): [#def8] /usr/share/xdp-tools/test_config.sh:10:1: warning[SC2034]: XDP_TRAFFICGEN appears unused. Verify use (or export if used externally). # 8| XDP_LOADER=xdp-loader # 9| XDP_MONITOR=xdp-monitor # 10|-> XDP_TRAFFICGEN=xdp-trafficgen Error: SHELLCHECK_WARNING (CWE-563): [#def9] /usr/share/xdp-tools/test_runner.sh:19:1: warning[SC2034]: IP6_FULL_PREFIX_SIZE appears unused. Verify use (or export if used externally). # 17| IP6_SUBNET=fc42:dead:cafe # must have exactly three :-separated elements # 18| IP6_PREFIX_SIZE=64 # Size of assigned prefixes # 19|-> IP6_FULL_PREFIX_SIZE=48 # Size of IP6_SUBNET # 20| IP4_SUBNET=10.11 # 21| IP4_PREFIX_SIZE=24 # Size of assigned prefixes Error: SHELLCHECK_WARNING (CWE-563): [#def10] /usr/share/xdp-tools/test_runner.sh:22:1: warning[SC2034]: IP4_FULL_PREFIX_SIZE appears unused. Verify use (or export if used externally). # 20| IP4_SUBNET=10.11 # 21| IP4_PREFIX_SIZE=24 # Size of assigned prefixes # 22|-> IP4_FULL_PREFIX_SIZE=16 # Size of IP4_SUBNET # 23| GENERATED_NAME_PREFIX="xdptest" # 24| ALL_TESTS="" Error: SHELLCHECK_WARNING (CWE-563): [#def11] /usr/share/xdp-tools/test_runner.sh:37:5: warning[SC2034]: PING6 appears unused. Verify use (or export if used externally). # 35| PING6=ping6 # 36| else # 37|-> PING6=ping # 38| fi # 39| Error: SHELLCHECK_WARNING (CWE-563): [#def12] /usr/share/xdp-tools/test_runner.sh:45:1: warning[SC2034]: CMD appears unused. Verify use (or export if used externally). # 43| # Global state variables that will be set by options etc below # 44| STATEDIR= # 45|-> CMD= # 46| NS= # 47| NS_NAMES=() Error: SHELLCHECK_WARNING (CWE-563): [#def13] /usr/share/xdp-tools/test_runner.sh:253:11: warning[SC2034]: pids appears unused. Verify use (or export if used externally). # 251| # 252| local OUTPUT_FILE="${STATEDIR}/proc/${PID}" # 253|-> local pids # 254| # 255| kill_process_group $PID Error: SHELLCHECK_WARNING (CWE-571): [#def14] /usr/share/xdp-tools/test_runner.sh:266:11: warning[SC2155]: Declare and assign separately to avoid masking return values. # 264| check_prereq() # 265| { # 266|-> local max_locked_mem=$(ulimit -l) # 267| # 268| for t in $NEEDED_TOOLS; do Error: SHELLCHECK_WARNING (CWE-569): [#def15] /usr/share/xdp-tools/test_runner.sh:324:14: warning[SC2048]: Use "${array[@]}" (with quotes) to prevent whitespace problems. # 322| local sysctls_on=(forwarding) # 323| # 324|-> for s in ${sysctls_off_v6[*]}; do # 325| $nscmd sysctl -w net.ipv6.conf.$iface.${s}=0 >/dev/null # 326| done Error: SHELLCHECK_WARNING (CWE-569): [#def16] /usr/share/xdp-tools/test_runner.sh:327:14: warning[SC2048]: Use "${array[@]}" (with quotes) to prevent whitespace problems. # 325| $nscmd sysctl -w net.ipv6.conf.$iface.${s}=0 >/dev/null # 326| done # 327|-> for s in ${sysctls_on[*]}; do # 328| $nscmd sysctl -w net.ipv6.conf.$iface.${s}=1 >/dev/null # 329| $nscmd sysctl -w net.ipv6.conf.all.${s}=1 >/dev/null Error: SHELLCHECK_WARNING (CWE-140): [#def17] /usr/share/xdp-tools/test_runner.sh:385:22: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. # 383| ip -n "$nsname" -6 route add default via $OUTSIDE_IP6 dev veth0 # 384| # 385|-> ALL_INSIDE_IP4+=($INSIDE_IP4) # 386| ALL_INSIDE_IP6+=($INSIDE_IP6) # 387| } Error: SHELLCHECK_WARNING (CWE-140): [#def18] /usr/share/xdp-tools/test_runner.sh:386:22: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. # 384| # 385| ALL_INSIDE_IP4+=($INSIDE_IP4) # 386|-> ALL_INSIDE_IP6+=($INSIDE_IP6) # 387| } # 388| Error: SHELLCHECK_WARNING (CWE-140): [#def19] /usr/share/xdp-tools/test_runner.sh:400:20: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. # 398| nsname=$(gen_nsname) # 399| init_ns $nsname $i # 400|-> NS_NAMES+=($nsname) # 401| done # 402| Error: SHELLCHECK_WARNING (CWE-138): [#def20] /usr/share/xdp-tools/test_runner.sh:452:20: error[SC2145]: Argument mixes string and array. Use * or separate argument. # 450| "$@" # 451| ret=$? # 452|-> echo "Command '$@' exited with status $ret" # 453| echo "" # 454| if [ "$ret" -ne "0" ]; then Error: SHELLCHECK_WARNING (CWE-563): [#def21] /usr/share/xdp-tools/test_runner.sh:560:1: warning[SC2034]: TOOL_TESTS_DIR appears unused. Verify use (or export if used externally). # 558| source "$TEST_DEFINITIONS" # 559| # 560|-> TOOL_TESTS_DIR="$(dirname "$TEST_DEFINITIONS")" # 561| # 562| shift Error: SHELLCHECK_WARNING (CWE-758): [#def22] /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_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): [#def23] /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_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-758): [#def24] /usr/share/xdp-tools/tests/xdp-bench/test-xdp-bench.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 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" Error: SHELLCHECK_WARNING (CWE-563): [#def25] /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" # 4| # 5| test_basic() Error: SHELLCHECK_WARNING (CWE-758): [#def26] /usr/share/xdp-tools/tests/xdp-filter/test-xdp-filter.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2| XDP_FILTER=${XDP_FILTER:-./xdp-filter} # 3| ALL_TESTS="test_load test_print test_output_remove test_ports_allow test_ports_deny test_ipv6_allow test_ipv6_deny test_ipv4_allow test_ipv4_deny test_ether_allow test_ether_deny" Error: SHELLCHECK_WARNING (CWE-563): [#def27] /usr/share/xdp-tools/tests/xdp-filter/test-xdp-filter.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_FILTER=${XDP_FILTER:-./xdp-filter} # 3|-> ALL_TESTS="test_load test_print test_output_remove test_ports_allow test_ports_deny test_ipv6_allow test_ipv6_deny test_ipv4_allow test_ipv4_deny test_ether_allow test_ether_deny" # 4| # 5| try_feat() Error: SHELLCHECK_WARNING (CWE-563): [#def28] /usr/share/xdp-tools/tests/xdp-filter/test-xdp-filter.sh:357:18: warning[SC2034]: available appears unused. Verify use (or export if used externally). # 355| if [[ -z "${PYTHON:-}" ]]; then # 356| local -a possible=(python3 python) # 357|-> local -a available # 358| # 359| local found=0 Error: SHELLCHECK_WARNING (CWE-758): [#def29] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2| XDP_FORWARD=${XDP_FORWARD:-./xdp-forward} # 3| ALL_TESTS="test_ping test_load test_load_high_ifindex test_fwd_full test_fwd_direct test_flowtable" Error: SHELLCHECK_WARNING (CWE-563): [#def30] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.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_FORWARD=${XDP_FORWARD:-./xdp-forward} # 3|-> ALL_TESTS="test_ping test_load test_load_high_ifindex test_fwd_full test_fwd_direct test_flowtable" # 4| # 5| test_ping() Error: SHELLCHECK_WARNING (CWE-88): [#def31] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:20:33: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 18| { # 19| # 20|-> check_run $XDP_FORWARD load ${NS_NAMES[@]} # 21| check_run $XDP_FORWARD unload ${NS_NAMES[@]} # 22| } Error: SHELLCHECK_WARNING (CWE-88): [#def32] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:21:35: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 19| # 20| check_run $XDP_FORWARD load ${NS_NAMES[@]} # 21|-> check_run $XDP_FORWARD unload ${NS_NAMES[@]} # 22| } # 23| Error: SHELLCHECK_WARNING (CWE-563): [#def33] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:27:5: warning[SC2034]: i appears unused. Verify use (or export if used externally). # 25| { # 26| # Add a bunch of interfaces to run up the ifindex counter # 27|-> for i in $(seq 64); do # 28| ip link add dev veth-forw-test type veth # 29| ip link del dev veth-forw-test Error: SHELLCHECK_WARNING (CWE-88): [#def34] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:42:48: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 40| skip_if_missing_kernel_symbol veth_set_features # 41| # 42|-> check_run $XDP_FORWARD load -f fib -F full ${NS_NAMES[@]} # 43| for ip in "${ALL_INSIDE_IP4[@]}"; do # 44| check_run ns_exec ping -c 1 -W 2 $ip Error: SHELLCHECK_WARNING (CWE-88): [#def35] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:49:35: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 47| check_run ns_exec $PING6 -c 1 -W 2 $ip # 48| done # 49|-> check_run $XDP_FORWARD unload ${NS_NAMES[@]} # 50| } # 51| Error: SHELLCHECK_WARNING (CWE-88): [#def36] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:57:50: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 55| skip_if_missing_kernel_symbol veth_set_features # 56| # 57|-> check_run $XDP_FORWARD load -f fib -F direct ${NS_NAMES[@]} # 58| for ip in "${ALL_INSIDE_IP4[@]}"; do # 59| check_run ns_exec ping -c 1 -W 2 $ip Error: SHELLCHECK_WARNING (CWE-88): [#def37] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:64:35: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 62| check_run ns_exec $PING6 -c 1 -W 2 $ip # 63| done # 64|-> check_run $XDP_FORWARD unload ${NS_NAMES[@]} # 65| } # 66| Error: SHELLCHECK_WARNING (CWE-88): [#def38] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:76:14: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 74| # disable {tx,rx} checksum offload since it is not currently suported # 75| # by XDP_REDIRECT # 76|-> for n in ${NS_NAMES[@]}; do # 77| ip netns exec $n ethtool -K veth0 tx-checksumming off rx-checksumming off # 78| ethtool -K $n tx-checksumming off rx-checksumming off Error: SHELLCHECK_WARNING (CWE-88): [#def39] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:125:46: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 123| } # 124| EOF # 125|-> check_run $XDP_FORWARD load -f flowtable ${NS_NAMES[@]} # 126| # 127| PID=$(start_socat_ns "socat -dd -4 TCP-LISTEN:10000,reuseaddr,fork -") Error: SHELLCHECK_WARNING (CWE-88): [#def40] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:135:35: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 133| stop_background $PID # 134| # 135|-> check_run $XDP_FORWARD unload ${NS_NAMES[@]} # 136| } # 137| Error: SHELLCHECK_WARNING (CWE-88): [#def41] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:141:14: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 139| { # 140| # enable {tx,rx} checksum offload # 141|-> for n in ${NS_NAMES[@]}; do # 142| ip netns exec $n ethtool -K veth0 tx-checksumming on rx-checksumming on # 143| ethtool -K $n tx-checksumming on rx-checksumming on Error: SHELLCHECK_WARNING (CWE-88): [#def42] /usr/share/xdp-tools/tests/xdp-forward/test-xdp-forward.sh:146:29: error[SC2068]: Double quote array expansions to avoid re-splitting elements. # 144| done >/dev/null 2>&1 # 145| { # 146|-> $XDP_FORWARD unload ${NS_NAMES[@]} # 147| $XDP_LOADER unload $NS --all # 148| check_run ip netns exec ${NS_NAMES[-1]} nft flush ruleset Error: SHELLCHECK_WARNING (CWE-758): [#def43] /usr/share/xdp-tools/tests/xdp-loader/test-xdp-loader.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2| ALL_TESTS="test_load test_section test_prog_name test_load_adjust_tail test_load_multi test_load_incremental test_load_clobber test_features" # 3| Error: SHELLCHECK_WARNING (CWE-563): [#def44] /usr/share/xdp-tools/tests/xdp-loader/test-xdp-loader.sh:2:1: warning[SC2034]: ALL_TESTS appears unused. Verify use (or export if used externally). # 1| XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2|-> ALL_TESTS="test_load test_section test_prog_name test_load_adjust_tail test_load_multi test_load_incremental test_load_clobber test_features" # 3| # 4| test_load() Error: SHELLCHECK_WARNING (CWE-563): [#def45] /usr/share/xdp-tools/tests/xdp-loader/test-xdp-loader.sh:37:11: warning[SC2034]: iface appears unused. Verify use (or export if used externally). # 35| check_progs_loaded() # 36| { # 37|-> local iface="$1" # 38| local num=$2 # 39| local num_loaded Error: SHELLCHECK_WARNING (CWE-758): [#def46] /usr/share/xdp-tools/tests/xdp-monitor/test-xdp-monitor.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2| XDP_MONITOR=${XDP_MONITOR:-./xdp-monitor} # 3| ALL_TESTS="test_monitor" Error: SHELLCHECK_WARNING (CWE-563): [#def47] /usr/share/xdp-tools/tests/xdp-monitor/test-xdp-monitor.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_MONITOR=${XDP_MONITOR:-./xdp-monitor} # 3|-> ALL_TESTS="test_monitor" # 4| # 5| test_monitor() Error: SHELLCHECK_WARNING (CWE-758): [#def48] /usr/share/xdp-tools/tests/xdp-trafficgen/test-xdp-trafficgen.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> XDP_LOADER=${XDP_LOADER:-./xdp-loader} # 2| XDP_TRAFFICGEN=${XDP_TRAFFICGEN:-./xdp-trafficgen} # 3| ALL_TESTS="test_udp test_tcp test_no_support" Error: SHELLCHECK_WARNING (CWE-563): [#def49] /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" # 4| # 5| PIDS="" Error: SHELLCHECK_WARNING (CWE-563): [#def50] /usr/share/xdp-tools/tests/xdp-trafficgen/test-xdp-trafficgen.sh:5:1: warning[SC2034]: PIDS appears unused. Verify use (or export if used externally). # 3| ALL_TESTS="test_udp test_tcp test_no_support" # 4| # 5|-> PIDS="" # 6| # 7| skip_if_missing_kernel_support() Error: SHELLCHECK_WARNING (CWE-758): [#def51] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> # # 2| # Test scrip to do basic xdpdump checks # 3| # Error: SHELLCHECK_WARNING (CWE-563): [#def52] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:6:1: warning[SC2034]: ALL_TESTS appears unused. Verify use (or export if used externally). # 4| # shellcheck disable=2039 # 5| # # 6|-> ALL_TESTS="test_help test_interfaces test_capt_pcap test_capt_pcapng test_capt_term test_exitentry test_snap test_multi_pkt test_perf_wakeup test_promiscuous_selfload test_promiscuous_preload test_none_xdp test_pname_parse test_multi_prog test_xdp_load" # 7| # 8| XDPDUMP=${XDPDUMP:-./xdpdump} Error: SHELLCHECK_WARNING (CWE-563): [#def53] /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: SHELLCHECK_WARNING (CWE-398): [#def54] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:76:28: error[SC1087]: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). # 74| local NO_PROG_REGEX="($NS +<No XDP program loaded!>)" # 75| if is_multiprog_supported; then # 76|-> local PROG_REGEX="($NS[[:space:]]+xdp_dispatcher.+xdp_drop)" # 77| else # 78| local PROG_REGEX="($NS[[:space:]]+xdp_drop)" Error: SHELLCHECK_WARNING (CWE-398): [#def55] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:78:28: error[SC1087]: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). # 76| local PROG_REGEX="($NS[[:space:]]+xdp_dispatcher.+xdp_drop)" # 77| else # 78|-> local PROG_REGEX="($NS[[:space:]]+xdp_drop)" # 79| fi # 80| Error: SHELLCHECK_WARNING (CWE-571): [#def56] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:138:11: warning[SC2155]: Declare and assign separately to avoid masking return values. # 136| local PCAP_FILE="/tmp/${NS}_PID_$$_$RANDOM.pcap" # 137| local PASS_PKT="IP6 $INSIDE_IP6 > $OUTSIDE_IP6: ICMP6, echo reply(, id [0-9]+)?, seq 1, length 64" # 138|-> local HW=$(uname -m | sed -e 's/[]\/$*+.^|[]/\\&/g') # 139| local OS=$(uname -snrv | sed -e 's/[]\/$+*.^()|[]/\\&/g') # 140| local INFOS_REGEX="" Error: SHELLCHECK_WARNING (CWE-571): [#def57] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:139:11: warning[SC2155]: Declare and assign separately to avoid masking return values. # 137| local PASS_PKT="IP6 $INSIDE_IP6 > $OUTSIDE_IP6: ICMP6, echo reply(, id [0-9]+)?, seq 1, length 64" # 138| local HW=$(uname -m | sed -e 's/[]\/$*+.^|[]/\\&/g') # 139|-> local OS=$(uname -snrv | sed -e 's/[]\/$+*.^()|[]/\\&/g') # 140| local INFOS_REGEX="" # 141| local OLD_CAPINFOS=0 Error: SHELLCHECK_WARNING (CWE-571): [#def58] /usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh:142:11: warning[SC2155]: Declare and assign separately to avoid masking return values. # 140| local INFOS_REGEX="" # 141| local OLD_CAPINFOS=0 # 142|-> local TSHARK_VERSION=$(tshark --version 2> /dev/null | sed -ne 's/^TShark (Wireshark) \([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p') # 143| # 144| if [[ "$(capinfos --help)" == *"Capinfos (Wireshark) 2."* ]]; then Error: GCC_ANALYZER_WARNING (CWE-401): [#def59] xdp-tools-1.5.7/lib/libxdp/libxdp.c:167:23: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 165| pr_debug("Loading XDP program '%s' from embedded object file\n", filename); # 166| # 167|-> obj = bpf_object__open_mem(eobj->data_start, size, opts); # 168| err = libbpf_get_error(obj); # 169| if (err) Error: GCC_ANALYZER_WARNING (CWE-401): [#def60] xdp-tools-1.5.7/lib/libxdp/libxdp.c:168:23: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 166| # 167| obj = bpf_object__open_mem(eobj->data_start, size, opts); # 168|-> err = libbpf_get_error(obj); # 169| if (err) # 170| return ERR_PTR(err); Error: GCC_ANALYZER_WARNING (CWE-401): [#def61] xdp-tools-1.5.7/lib/libxdp/libxdp.c:213:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: acquire_memory: allocated here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 211| # 212| va_start(args, format); # 213|-> __libxdp_pr(level, format, args); # 214| va_end(args); # 215| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def62] xdp-tools-1.5.7/lib/libxdp/libxdp.c:213:9: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 211| # 212| va_start(args, format); # 213|-> __libxdp_pr(level, format, args); # 214| va_end(args); # 215| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def63] xdp-tools-1.5.7/lib/libxdp/libxdp.c:213:9: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 211| # 212| va_start(args, format); # 213|-> __libxdp_pr(level, format, args); # 214| va_end(args); # 215| } Error: GCC_ANALYZER_WARNING (CWE-404): [#def64] xdp-tools-1.5.7/lib/libxdp/libxdp.c:213:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1445:21: enter_function: entry to ‘xdp_program__from_pin’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1453:17: call_function: calling ‘libxdp_print’ from ‘xdp_program__from_pin’ # 211| # 212| va_start(args, format); # 213|-> __libxdp_pr(level, format, args); # 214| va_end(args); # 215| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def65] xdp-tools-1.5.7/lib/libxdp/libxdp.c:913:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: acquire_memory: allocated here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 911| len = strlen(func_name); # 912| # 913|-> nr_types = btf__type_cnt(btf); # 914| for (i = 1; i < nr_types; i++) { # 915| t = btf__type_by_id(btf, i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def66] xdp-tools-1.5.7/lib/libxdp/libxdp.c:913:20: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 911| len = strlen(func_name); # 912| # 913|-> nr_types = btf__type_cnt(btf); # 914| for (i = 1; i < nr_types; i++) { # 915| t = btf__type_by_id(btf, i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def67] xdp-tools-1.5.7/lib/libxdp/libxdp.c:913:20: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 911| len = strlen(func_name); # 912| # 913|-> nr_types = btf__type_cnt(btf); # 914| for (i = 1; i < nr_types; i++) { # 915| t = btf__type_by_id(btf, i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def68] xdp-tools-1.5.7/lib/libxdp/libxdp.c:915:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: acquire_memory: allocated here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 913| nr_types = btf__type_cnt(btf); # 914| for (i = 1; i < nr_types; i++) { # 915|-> t = btf__type_by_id(btf, i); # 916| if (!btf_is_func(t)) # 917| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def69] xdp-tools-1.5.7/lib/libxdp/libxdp.c:915:21: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 913| nr_types = btf__type_cnt(btf); # 914| for (i = 1; i < nr_types; i++) { # 915|-> t = btf__type_by_id(btf, i); # 916| if (!btf_is_func(t)) # 917| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def70] xdp-tools-1.5.7/lib/libxdp/libxdp.c:915:21: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 913| nr_types = btf__type_cnt(btf); # 914| for (i = 1; i < nr_types; i++) { # 915|-> t = btf__type_by_id(btf, i); # 916| if (!btf_is_func(t)) # 917| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def71] xdp-tools-1.5.7/lib/libxdp/libxdp.c:919:24: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: acquire_memory: allocated here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 917| continue; # 918| # 919|-> name = btf__name_by_offset(btf, t->name_off); # 920| if (!strncmp(name, func_name, len)) { # 921| pr_debug("Found func %s matching %s\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def72] xdp-tools-1.5.7/lib/libxdp/libxdp.c:919:24: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 917| continue; # 918| # 919|-> name = btf__name_by_offset(btf, t->name_off); # 920| if (!strncmp(name, func_name, len)) { # 921| pr_debug("Found func %s matching %s\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def73] xdp-tools-1.5.7/lib/libxdp/libxdp.c:953:20: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 951| } # 952| # 953|-> nr_types = btf__type_cnt(btf); # 954| for (i = 1; i < nr_types; i++) { # 955| t = btf__type_by_id(btf, i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def74] xdp-tools-1.5.7/lib/libxdp/libxdp.c:955:21: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:15: call_function: calling ‘xdp_program__parse_btf’ from ‘xdp_program__create_from_obj’ # 953| nr_types = btf__type_cnt(btf); # 954| for (i = 1; i < nr_types; i++) { # 955|-> t = btf__type_by_id(btf, i); # 956| if (!btf_is_datasec(t)) # 957| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def75] xdp-tools-1.5.7/lib/libxdp/libxdp.c:1164:28: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 1162| bpf_prog = bpf_program_by_section_name(obj, section_name); # 1163| else if (prog_name) # 1164|-> bpf_prog = bpf_object__find_program_by_name(obj, prog_name); # 1165| else # 1166| bpf_prog = bpf_object__next_program(obj, NULL); Error: GCC_ANALYZER_WARNING (CWE-401): [#def76] xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 1176| return xdp_prog; # 1177| # 1178|-> xdp_prog->prog_name = strdup(bpf_program__name(bpf_prog)); # 1179| if (!xdp_prog->prog_name) { # 1180| err = -ENOMEM; Error: GCC_ANALYZER_WARNING (CWE-401): [#def77] xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: danger: ‘xdp_program__new()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5) # 1176| return xdp_prog; # 1177| # 1178|-> xdp_prog->prog_name = strdup(bpf_program__name(bpf_prog)); # 1179| if (!xdp_prog->prog_name) { # 1180| err = -ENOMEM; Error: GCC_ANALYZER_WARNING (CWE-401): [#def78] xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: acquire_memory: allocated here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10) # 1182| } # 1183| # 1184|-> err = xdp_program__parse_btf(xdp_prog, bpf_object__btf(obj)); # 1185| if (err && err != -ENOENT) # 1186| goto err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def79] xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_multiprog__new(ifindex)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2912:30: enter_function: entry to ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2926:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2931:12: branch_false: following ‘false’ branch (when ‘num_new_progs <= 10’)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2936:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: call_function: calling ‘xdp_multiprog__new’ from ‘xdp_multiprog__generate’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2939:14: return_function: returning to ‘xdp_multiprog__generate’ from ‘xdp_multiprog__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:2940:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:2943:36: call_function: calling ‘kernel_has_frags_support’ from ‘xdp_multiprog__generate’ # 1182| } # 1183| # 1184|-> err = xdp_program__parse_btf(xdp_prog, bpf_object__btf(obj)); # 1185| if (err && err != -ENOENT) # 1186| goto err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def80] xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: warning[-Wanalyzer-malloc-leak]: leak of ‘xdp_program__new()’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1149:28: enter_function: entry to ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1168:12: branch_false: following ‘false’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: call_function: calling ‘xdp_program__new’ from ‘xdp_program__create_from_obj’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1174:20: return_function: returning to ‘xdp_program__create_from_obj’ from ‘xdp_program__new’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:1175:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1178:31: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1179:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:1184:48: danger: ‘xdp_program__new()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/5) # 1182| } # 1183| # 1184|-> err = xdp_program__parse_btf(xdp_prog, bpf_object__btf(obj)); # 1185| if (err && err != -ENOENT) # 1186| goto err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def81] xdp-tools-1.5.7/lib/libxdp/libxdp.c:3428:36: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pin_path)’ xdp-tools-1.5.7/lib/libxdp/libxdp.c:3414:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:3417:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:3418:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:3421:13: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:3421:13: acquire_memory: allocated here xdp-tools-1.5.7/lib/libxdp/libxdp.c:3422:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/libxdp.c:3428:36: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/libxdp.c:3428:36: danger: ‘opendir(&pin_path)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4) # 3426| } # 3427| # 3428|-> for (struct dirent *dent = readdir(d); dent; dent = readdir(d)) { # 3429| /* skip . and .. */ # 3430| if (dent->d_type == DT_DIR) Error: GCC_ANALYZER_WARNING (CWE-401): [#def82] xdp-tools-1.5.7/lib/libxdp/xsk.c:731:22: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 729| int err; # 730| # 731|-> multi_prog = xdp_multiprog__get_from_ifindex(ifindex); # 732| if (IS_ERR(multi_prog)) # 733| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def83] xdp-tools-1.5.7/lib/libxdp/xsk.c:735:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 733| return NULL; # 734| # 735|-> if (xdp_multiprog__is_legacy(multi_prog)) { # 736| prog = xdp_multiprog__main_prog(multi_prog); # 737| prog = strcmp(xdp_program__name(prog), prog_name) ? NULL : prog; Error: GCC_ANALYZER_WARNING (CWE-401): [#def84] xdp-tools-1.5.7/lib/libxdp/xsk.c:736:24: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 734| # 735| if (xdp_multiprog__is_legacy(multi_prog)) { # 736|-> prog = xdp_multiprog__main_prog(multi_prog); # 737| prog = strcmp(xdp_program__name(prog), prog_name) ? NULL : prog; # 738| goto check; Error: GCC_ANALYZER_WARNING (CWE-401): [#def85] xdp-tools-1.5.7/lib/libxdp/xsk.c:737:24: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 735| if (xdp_multiprog__is_legacy(multi_prog)) { # 736| prog = xdp_multiprog__main_prog(multi_prog); # 737|-> prog = strcmp(xdp_program__name(prog), prog_name) ? NULL : prog; # 738| goto check; # 739| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def86] xdp-tools-1.5.7/lib/libxdp/xsk.c:741:24: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 739| } # 740| # 741|-> while ((prog = xdp_multiprog__next_prog(prog, multi_prog))) # 742| if (!strcmp(xdp_program__name(prog), prog_name)) # 743| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def87] xdp-tools-1.5.7/lib/libxdp/xsk.c:742:22: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 740| # 741| while ((prog = xdp_multiprog__next_prog(prog, multi_prog))) # 742|-> if (!strcmp(xdp_program__name(prog), prog_name)) # 743| break; # 744| Error: GCC_ANALYZER_WARNING (CWE-401): [#def88] xdp-tools-1.5.7/lib/libxdp/xsk.c:749:15: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 747| goto out; # 748| # 749|-> err = check_xdp_prog_version(xdp_program__btf(prog), version_name, &version); # 750| if (err) { # 751| prog = ERR_PTR(err); Error: GCC_ANALYZER_WARNING (CWE-401): [#def89] xdp-tools-1.5.7/lib/libxdp/xsk.c:784:19: warning[-Wanalyzer-malloc-leak]: leak of ‘value_data’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1330:13: enter_function: entry to ‘xsk_release_xdp_prog’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1335:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/xsk.c:1338:17: call_function: inlined call to ‘xsk_decr_prog_refcnt’ from ‘xsk_release_xdp_prog’ # 782| return -ENOMEM; # 783| # 784|-> lock_fd = xdp_lock_acquire(); # 785| if (lock_fd < 0) { # 786| ret = lock_fd; Error: GCC_ANALYZER_WARNING (CWE-401): [#def90] xdp-tools-1.5.7/lib/libxdp/xsk.c:795:15: warning[-Wanalyzer-malloc-leak]: leak of ‘value_data’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1330:13: enter_function: entry to ‘xsk_release_xdp_prog’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1335:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/libxdp/xsk.c:1338:17: call_function: inlined call to ‘xsk_decr_prog_refcnt’ from ‘xsk_release_xdp_prog’ # 793| * when reading refcount, but map key always stays zero # 794| */ # 795|-> ret = bpf_map_lookup_elem(refcnt_map_fd, &key, value_data); # 796| if (ret) # 797| goto unlock; Error: GCC_ANALYZER_WARNING (CWE-401): [#def91] xdp-tools-1.5.7/lib/libxdp/xsk.c:1250:17: warning[-Wanalyzer-malloc-leak]: leak of ‘xsk’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1257:5: enter_function: entry to ‘xsk_socket__create_shared’ xdp-tools-1.5.7/lib/libxdp/xsk.c:1268:12: branch_false: following ‘false’ branch (when ‘xsk_ptr’ is non-NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1271:9: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1277:12: branch_false: following ‘false’ branch (when ‘usr_config’ is NULL)... xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: branch_false: ...to here xdp-tools-1.5.7/lib/libxdp/xsk.c:1284:15: call_function: calling ‘xsk_socket__create_opts’ from ‘xsk_socket__create_shared’ # 1248| out_socket: # 1249| if (--umem->refcount) # 1250|-> close(xsk->fd); # 1251| out_xsk_alloc: # 1252| free(xsk); Error: GCC_ANALYZER_WARNING (CWE-122): [#def92] xdp-tools-1.5.7/lib/util/params.c:586:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ # 584| opt->short_opt = n_sopt++; # 585| } # 586|-> nopt->has_arg = opt_needs_arg(opt) ? required_argument : no_argument; # 587| nopt->name = opt->name; # 588| nopt->val = opt->short_opt; Error: GCC_ANALYZER_WARNING (CWE-122): [#def93] xdp-tools-1.5.7/lib/util/params.c:587:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ # 585| } # 586| nopt->has_arg = opt_needs_arg(opt) ? required_argument : no_argument; # 587|-> nopt->name = opt->name; # 588| nopt->val = opt->short_opt; # 589| nopt->flag = NULL; Error: GCC_ANALYZER_WARNING (CWE-122): [#def94] xdp-tools-1.5.7/lib/util/params.c:588:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ # 586| nopt->has_arg = opt_needs_arg(opt) ? required_argument : no_argument; # 587| nopt->name = opt->name; # 588|-> nopt->val = opt->short_opt; # 589| nopt->flag = NULL; # 590| nopt++; Error: GCC_ANALYZER_WARNING (CWE-122): [#def95] xdp-tools-1.5.7/lib/util/params.c:589:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ # 587| nopt->name = opt->name; # 588| nopt->val = opt->short_opt; # 589|-> nopt->flag = NULL; # 590| nopt++; # 591| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def96] xdp-tools-1.5.7/lib/util/params.c:624:17: warning[-Wanalyzer-malloc-leak]: leak of ‘long_options’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:707:29: call_function: calling ‘set_opt’ from ‘parse_cmdline_args’ # 622| # 623| if (opt->max_num && opt->num_set + 1 > opt->max_num) { # 624|-> pr_warn("Too many parameters for %s (max %u)\n", # 625| opt->metavar ?: opt->name, opt->max_num); # 626| return -E2BIG; Error: GCC_ANALYZER_WARNING (CWE-401): [#def97] xdp-tools-1.5.7/lib/util/params.c:624:17: warning[-Wanalyzer-malloc-leak]: leak of ‘optstring’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:707:29: call_function: calling ‘set_opt’ from ‘parse_cmdline_args’ # 622| # 623| if (opt->max_num && opt->num_set + 1 > opt->max_num) { # 624|-> pr_warn("Too many parameters for %s (max %u)\n", # 625| opt->metavar ?: opt->name, opt->max_num); # 626| return -E2BIG; Error: GCC_ANALYZER_WARNING (CWE-401): [#def98] xdp-tools-1.5.7/lib/util/params.c:629:15: warning[-Wanalyzer-malloc-leak]: leak of ‘long_options’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:707:29: call_function: calling ‘set_opt’ from ‘parse_cmdline_args’ # 627| } # 628| # 629|-> ret = handlers[opt->type].func(optarg, (cfg + opt->cfg_offset), opt); # 630| if (!ret) # 631| opt->num_set++; Error: GCC_ANALYZER_WARNING (CWE-401): [#def99] xdp-tools-1.5.7/lib/util/params.c:629:15: warning[-Wanalyzer-malloc-leak]: leak of ‘optstring’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:707:29: call_function: calling ‘set_opt’ from ‘parse_cmdline_args’ # 627| } # 628| # 629|-> ret = handlers[opt->type].func(optarg, (cfg + opt->cfg_offset), opt); # 630| if (!ret) # 631| opt->num_set++; Error: GCC_ANALYZER_WARNING (CWE-401): [#def100] xdp-tools-1.5.7/lib/util/params.c:633:17: warning[-Wanalyzer-malloc-leak]: leak of ‘long_options’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:707:29: call_function: calling ‘set_opt’ from ‘parse_cmdline_args’ # 631| opt->num_set++; # 632| else if (ret != -ENOENT) # 633|-> pr_warn("Couldn't parse option %s: %s.\n", opt->name, strerror(-ret)); # 634| return ret; # 635| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def101] xdp-tools-1.5.7/lib/util/params.c:633:17: warning[-Wanalyzer-malloc-leak]: leak of ‘optstring’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:707:29: call_function: calling ‘set_opt’ from ‘parse_cmdline_args’ # 631| opt->num_set++; # 632| else if (ret != -ENOENT) # 633|-> pr_warn("Couldn't parse option %s: %s.\n", opt->name, strerror(-ret)); # 634| return ret; # 635| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def102] xdp-tools-1.5.7/lib/util/params.c:681:17: warning[-Wanalyzer-malloc-leak]: leak of ‘cfg’ xdp-tools-1.5.7/lib/util/params.c:748:5: enter_function: entry to ‘dispatch_commands’ xdp-tools-1.5.7/lib/util/params.c:758:24: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/params.c:759:21: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:765:12: branch_false: following ‘false’ branch (when ‘cmd’ is non-NULL)... xdp-tools-1.5.7/lib/util/params.c:771:13: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:771:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:774:15: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:774:15: acquire_memory: allocated here xdp-tools-1.5.7/lib/util/params.c:775:12: branch_false: following ‘false’ branch (when ‘cfg’ is non-NULL)... xdp-tools-1.5.7/lib/util/params.c:780:72: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:781:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:785:44: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:784:15: call_function: calling ‘parse_cmdline_args’ from ‘dispatch_commands’ # 679| # 680| if (prog_options_to_options(poptions, &long_options, &optstring)) { # 681|-> pr_warn("Unable to malloc()\n"); # 682| return -ENOMEM; # 683| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def103] xdp-tools-1.5.7/lib/util/params.c:697:25: warning[-Wanalyzer-malloc-leak]: leak of ‘long_options’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:697:25: danger: ‘long_options’ leaks here; was allocated at [(8)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/7) # 695| goto out; # 696| case 'v': # 697|-> increase_log_level(); # 698| break; # 699| case VERSION_SHORT_OPT: Error: GCC_ANALYZER_WARNING (CWE-401): [#def104] xdp-tools-1.5.7/lib/util/params.c:697:25: warning[-Wanalyzer-malloc-leak]: leak of ‘optstring’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:697:25: danger: ‘optstring’ leaks here; was allocated at [(10)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/9) # 695| goto out; # 696| case 'v': # 697|-> increase_log_level(); # 698| break; # 699| case VERSION_SHORT_OPT: Error: GCC_ANALYZER_WARNING (CWE-401): [#def105] xdp-tools-1.5.7/lib/util/params.c:700:25: warning[-Wanalyzer-malloc-leak]: leak of ‘long_options’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:700:25: danger: ‘long_options’ leaks here; was allocated at [(8)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/7) # 698| break; # 699| case VERSION_SHORT_OPT: # 700|-> printf("%s version %s using libbpf version %s\n", # 701| prog, # 702| TOOLS_VERSION, Error: GCC_ANALYZER_WARNING (CWE-401): [#def106] xdp-tools-1.5.7/lib/util/params.c:700:25: warning[-Wanalyzer-malloc-leak]: leak of ‘optstring’ xdp-tools-1.5.7/lib/util/params.c:669:5: enter_function: entry to ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: call_function: calling ‘prog_options_to_options’ from ‘parse_cmdline_args’ xdp-tools-1.5.7/lib/util/params.c:680:13: return_function: returning to ‘parse_cmdline_args’ from ‘prog_options_to_options’ xdp-tools-1.5.7/lib/util/params.c:680:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:685:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:689:16: branch_true: following ‘true’ branch (when ‘opt != -1’)... xdp-tools-1.5.7/lib/util/params.c:691:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:700:25: danger: ‘optstring’ leaks here; was allocated at [(10)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/9) # 698| break; # 699| case VERSION_SHORT_OPT: # 700|-> printf("%s version %s using libbpf version %s\n", # 701| prog, # 702| TOOLS_VERSION, Error: GCC_ANALYZER_WARNING (CWE-401): [#def107] xdp-tools-1.5.7/lib/util/params.c:734:33: warning[-Wanalyzer-malloc-leak]: leak of ‘long_options’ xdp-tools-1.5.7/lib/util/params.c:748:5: enter_function: entry to ‘dispatch_commands’ xdp-tools-1.5.7/lib/util/params.c:758:24: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/params.c:759:21: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:765:12: branch_false: following ‘false’ branch (when ‘cmd’ is non-NULL)... xdp-tools-1.5.7/lib/util/params.c:771:13: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:771:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:774:15: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:775:12: branch_false: following ‘false’ branch (when ‘cfg’ is non-NULL)... xdp-tools-1.5.7/lib/util/params.c:780:72: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:781:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:785:44: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:784:15: call_function: calling ‘parse_cmdline_args’ from ‘dispatch_commands’ # 732| opt_iter->metavar ?: opt_iter->name); # 733| else # 734|-> pr_warn("Missing required option '--%s'\n", # 735| opt_iter->name); # 736| usage(prog, doc, poptions, full_help); Error: GCC_ANALYZER_WARNING (CWE-401): [#def108] xdp-tools-1.5.7/lib/util/params.c:734:33: warning[-Wanalyzer-malloc-leak]: leak of ‘optstring’ xdp-tools-1.5.7/lib/util/params.c:748:5: enter_function: entry to ‘dispatch_commands’ xdp-tools-1.5.7/lib/util/params.c:758:24: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/params.c:759:21: branch_true: ...to here xdp-tools-1.5.7/lib/util/params.c:765:12: branch_false: following ‘false’ branch (when ‘cmd’ is non-NULL)... xdp-tools-1.5.7/lib/util/params.c:771:13: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:771:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:774:15: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:775:12: branch_false: following ‘false’ branch (when ‘cfg’ is non-NULL)... xdp-tools-1.5.7/lib/util/params.c:780:72: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:781:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/params.c:785:44: branch_false: ...to here xdp-tools-1.5.7/lib/util/params.c:784:15: call_function: calling ‘parse_cmdline_args’ from ‘dispatch_commands’ # 732| opt_iter->metavar ?: opt_iter->name); # 733| else # 734|-> pr_warn("Missing required option '--%s'\n", # 735| opt_iter->name); # 736| usage(prog, doc, poptions, full_help); Error: GCC_ANALYZER_WARNING (CWE-401): [#def109] xdp-tools-1.5.7/lib/util/stats.c:156:15: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ xdp-tools-1.5.7/lib/util/stats.c:205:5: enter_function: entry to ‘stats_collect’ xdp-tools-1.5.7/lib/util/stats.c:211:23: branch_true: following ‘true’ branch (when ‘key != 5’)... xdp-tools-1.5.7/lib/util/stats.c:212:22: branch_true: ...to here xdp-tools-1.5.7/lib/util/stats.c:212:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/stats.c:215:23: branch_true: ...to here xdp-tools-1.5.7/lib/util/stats.c:215:23: call_function: calling ‘map_collect’ from ‘stats_collect’ # 154| return -ENOMEM; # 155| # 156|-> err = bpf_map_lookup_elem(fd, &key, values); # 157| if (err) { # 158| pr_debug("bpf_map_lookup_elem failed key:0x%X\n", key); Error: GCC_ANALYZER_WARNING (CWE-401): [#def110] xdp-tools-1.5.7/lib/util/util.c:363:17: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pin_path)’ xdp-tools-1.5.7/lib/util/util.c:349:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/util.c:352:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/util.c:352:14: acquire_memory: allocated here xdp-tools-1.5.7/lib/util/util.c:353:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/util.c:360:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/util.c:360:12: branch_true: following ‘true’ branch (when ‘ifindex == 0’)... xdp-tools-1.5.7/lib/util/util.c:361:42: branch_true: ...to here xdp-tools-1.5.7/lib/util/util.c:362:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/util.c:363:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/util.c:363:17: danger: ‘opendir(&pin_path)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 361| ifindex = if_nametoindex(iface->ifname); # 362| if (!ifindex) { # 363|-> pr_debug("Interface %s no longer exists\n", iface->ifname); # 364| remove_all = true; # 365| ret = -ENODEV; Error: GCC_ANALYZER_WARNING (CWE-401): [#def111] xdp-tools-1.5.7/lib/util/util.c:368:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pin_path)’ xdp-tools-1.5.7/lib/util/util.c:349:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/util.c:352:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/util.c:352:14: acquire_memory: allocated here xdp-tools-1.5.7/lib/util/util.c:353:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/util.c:360:12: branch_false: ...to here xdp-tools-1.5.7/lib/util/util.c:368:22: danger: ‘opendir(&pin_path)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) # 366| } # 367| # 368|-> while ((de = readdir(dr)) != NULL) { # 369| DECLARE_LIBXDP_OPTS(xdp_program_opts, opts, 0); # 370| struct xdp_program *prog; Error: GCC_ANALYZER_WARNING (CWE-401): [#def112] xdp-tools-1.5.7/lib/util/util.c:437:22: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pin_path)’ xdp-tools-1.5.7/lib/util/util.c:430:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/util.c:433:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/util.c:433:14: acquire_memory: allocated here xdp-tools-1.5.7/lib/util/util.c:434:12: branch_false: following ‘false’ branch... branch_false: ...to here xdp-tools-1.5.7/lib/util/util.c:437:22: danger: ‘opendir(&pin_path)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 435| return -ENOENT; # 436| # 437|-> while ((de = readdir(dr)) != NULL) { # 438| enum xdp_attach_mode mode = XDP_MODE_UNSPEC; # 439| struct xdp_program *prog = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def113] xdp-tools-1.5.7/lib/util/xdp_sample.c:249:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 247| res = clock_gettime(CLOCK_MONOTONIC, &t); # 248| if (res < 0) { # 249|-> pr_warn("Error with gettimeofday! (%i)\n", res); # 250| return UINT64_MAX; # 251| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def114] xdp-tools-1.5.7/lib/util/xdp_sample.c:249:17: warning[-Wanalyzer-malloc-leak]: leak of ‘x’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 247| res = clock_gettime(CLOCK_MONOTONIC, &t); # 248| if (res < 0) { # 249|-> pr_warn("Error with gettimeofday! (%i)\n", res); # 250| return UINT64_MAX; # 251| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def115] xdp-tools-1.5.7/lib/util/xdp_sample.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 269| array = calloc(nr_entries, sizeof(*array)); # 270| if (!array) { # 271|-> pr_warn("Failed to allocate memory (nr_entries: %u)\n", nr_entries); # 272| return NULL; # 273| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def116] xdp-tools-1.5.7/lib/util/xdp_sample.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 269| array = calloc(nr_entries, sizeof(*array)); # 270| if (!array) { # 271|-> pr_warn("Failed to allocate memory (nr_entries: %u)\n", nr_entries); # 272| return NULL; # 273| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def117] xdp-tools-1.5.7/lib/util/xdp_sample.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of ‘x’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 269| array = calloc(nr_entries, sizeof(*array)); # 270| if (!array) { # 271|-> pr_warn("Failed to allocate memory (nr_entries: %u)\n", nr_entries); # 272| return NULL; # 273| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def118] xdp-tools-1.5.7/lib/util/xdp_sample.c:282:22: warning[-Wanalyzer-malloc-leak]: leak of ‘x’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 280| INIT_HLIST_NODE(&e->node); # 281| e->val.timestamp = gettime(); # 282|-> e->val.cpu = alloc_records(libbpf_num_possible_cpus()); # 283| if (!e->val.cpu) # 284| return -ENOMEM; Error: GCC_ANALYZER_WARNING (CWE-401): [#def119] xdp-tools-1.5.7/lib/util/xdp_sample.c:310:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 308| { # 309| /* For percpu maps, userspace gets a value per possible CPU */ # 310|-> int nr_cpus = libbpf_num_possible_cpus(); # 311| __u64 sum_xdp_redirect = 0; # 312| __u64 sum_processed = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def120] xdp-tools-1.5.7/lib/util/xdp_sample.c:310:23: warning[-Wanalyzer-malloc-leak]: leak of ‘x’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 308| { # 309| /* For percpu maps, userspace gets a value per possible CPU */ # 310|-> int nr_cpus = libbpf_num_possible_cpus(); # 311| __u64 sum_xdp_redirect = 0; # 312| __u64 sum_processed = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def121] xdp-tools-1.5.7/lib/util/xdp_sample.c:368:23: warning[-Wanalyzer-malloc-leak]: leak of ‘keys’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 366| bool exit = false; # 367| # 368|-> ret = bpf_map_lookup_batch(map_fd, init ? &batch : NULL, &batch, # 369| keys, values, (__u32 *)&count, NULL); # 370| if (ret < 0 && errno != ENOENT) Error: GCC_ANALYZER_WARNING (CWE-401): [#def122] xdp-tools-1.5.7/lib/util/xdp_sample.c:368:23: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1521:12: enter_function: entry to ‘print_stats’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1527:15: call_function: calling ‘sample_stats_collect’ from ‘print_stats’ # 366| bool exit = false; # 367| # 368|-> ret = bpf_map_lookup_batch(map_fd, init ? &batch : NULL, &batch, # 369| keys, values, (__u32 *)&count, NULL); # 370| if (ret < 0 && errno != ENOENT) Error: GCC_ANALYZER_WARNING (CWE-401): [#def123] xdp-tools-1.5.7/lib/util/xdp_sample.c:427:35: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 425| # 426| if (sample_mask & SAMPLE_RX_CNT) { # 427|-> rec->rx_cnt.cpu = alloc_records(libbpf_num_possible_cpus()); # 428| if (!rec->rx_cnt.cpu) { # 429| pr_warn("Failed to allocate rx_cnt per-CPU array\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def124] xdp-tools-1.5.7/lib/util/xdp_sample.c:429:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 427| rec->rx_cnt.cpu = alloc_records(libbpf_num_possible_cpus()); # 428| if (!rec->rx_cnt.cpu) { # 429|-> pr_warn("Failed to allocate rx_cnt per-CPU array\n"); # 430| goto end_rec; # 431| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def125] xdp-tools-1.5.7/lib/util/xdp_sample.c:435:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 433| if (sample_mask & SAMPLE_RXQ_STATS) { # 434| if (sample_n_rxqs <= 0) { # 435|-> pr_warn("Invalid number of RXQs: %d\n", sample_n_rxqs); # 436| goto end_rx_cnt; # 437| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def126] xdp-tools-1.5.7/lib/util/xdp_sample.c:435:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 433| if (sample_mask & SAMPLE_RXQ_STATS) { # 434| if (sample_n_rxqs <= 0) { # 435|-> pr_warn("Invalid number of RXQs: %d\n", sample_n_rxqs); # 436| goto end_rx_cnt; # 437| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def127] xdp-tools-1.5.7/lib/util/xdp_sample.c:441:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 439| rec->rxq_cnt.rxq = alloc_records(sample_n_rxqs); # 440| if (!rec->rxq_cnt.rxq) { # 441|-> pr_warn("Failed to allocate rxq_cnt per RXQ array\n"); # 442| goto end_rx_cnt; # 443| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def128] xdp-tools-1.5.7/lib/util/xdp_sample.c:441:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 439| rec->rxq_cnt.rxq = alloc_records(sample_n_rxqs); # 440| if (!rec->rxq_cnt.rxq) { # 441|-> pr_warn("Failed to allocate rxq_cnt per RXQ array\n"); # 442| goto end_rx_cnt; # 443| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def129] xdp-tools-1.5.7/lib/util/xdp_sample.c:447:49: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 445| if (sample_mask & (SAMPLE_REDIRECT_CNT | SAMPLE_REDIRECT_ERR_CNT)) { # 446| for (i = 0; i < XDP_REDIRECT_ERR_MAX; i++) { # 447|-> rec->redir_err[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 448| if (!rec->redir_err[i].cpu) { # 449| pr_warn("Failed to allocate redir_err per-CPU array for \"%s\" case\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def130] xdp-tools-1.5.7/lib/util/xdp_sample.c:447:49: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 445| if (sample_mask & (SAMPLE_REDIRECT_CNT | SAMPLE_REDIRECT_ERR_CNT)) { # 446| for (i = 0; i < XDP_REDIRECT_ERR_MAX; i++) { # 447|-> rec->redir_err[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 448| if (!rec->redir_err[i].cpu) { # 449| pr_warn("Failed to allocate redir_err per-CPU array for \"%s\" case\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def131] xdp-tools-1.5.7/lib/util/xdp_sample.c:449:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 447| rec->redir_err[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 448| if (!rec->redir_err[i].cpu) { # 449|-> pr_warn("Failed to allocate redir_err per-CPU array for \"%s\" case\n", # 450| xdp_redirect_err_names[i]); # 451| while (i--) Error: GCC_ANALYZER_WARNING (CWE-401): [#def132] xdp-tools-1.5.7/lib/util/xdp_sample.c:449:33: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 447| rec->redir_err[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 448| if (!rec->redir_err[i].cpu) { # 449|-> pr_warn("Failed to allocate redir_err per-CPU array for \"%s\" case\n", # 450| xdp_redirect_err_names[i]); # 451| while (i--) Error: GCC_ANALYZER_WARNING (CWE-401): [#def133] xdp-tools-1.5.7/lib/util/xdp_sample.c:458:36: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 456| } # 457| if (sample_mask & SAMPLE_CPUMAP_KTHREAD_CNT) { # 458|-> rec->kthread.cpu = alloc_records(libbpf_num_possible_cpus()); # 459| if (!rec->kthread.cpu) { # 460| pr_warn("Failed to allocate kthread per-CPU array\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def134] xdp-tools-1.5.7/lib/util/xdp_sample.c:458:36: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 456| } # 457| if (sample_mask & SAMPLE_CPUMAP_KTHREAD_CNT) { # 458|-> rec->kthread.cpu = alloc_records(libbpf_num_possible_cpus()); # 459| if (!rec->kthread.cpu) { # 460| pr_warn("Failed to allocate kthread per-CPU array\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def135] xdp-tools-1.5.7/lib/util/xdp_sample.c:460:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 458| rec->kthread.cpu = alloc_records(libbpf_num_possible_cpus()); # 459| if (!rec->kthread.cpu) { # 460|-> pr_warn("Failed to allocate kthread per-CPU array\n"); # 461| goto end_redir; # 462| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def136] xdp-tools-1.5.7/lib/util/xdp_sample.c:460:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 458| rec->kthread.cpu = alloc_records(libbpf_num_possible_cpus()); # 459| if (!rec->kthread.cpu) { # 460|-> pr_warn("Failed to allocate kthread per-CPU array\n"); # 461| goto end_redir; # 462| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def137] xdp-tools-1.5.7/lib/util/xdp_sample.c:466:49: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 464| if (sample_mask & SAMPLE_EXCEPTION_CNT) { # 465| for (i = 0; i < XDP_ACTION_MAX; i++) { # 466|-> rec->exception[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 467| if (!rec->exception[i].cpu) { # 468| pr_warn("Failed to allocate exception per-CPU array for \"%s\" case\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def138] xdp-tools-1.5.7/lib/util/xdp_sample.c:466:49: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 464| if (sample_mask & SAMPLE_EXCEPTION_CNT) { # 465| for (i = 0; i < XDP_ACTION_MAX; i++) { # 466|-> rec->exception[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 467| if (!rec->exception[i].cpu) { # 468| pr_warn("Failed to allocate exception per-CPU array for \"%s\" case\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def139] xdp-tools-1.5.7/lib/util/xdp_sample.c:468:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 466| rec->exception[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 467| if (!rec->exception[i].cpu) { # 468|-> pr_warn("Failed to allocate exception per-CPU array for \"%s\" case\n", # 469| xdp_action2str(i)); # 470| while (i--) Error: GCC_ANALYZER_WARNING (CWE-401): [#def140] xdp-tools-1.5.7/lib/util/xdp_sample.c:468:33: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 466| rec->exception[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 467| if (!rec->exception[i].cpu) { # 468|-> pr_warn("Failed to allocate exception per-CPU array for \"%s\" case\n", # 469| xdp_action2str(i)); # 470| while (i--) Error: GCC_ANALYZER_WARNING (CWE-401): [#def141] xdp-tools-1.5.7/lib/util/xdp_sample.c:477:40: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 475| } # 476| if (sample_mask & SAMPLE_DEVMAP_XMIT_CNT) { # 477|-> rec->devmap_xmit.cpu = alloc_records(libbpf_num_possible_cpus()); # 478| if (!rec->devmap_xmit.cpu) { # 479| pr_warn("Failed to allocate devmap_xmit per-CPU array\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def142] xdp-tools-1.5.7/lib/util/xdp_sample.c:477:40: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 475| } # 476| if (sample_mask & SAMPLE_DEVMAP_XMIT_CNT) { # 477|-> rec->devmap_xmit.cpu = alloc_records(libbpf_num_possible_cpus()); # 478| if (!rec->devmap_xmit.cpu) { # 479| pr_warn("Failed to allocate devmap_xmit per-CPU array\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def143] xdp-tools-1.5.7/lib/util/xdp_sample.c:479:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 477| rec->devmap_xmit.cpu = alloc_records(libbpf_num_possible_cpus()); # 478| if (!rec->devmap_xmit.cpu) { # 479|-> pr_warn("Failed to allocate devmap_xmit per-CPU array\n"); # 480| goto end_exception; # 481| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def144] xdp-tools-1.5.7/lib/util/xdp_sample.c:479:25: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 477| rec->devmap_xmit.cpu = alloc_records(libbpf_num_possible_cpus()); # 478| if (!rec->devmap_xmit.cpu) { # 479|-> pr_warn("Failed to allocate devmap_xmit per-CPU array\n"); # 480| goto end_exception; # 481| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def145] xdp-tools-1.5.7/lib/util/xdp_sample.c:487:43: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 485| if (sample_mask & SAMPLE_CPUMAP_ENQUEUE_CNT) { # 486| for (i = 0; i < sample_n_cpus; i++) { # 487|-> rec->enq[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 488| if (!rec->enq[i].cpu) { # 489| pr_warn("Failed to allocate enqueue per-CPU array for CPU %d\n", i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def146] xdp-tools-1.5.7/lib/util/xdp_sample.c:487:43: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 485| if (sample_mask & SAMPLE_CPUMAP_ENQUEUE_CNT) { # 486| for (i = 0; i < sample_n_cpus; i++) { # 487|-> rec->enq[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 488| if (!rec->enq[i].cpu) { # 489| pr_warn("Failed to allocate enqueue per-CPU array for CPU %d\n", i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def147] xdp-tools-1.5.7/lib/util/xdp_sample.c:489:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 487| rec->enq[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 488| if (!rec->enq[i].cpu) { # 489|-> pr_warn("Failed to allocate enqueue per-CPU array for CPU %d\n", i); # 490| while (i--) # 491| free(rec->enq[i].cpu); Error: GCC_ANALYZER_WARNING (CWE-401): [#def148] xdp-tools-1.5.7/lib/util/xdp_sample.c:489:33: warning[-Wanalyzer-malloc-leak]: leak of ‘rec’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1562:5: enter_function: entry to ‘sample_run’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1578:12: branch_false: following ‘false’ branch (when ‘interval != 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1582:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1587:12: branch_false: following ‘false’ branch (when ‘timerfd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1589:9: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1598:15: call_function: calling ‘alloc_stats_record’ from ‘sample_run’ # 487| rec->enq[i].cpu = alloc_records(libbpf_num_possible_cpus()); # 488| if (!rec->enq[i].cpu) { # 489|-> pr_warn("Failed to allocate enqueue per-CPU array for CPU %d\n", i); # 490| while (i--) # 491| free(rec->enq[i].cpu); Error: GCC_ANALYZER_WARNING (CWE-775): [#def149] xdp-tools-1.5.7/lib/util/xdp_sample.c:1677:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1655:14: acquire_resource: datagram socket created here xdp-tools-1.5.7/lib/util/xdp_sample.c:1656:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1659:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1659:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/xdp_sample.c:1660:17: branch_true: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1677:9: danger: ‘fd’ leaks here # 1675| end: # 1676| r = errno; # 1677|-> close(fd); # 1678| return r == EOPNOTSUPP ? "loopback" : "[error]"; # 1679| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def150] xdp-tools-1.5.7/lib/util/xdp_sample.c:1707:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ xdp-tools-1.5.7/lib/util/xdp_sample.c:1687:14: acquire_resource: datagram socket created here xdp-tools-1.5.7/lib/util/xdp_sample.c:1688:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)... xdp-tools-1.5.7/lib/util/xdp_sample.c:1691:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1691:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/xdp_sample.c:1692:22: branch_true: ...to here xdp-tools-1.5.7/lib/util/xdp_sample.c:1707:9: danger: ‘fd’ leaks here # 1705| # 1706| end: # 1707|-> close(fd); # 1708| return r; # 1709| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def151] xdp-tools-1.5.7/lib/util/xpcapng.c:269:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’ xdp-tools-1.5.7/lib/util/xpcapng.c:539:24: enter_function: entry to ‘xpcapng_dump_open’ xdp-tools-1.5.7/lib/util/xpcapng.c:547:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:552:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:552:14: acquire_memory: allocated here xdp-tools-1.5.7/lib/util/xpcapng.c:553:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:559:13: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:567:14: call_function: calling ‘pcapng_write_shb’ from ‘xpcapng_dump_open’ # 267| # 268| /* Write the SHB, and free its memory. */ # 269|-> rc = write(pd->pd_fd, shb, shb_length); # 270| free(shb); # 271| Error: GCC_ANALYZER_WARNING (CWE-401): [#def152] xdp-tools-1.5.7/lib/util/xpcapng.c:269:14: warning[-Wanalyzer-malloc-leak]: leak of ‘shb’ xdp-tools-1.5.7/lib/util/xpcapng.c:539:24: enter_function: entry to ‘xpcapng_dump_open’ xdp-tools-1.5.7/lib/util/xpcapng.c:547:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:552:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:553:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:559:13: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:567:14: call_function: calling ‘pcapng_write_shb’ from ‘xpcapng_dump_open’ # 267| # 268| /* Write the SHB, and free its memory. */ # 269|-> rc = write(pd->pd_fd, shb, shb_length); # 270| free(shb); # 271| Error: CPPCHECK_WARNING (CWE-562): [#def153] xdp-tools-1.5.7/lib/util/xpcapng.c:523: error[invalidLifetime]: Using pointer to local variable 'opt' that is out of scope. # 521| # 522| /* Write other options and final EPB size. */ # 523|-> iov[i].iov_base = options; # 524| iov[i++].iov_len = 8 + (epb_options->flags ? 8 : 0) + # 525| (epb_options->dropcount ? 12 : 0) + Error: CPPCHECK_WARNING (CWE-562): [#def154] xdp-tools-1.5.7/lib/util/xpcapng.c:524: error[invalidLifetime]: Using pointer to local variable 'opt' that is out of scope. # 522| /* Write other options and final EPB size. */ # 523| iov[i].iov_base = options; # 524|-> iov[i++].iov_len = 8 + (epb_options->flags ? 8 : 0) + # 525| (epb_options->dropcount ? 12 : 0) + # 526| (epb_options->packetid ? 12 : 0) + Error: CPPCHECK_WARNING (CWE-562): [#def155] xdp-tools-1.5.7/lib/util/xpcapng.c:529: error[invalidLifetime]: Using pointer to local variable 'opt' that is out of scope. # 527| (epb_options->queue ? 8 : 0) + # 528| (epb_options->xdp_verdict ? 16 : 0); # 529|-> rc = writev(pd->pd_fd, iov, i); # 530| if ((size_t)rc != epb_length) # 531| return false; Error: GCC_ANALYZER_WARNING (CWE-401): [#def156] xdp-tools-1.5.7/lib/util/xpcapng.c:562:29: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’ xdp-tools-1.5.7/lib/util/xpcapng.c:547:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:552:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:552:14: acquire_memory: allocated here xdp-tools-1.5.7/lib/util/xpcapng.c:553:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:559:13: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:559:12: branch_false: following ‘false’ branch (when the strings are non-equal)... xdp-tools-1.5.7/lib/util/xpcapng.c:562:29: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:562:29: danger: ‘pd’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 560| pd->pd_fd = STDOUT_FILENO; # 561| } else { # 562|-> pd->pd_fd = open(file, O_WRONLY | O_CREAT | O_TRUNC, 0600); # 563| if (pd->pd_fd < 0) # 564| goto error_exit; Error: GCC_ANALYZER_WARNING (CWE-401): [#def157] xdp-tools-1.5.7/lib/util/xpcapng.c:575:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pd’ xdp-tools-1.5.7/lib/util/xpcapng.c:539:24: enter_function: entry to ‘xpcapng_dump_open’ xdp-tools-1.5.7/lib/util/xpcapng.c:547:12: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:552:14: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:552:14: acquire_memory: allocated here xdp-tools-1.5.7/lib/util/xpcapng.c:553:12: branch_false: following ‘false’ branch (when ‘pd’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:559:13: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:567:14: call_function: calling ‘pcapng_write_shb’ from ‘xpcapng_dump_open’ xdp-tools-1.5.7/lib/util/xpcapng.c:567:14: return_function: returning to ‘xpcapng_dump_open’ from ‘pcapng_write_shb’ xdp-tools-1.5.7/lib/util/xpcapng.c:567:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/lib/util/xpcapng.c:568:17: branch_false: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:573:12: branch_true: following ‘true’ branch (when ‘pd’ is non-NULL)... xdp-tools-1.5.7/lib/util/xpcapng.c:574:21: branch_true: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:574:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/lib/util/xpcapng.c:575:25: branch_true: ...to here xdp-tools-1.5.7/lib/util/xpcapng.c:575:25: danger: ‘pd’ leaks here; was allocated at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3) # 573| if (pd) { # 574| if (pd->pd_fd >= 0 && pd->pd_fd != STDOUT_FILENO) # 575|-> close(pd->pd_fd); # 576| # 577| free(pd); Error: GCC_ANALYZER_WARNING (CWE-457): [#def158] xdp-tools-1.5.7/xdp-bench/hash_func01.h:23:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(const __u16 *)&cpu_hash’ xdp-tools-1.5.7/xdp-bench/xdp_redirect_cpumap.bpf.c:511:6: enter_function: entry to ‘cpumap_l4_hash’ xdp-tools-1.5.7/xdp-bench/xdp_redirect_cpumap.bpf.c:528:12: branch_false: following ‘false’ branch (when ‘rec’ is non-NULL)... xdp-tools-1.5.7/xdp-bench/xdp_redirect_cpumap.bpf.c:530:9: call_function: inlined call to ‘__read_once_size’ from ‘cpumap_l4_hash’ xdp-tools-1.5.7/xdp-bench/xdp_redirect_cpumap.bpf.c:533:12: branch_false: following ‘false’ branch (when ‘cpu_max’ is non-NULL)... xdp-tools-1.5.7/xdp-bench/xdp_redirect_cpumap.bpf.c:536:15: call_function: inlined call to ‘parse_eth’ from ‘cpumap_l4_hash’ xdp-tools-1.5.7/xdp-bench/xdp_redirect_cpumap.bpf.c:542:28: call_function: inlined call to ‘get_ipv4_hash_ip_pair’ from ‘cpumap_l4_hash’ # 21| #pragma clang loop unroll(full) # 22| for (;len > 0; len--) { # 23|-> hash += get16bits (data); # 24| tmp = (get16bits (data+2) << 11) ^ hash; # 25| hash = (hash << 16) ^ tmp; Error: GCC_ANALYZER_WARNING (CWE-401): [#def159] xdp-tools-1.5.7/xdp-dump/xdpdump.c:750:37: warning[-Wanalyzer-malloc-leak]: leak of ‘program_names’ xdp-tools-1.5.7/xdp-dump/xdpdump.c:1638:13: enter_function: entry to ‘capture_on_interface’ xdp-tools-1.5.7/xdp-dump/xdpdump.c:1660:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-dump/xdpdump.c:1677:21: call_function: calling ‘find_target’ from ‘capture_on_interface’ # 748| # 749| for (unsigned int i = 0; i < progs->nr_of_progs; i++) { # 750|-> const char *kname = xdp_program__name(progs->progs[i].prog); # 751| const char *fname = progs->progs[i].func; # 752| uint32_t id = xdp_program__id(progs->progs[i].prog); Error: GCC_ANALYZER_WARNING (CWE-401): [#def160] xdp-tools-1.5.7/xdp-dump/xdpdump.c:752:31: warning[-Wanalyzer-malloc-leak]: leak of ‘program_names’ xdp-tools-1.5.7/xdp-dump/xdpdump.c:1638:13: enter_function: entry to ‘capture_on_interface’ xdp-tools-1.5.7/xdp-dump/xdpdump.c:1660:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-dump/xdpdump.c:1677:21: call_function: calling ‘find_target’ from ‘capture_on_interface’ # 750| const char *kname = xdp_program__name(progs->progs[i].prog); # 751| const char *fname = progs->progs[i].func; # 752|-> uint32_t id = xdp_program__id(progs->progs[i].prog); # 753| # 754| if (skip_index != (int)i) { Error: COMPILER_WARNING: [#def161] [important] xdp-tools-1.5.7/xdp-dump/xdpdump.h:49:34: error[error]: field ‘header’ has incomplete type # 47| #ifndef __bpf__ # 48| struct perf_sample_event { # 49|-> struct perf_event_header header; # 50| __u64 time; # 51| __u32 size; Error: COMPILER_WARNING: [#def162] [important] xdp-tools-1.5.7/xdp-dump/xdpdump.h:57:34: error[error]: field ‘header’ has incomplete type # 55| # 56| struct perf_lost_event { # 57|-> struct perf_event_header header; # 58| __u64 id; # 59| __u64 lost; Error: COMPILER_WARNING (CWE-9001): [#def163] xdp-tools-1.5.7/xdp-dump/xdpdump_bpf.c:25:1: warning[-Wattributes]: ‘preserve_access_index’ attribute directive ignored # 23| */ # 24| int ifindex; # 25|-> } __attribute__((preserve_access_index)); # 26| # 27| struct xdp_rxq_info { Error: COMPILER_WARNING (CWE-9001): [#def164] xdp-tools-1.5.7/xdp-dump/xdpdump_bpf.c:33:1: warning[-Wattributes]: ‘preserve_access_index’ attribute directive ignored # 31| struct net_device *dev; # 32| __u32 queue_index; # 33|-> } __attribute__((preserve_access_index)); # 34| # 35| struct xdp_buff { Error: COMPILER_WARNING (CWE-9001): [#def165] xdp-tools-1.5.7/xdp-dump/xdpdump_bpf.c:42:1: warning[-Wattributes]: ‘preserve_access_index’ attribute directive ignored # 40| unsigned long handle; # 41| struct xdp_rxq_info *rxq; # 42|-> } __attribute__((preserve_access_index)); # 43| # 44| /***************************************************************************** Error: GCC_ANALYZER_WARNING (CWE-401): [#def166] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:89:13: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:82:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:85:18: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:85:18: acquire_memory: allocated here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:86:12: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:89:13: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:89:13: danger: ‘values’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 87| return -ENOMEM; # 88| # 89|-> if ((bpf_map_lookup_elem(fd, key, values)) != 0) { # 90| err = -ENOENT; # 91| goto out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def167] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:126:13: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:119:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:122:18: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:122:18: acquire_memory: allocated here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:123:12: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:126:13: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:126:13: danger: ‘values’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) # 124| return -ENOMEM; # 125| # 126|-> if (bpf_map_lookup_elem(fd, key, values) != 0) { # 127| memset(values, 0, sizeof(*values) * nr_cpus); # 128| } else if (!flags && delete_empty) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def168] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of ‘find_prog_file(features)’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:254:5: enter_function: entry to ‘do_load’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:267:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:272:19: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:273:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:276:15: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:277:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:285:9: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:298:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:304:9: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:307:20: call_function: calling ‘find_prog_file’ from ‘do_load’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:307:20: return_function: returning to ‘do_load’ from ‘find_prog_file’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:308:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:313:9: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:313:9: danger: ‘find_prog_file(features)’ leaks here; was allocated at [(16)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/15) # 311| } # 312| # 313|-> pr_debug("Found prog '%s' matching feature set to be loaded on interface '%s'.\n", # 314| filename, opt->iface.ifname); # 315| Error: GCC_ANALYZER_WARNING (CWE-775): [#def169] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:373:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(pin_root_path, 65536)’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:362:18: acquire_resource: opened here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:363:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:373:23: branch_true: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:373:23: danger: ‘open(pin_root_path, 65536)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 371| # 372| if (!(features & (FEAT_TCP | FEAT_UDP))) { # 373|-> err = unlink_pinned_map(dir_fd, textify(MAP_NAME_PORTS)); # 374| if (err) # 375| goto out; Error: GCC_ANALYZER_WARNING (CWE-775): [#def170] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:379:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(pin_root_path, 65536)’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:362:18: acquire_resource: opened here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:363:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:379:23: branch_true: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:379:23: danger: ‘open(pin_root_path, 65536)’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) # 377| # 378| if (!(features & FEAT_IPV4)) { # 379|-> err = unlink_pinned_map(dir_fd, textify(MAP_NAME_IPV4)); # 380| if (err) # 381| goto out; Error: GCC_ANALYZER_WARNING (CWE-775): [#def171] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:385:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(pin_root_path, 65536)’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:362:18: acquire_resource: opened here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:363:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:384:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:384:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:385:23: branch_true: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:385:23: danger: ‘open(pin_root_path, 65536)’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 383| # 384| if (!(features & FEAT_IPV6)) { # 385|-> err = unlink_pinned_map(dir_fd, textify(MAP_NAME_IPV6)); # 386| if (err) # 387| goto out; Error: GCC_ANALYZER_WARNING (CWE-775): [#def172] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:391:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(pin_root_path, 65536)’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:362:18: acquire_resource: opened here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:363:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:384:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:384:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:390:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:390:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:391:23: branch_true: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:391:23: danger: ‘open(pin_root_path, 65536)’ leaks here; was opened at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0) # 389| # 390| if (!(features & FEAT_ETHERNET)) { # 391|-> err = unlink_pinned_map(dir_fd, textify(MAP_NAME_ETHERNET)); # 392| if (err) # 393| goto out; Error: GCC_ANALYZER_WARNING (CWE-775): [#def173] xdp-tools-1.5.7/xdp-filter/xdp-filter.c:429:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(pin_root_path, 65536)’ xdp-tools-1.5.7/xdp-filter/xdp-filter.c:362:18: acquire_resource: opened here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:363:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:372:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:378:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:384:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:384:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:390:14: branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:390:12: branch_false: following ‘false’ branch... branch_false: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:428:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-filter/xdp-filter.c:429:17: branch_true: ...to here xdp-tools-1.5.7/xdp-filter/xdp-filter.c:429:17: danger: ‘open(pin_root_path, 65536)’ leaks here; was opened at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0) # 427| out: # 428| if (dir_fd >= 0) # 429|-> close(dir_fd); # 430| # 431| return err; Error: COMPILER_WARNING: [#def174] [important] xdp-tools-1.5.7/xdp-forward/xdp_flowtable.bpf.c:150:17: error[-Wimplicit-function-declaration]: implicit declaration of function ‘__builtin_preserve_access_index’ # 148| * the host. # 149| */ # 150|-> bpf_core_read(&nat_port, bpf_core_type_size(nat_port), # 151| &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_port); # 152| ports->source = nat_port; Error: COMPILER_WARNING: [#def175] [important] xdp-tools-1.5.7/xdp-forward/xdp_flowtable.bpf.c:150:17: error[-Wimplicit-function-declaration]: implicit declaration of function ‘__builtin_preserve_type_info’ # 148| * the host. # 149| */ # 150|-> bpf_core_read(&nat_port, bpf_core_type_size(nat_port), # 151| &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_port); # 152| ports->source = nat_port; Error: GCC_ANALYZER_WARNING (CWE-401): [#def176] xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:68:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:53:1: enter_function: entry to ‘xdp_flowtable__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:59:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: call_function: calling ‘xdp_flowtable__create_skeleton’ from ‘xdp_flowtable__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: return_function: returning to ‘xdp_flowtable__open_opts’ from ‘xdp_flowtable__create_skeleton’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:65:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:68:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:68:15: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/7) # 66| goto err_out; # 67| # 68|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 69| if (err) # 70| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def177] xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:68:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:53:1: enter_function: entry to ‘xdp_flowtable__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:58:39: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:59:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: call_function: calling ‘xdp_flowtable__create_skeleton’ from ‘xdp_flowtable__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: return_function: returning to ‘xdp_flowtable__open_opts’ from ‘xdp_flowtable__create_skeleton’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:65:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:68:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:68:15: danger: ‘obj’ leaks here; was allocated at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1) # 66| goto err_out; # 67| # 68|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 69| if (err) # 70| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def178] xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:176:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:131:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:136:9: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:143:46: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:145:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:151:9: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:158:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:160:17: branch_true: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:176:9: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2) # 174| return 0; # 175| err: # 176|-> bpf_object__destroy_skeleton(s); # 177| return err; # 178| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def179] xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:176:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:53:1: enter_function: entry to ‘xdp_flowtable__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:58:39: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:59:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:64:15: call_function: calling ‘xdp_flowtable__create_skeleton’ from ‘xdp_flowtable__open_opts’ # 174| return 0; # 175| err: # 176|-> bpf_object__destroy_skeleton(s); # 177| return err; # 178| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def180] xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:176:9: warning[-Wanalyzer-malloc-leak]: leak of ‘s’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:130:43: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:131:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:136:9: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:145:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:147:17: branch_true: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable.skel.h:176:9: danger: ‘s’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0) # 174| return 0; # 175| err: # 176|-> bpf_object__destroy_skeleton(s); # 177| return err; # 178| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def181] xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:63:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:48:1: enter_function: entry to ‘xdp_flowtable_sample__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:54:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: call_function: calling ‘xdp_flowtable_sample__create_skeleton’ from ‘xdp_flowtable_sample__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: return_function: returning to ‘xdp_flowtable_sample__open_opts’ from ‘xdp_flowtable_sample__create_skeleton’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:60:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:63:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:63:15: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7) # 61| goto err_out; # 62| # 63|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 64| if (err) # 65| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def182] xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:63:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:48:1: enter_function: entry to ‘xdp_flowtable_sample__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:53:46: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:54:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: call_function: calling ‘xdp_flowtable_sample__create_skeleton’ from ‘xdp_flowtable_sample__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: return_function: returning to ‘xdp_flowtable_sample__open_opts’ from ‘xdp_flowtable_sample__create_skeleton’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:60:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:63:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:63:15: danger: ‘obj’ leaks here; was allocated at [(2)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/1) # 61| goto err_out; # 62| # 63|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 64| if (err) # 65| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def183] xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:153:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:48:1: enter_function: entry to ‘xdp_flowtable_sample__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:53:46: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:54:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:59:15: call_function: calling ‘xdp_flowtable_sample__create_skeleton’ from ‘xdp_flowtable_sample__open_opts’ # 151| return 0; # 152| err: # 153|-> bpf_object__destroy_skeleton(s); # 154| return err; # 155| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def184] xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:153:9: warning[-Wanalyzer-malloc-leak]: leak of ‘s’ xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:125:43: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:126:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:131:9: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:139:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:141:17: branch_true: ...to here xdp-tools-1.5.7/xdp-forward/xdp_flowtable_sample.skel.h:153:9: danger: ‘s’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0) # 151| return 0; # 152| err: # 153|-> bpf_object__destroy_skeleton(s); # 154| return err; # 155| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def185] xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:68:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:53:1: enter_function: entry to ‘xdp_forward__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:59:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: call_function: calling ‘xdp_forward__create_skeleton’ from ‘xdp_forward__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: return_function: returning to ‘xdp_forward__open_opts’ from ‘xdp_forward__create_skeleton’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:65:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:68:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:68:15: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7) # 66| goto err_out; # 67| # 68|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 69| if (err) # 70| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def186] xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:68:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:53:1: enter_function: entry to ‘xdp_forward__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:58:37: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:59:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: call_function: calling ‘xdp_forward__create_skeleton’ from ‘xdp_forward__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: return_function: returning to ‘xdp_forward__open_opts’ from ‘xdp_forward__create_skeleton’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:65:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:68:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:68:15: danger: ‘obj’ leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1) # 66| goto err_out; # 67| # 68|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 69| if (err) # 70| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def187] xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:176:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:131:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:136:9: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:143:46: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:145:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:151:9: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:158:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:160:17: branch_true: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:176:9: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 174| return 0; # 175| err: # 176|-> bpf_object__destroy_skeleton(s); # 177| return err; # 178| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def188] xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:176:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:53:1: enter_function: entry to ‘xdp_forward__open_opts’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:58:37: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:59:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:64:15: call_function: calling ‘xdp_forward__create_skeleton’ from ‘xdp_forward__open_opts’ # 174| return 0; # 175| err: # 176|-> bpf_object__destroy_skeleton(s); # 177| return err; # 178| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def189] xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:176:9: warning[-Wanalyzer-malloc-leak]: leak of ‘s’ xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:130:43: acquire_memory: allocated here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:131:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:136:9: branch_false: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:145:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:147:17: branch_true: ...to here xdp-tools-1.5.7/xdp-forward/xdp_forward.skel.h:176:9: danger: ‘s’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 174| return 0; # 175| err: # 176|-> bpf_object__destroy_skeleton(s); # 177| return err; # 178| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def190] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 120| } # 121| # 122|-> pr_debug("Loading %zu files on interface '%s'.\n", # 123| num_progs, opt->iface.ifname); # 124| Error: GCC_ANALYZER_WARNING (CWE-401): [#def191] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:129:9: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:129:9: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) # 127| * is a noop if verbose logging is enabled. # 128| */ # 129|-> silence_libbpf_logging(); # 130| # 131| retry: Error: GCC_ANALYZER_WARNING (CWE-401): [#def192] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:138:25: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:137:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:138:25: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:138:25: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 136| p = progs[i]; # 137| if (p) # 138|-> xdp_program__close(p); # 139| # 140| if (opt->prog_name) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def193] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:145:29: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:140:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:141:50: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:145:29: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 143| xdp_opts.opts = &opts; # 144| # 145|-> p = xdp_program__create(&xdp_opts); # 146| } else { # 147| p = xdp_program__open_file(opt->filenames.strings[i], Error: GCC_ANALYZER_WARNING (CWE-401): [#def194] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:147:29: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:140:20: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:148:52: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:147:29: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 145| p = xdp_program__create(&xdp_opts); # 146| } else { # 147|-> p = xdp_program__open_file(opt->filenames.strings[i], # 148| opt->section_name, &opts); # 149| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def195] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:151:23: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:151:23: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2) # 149| } # 150| # 151|-> err = libxdp_get_error(p); # 152| if (err) { # 153| if (err == -EPERM && !double_rlimit()) Error: GCC_ANALYZER_WARNING (CWE-401): [#def196] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:47: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:152:20: branch_true: following ‘true’ branch (when ‘err != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:28: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:28: branch_true: following ‘true’ branch (when ‘err == -1’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:47: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:47: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2) # 151| err = libxdp_get_error(p); # 152| if (err) { # 153|-> if (err == -EPERM && !double_rlimit()) # 154| goto retry; # 155| Error: GCC_ANALYZER_WARNING (CWE-401): [#def197] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:156:25: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:152:20: branch_true: following ‘true’ branch (when ‘err != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:28: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:156:25: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2) # 154| goto retry; # 155| # 156|-> libxdp_strerror(err, errmsg, sizeof(errmsg)); # 157| pr_warn("Couldn't open file '%s': %s\n", # 158| opt->filenames.strings[i], errmsg); Error: GCC_ANALYZER_WARNING (CWE-401): [#def198] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:157:25: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:152:20: branch_true: following ‘true’ branch (when ‘err != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:28: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:157:25: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2) # 155| # 156| libxdp_strerror(err, errmsg, sizeof(errmsg)); # 157|-> pr_warn("Couldn't open file '%s': %s\n", # 158| opt->filenames.strings[i], errmsg); # 159| goto out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def199] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:166:17: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:166:17: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2) # 164| * actually loading # 165| */ # 166|-> bpf_object__for_each_program(bpf_prog, xdp_program__bpf_obj(p)) # 167| bpf_program__set_autoload(bpf_prog, false); # 168| Error: GCC_ANALYZER_WARNING (CWE-401): [#def200] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:167:25: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:166:17: branch_true: following ‘true’ branch (when ‘bpf_prog’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:167:25: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:167:25: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2) # 165| */ # 166| bpf_object__for_each_program(bpf_prog, xdp_program__bpf_obj(p)) # 167|-> bpf_program__set_autoload(bpf_prog, false); # 168| # 169| if (opt->prio) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def201] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:170:31: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:169:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:170:31: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:170:31: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2) # 168| # 169| if (opt->prio) { # 170|-> err = xdp_program__set_run_prio(p, opt->prio); # 171| if (err) { # 172| pr_warn("Error setting run priority: %u\n", opt->prio); Error: GCC_ANALYZER_WARNING (CWE-401): [#def202] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:172:33: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:169:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:170:31: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:171:28: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:172:33: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:172:33: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2) # 170| err = xdp_program__set_run_prio(p, opt->prio); # 171| if (err) { # 172|-> pr_warn("Error setting run priority: %u\n", opt->prio); # 173| goto out; # 174| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def203] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:181:39: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:177:20: branch_true: following ‘true’ branch... branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:180:47: branch_true: following ‘true’ branch (when ‘a != 5’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:181:81: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:181:39: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2) # 179| # 180| for (a = XDP_ABORTED; a <= XDP_REDIRECT; a++) { # 181|-> err = xdp_program__set_chain_call_enabled(p, a, opt->actions & (1U << a)); # 182| if (err) { # 183| pr_warn("Error setting chain call action: %u\n", a); Error: GCC_ANALYZER_WARNING (CWE-401): [#def204] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:183:41: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:177:20: branch_true: following ‘true’ branch... branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:180:47: branch_true: following ‘true’ branch (when ‘a != 5’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:181:81: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:183:41: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2) # 181| err = xdp_program__set_chain_call_enabled(p, a, opt->actions & (1U << a)); # 182| if (err) { # 183|-> pr_warn("Error setting chain call action: %u\n", a); # 184| goto out; # 185| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def205] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:189:17: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:189:17: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2) # 187| } # 188| # 189|-> xdp_program__print_chain_call_actions(p, errmsg, sizeof(errmsg)); # 190| pr_debug("XDP program %zu: Run prio: %d. Chain call actions: %s\n", # 191| i, xdp_program__run_prio(p), errmsg); Error: GCC_ANALYZER_WARNING (CWE-401): [#def206] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:190:17: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:190:17: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2) # 188| # 189| xdp_program__print_chain_call_actions(p, errmsg, sizeof(errmsg)); # 190|-> pr_debug("XDP program %zu: Run prio: %d. Chain call actions: %s\n", # 191| i, xdp_program__run_prio(p), errmsg); # 192| Error: GCC_ANALYZER_WARNING (CWE-401): [#def207] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:196:25: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:193:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:196:25: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:196:25: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2) # 194| struct bpf_map *map; # 195| # 196|-> bpf_object__for_each_map(map, xdp_program__bpf_obj(p)) { # 197| err = bpf_map__set_pin_path(map, NULL); # 198| if (err) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def208] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:197:39: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:193:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:196:25: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:196:25: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:197:39: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:197:39: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2) # 195| # 196| bpf_object__for_each_map(map, xdp_program__bpf_obj(p)) { # 197|-> err = bpf_map__set_pin_path(map, NULL); # 198| if (err) { # 199| pr_warn("Error clearing map pin path: %s\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def209] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:199:41: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:193:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:196:25: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:196:25: branch_true: following ‘true’ branch (when ‘map’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:197:39: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:199:41: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2) # 197| err = bpf_map__set_pin_path(map, NULL); # 198| if (err) { # 199|-> pr_warn("Error clearing map pin path: %s\n", # 200| strerror(-err)); # 201| goto out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def210] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:209:15: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:20: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_false: following ‘false’ branch (when ‘i >= num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:210:61: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:209:15: danger: ‘progs’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4) # 207| } # 208| # 209|-> err = xdp_program__attach_multi(progs, num_progs, # 210| opt->iface.ifindex, opt->mode, 0); # 211| if (err) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def211] xdp-tools-1.5.7/xdp-loader/xdp-loader.c:231:25: warning[-Wanalyzer-malloc-leak]: leak of ‘progs’ xdp-tools-1.5.7/xdp-loader/xdp-loader.c:108:12: branch_false: following ‘false’ branch (when ‘num_progs != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:111:19: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:116:17: acquire_memory: allocated here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:117:12: branch_false: following ‘false’ branch (when ‘progs’ is non-NULL)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:122:9: branch_false: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:132:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:133:17: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:152:20: branch_true: following ‘true’ branch (when ‘err != 0’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:153:28: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:229:21: branch_true: following ‘true’ branch (when ‘i < num_progs’)... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:230:26: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:230:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-loader/xdp-loader.c:231:25: branch_true: ...to here xdp-tools-1.5.7/xdp-loader/xdp-loader.c:231:25: danger: ‘progs’ leaks here; was allocated at [(3)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/2) # 229| for (i = 0; i < num_progs; i++) # 230| if (progs[i]) # 231|-> xdp_program__close(progs[i]); # 232| free(progs); # 233| return err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def212] xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:97:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:82:1: enter_function: entry to ‘xdp_monitor__open_opts’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:88:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: call_function: calling ‘xdp_monitor__create_skeleton’ from ‘xdp_monitor__open_opts’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: return_function: returning to ‘xdp_monitor__open_opts’ from ‘xdp_monitor__create_skeleton’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:94:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:97:15: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:97:15: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7) # 95| goto err_out; # 96| # 97|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 98| if (err) # 99| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def213] xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:97:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:82:1: enter_function: entry to ‘xdp_monitor__open_opts’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:87:37: acquire_memory: allocated here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:88:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: call_function: calling ‘xdp_monitor__create_skeleton’ from ‘xdp_monitor__open_opts’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: return_function: returning to ‘xdp_monitor__open_opts’ from ‘xdp_monitor__create_skeleton’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:94:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:97:15: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:97:15: danger: ‘obj’ leaks here; was allocated at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1) # 95| goto err_out; # 96| # 97|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 98| if (err) # 99| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def214] xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:267:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:160:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:165:9: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:172:46: acquire_memory: allocated here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:174:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:180:9: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:225:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:227:17: branch_true: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:267:9: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 265| return 0; # 266| err: # 267|-> bpf_object__destroy_skeleton(s); # 268| return err; # 269| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def215] xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:267:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:82:1: enter_function: entry to ‘xdp_monitor__open_opts’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:87:37: acquire_memory: allocated here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:88:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:93:15: call_function: calling ‘xdp_monitor__create_skeleton’ from ‘xdp_monitor__open_opts’ # 265| return 0; # 266| err: # 267|-> bpf_object__destroy_skeleton(s); # 268| return err; # 269| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def216] xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:267:9: warning[-Wanalyzer-malloc-leak]: leak of ‘s’ xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:159:43: acquire_memory: allocated here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:160:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:165:9: branch_false: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:174:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:176:17: branch_true: ...to here xdp-tools-1.5.7/xdp-monitor/xdp_monitor.skel.h:267:9: danger: ‘s’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 265| return 0; # 266| err: # 267|-> bpf_object__destroy_skeleton(s); # 268| return err; # 269| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def217] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:278:17: warning[-Wanalyzer-malloc-leak]: leak of ‘threads’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:270:19: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:271:12: branch_false: following ‘false’ branch (when ‘threads’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:277:12: branch_true: following ‘true’ branch (when ‘t’ is NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:278:17: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:278:17: danger: ‘threads’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 276| t = calloc(num_threads, sizeof(struct thread_config)); # 277| if (!t) { # 278|-> pr_warn("Couldn't allocate memory\n"); # 279| free(threads); # 280| return -ENOMEM; Error: GCC_ANALYZER_WARNING (CWE-401): [#def218] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:287:29: warning[-Wanalyzer-malloc-leak]: leak of ‘threads’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:270:19: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:271:12: branch_false: following ‘false’ branch (when ‘threads’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:277:12: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)... branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:283:21: branch_true: following ‘true’ branch (when ‘i < num_threads’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:284:26: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:287:29: danger: ‘threads’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0) # 285| tcfg->cpu_core_id++; # 286| # 287|-> t[i].prog = xdp_program__clone(prog, 0); # 288| err = libxdp_get_error(t[i].prog); # 289| if (err) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def219] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:287:29: warning[-Wanalyzer-malloc-leak]: leak of ‘t’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:271:12: branch_false: following ‘false’ branch (when ‘threads’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:277:12: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)... branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:283:21: branch_true: following ‘true’ branch (when ‘i < num_threads’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:284:26: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:287:29: danger: ‘t’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2) # 285| tcfg->cpu_core_id++; # 286| # 287|-> t[i].prog = xdp_program__clone(prog, 0); # 288| err = libxdp_get_error(t[i].prog); # 289| if (err) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def220] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:288:23: warning[-Wanalyzer-malloc-leak]: leak of ‘threads’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:270:19: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:271:12: branch_false: following ‘false’ branch (when ‘threads’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:277:12: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)... branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:283:21: branch_true: following ‘true’ branch (when ‘i < num_threads’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:284:26: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:288:23: danger: ‘threads’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0) # 286| # 287| t[i].prog = xdp_program__clone(prog, 0); # 288|-> err = libxdp_get_error(t[i].prog); # 289| if (err) { # 290| pr_warn("Failed to clone xdp_program: %s\n", strerror(-err)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def221] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:288:23: warning[-Wanalyzer-malloc-leak]: leak of ‘t’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:271:12: branch_false: following ‘false’ branch (when ‘threads’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:277:12: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)... branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:283:21: branch_true: following ‘true’ branch (when ‘i < num_threads’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:284:26: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:288:23: danger: ‘t’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2) # 286| # 287| t[i].prog = xdp_program__clone(prog, 0); # 288|-> err = libxdp_get_error(t[i].prog); # 289| if (err) { # 290| pr_warn("Failed to clone xdp_program: %s\n", strerror(-err)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def222] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:290:25: warning[-Wanalyzer-malloc-leak]: leak of ‘threads’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:270:19: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:271:12: branch_false: following ‘false’ branch (when ‘threads’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:277:12: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)... branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:283:21: branch_true: following ‘true’ branch (when ‘i < num_threads’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:284:26: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:289:20: branch_true: following ‘true’ branch (when ‘err != 0’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:290:25: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:290:25: danger: ‘threads’ leaks here; was allocated at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0) # 288| err = libxdp_get_error(t[i].prog); # 289| if (err) { # 290|-> pr_warn("Failed to clone xdp_program: %s\n", strerror(-err)); # 291| t[i].prog = NULL; # 292| goto err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def223] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:290:25: warning[-Wanalyzer-malloc-leak]: leak of ‘t’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:271:12: branch_false: following ‘false’ branch (when ‘threads’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:276:13: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:277:12: branch_false: following ‘false’ branch (when ‘t’ is non-NULL)... branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:283:21: branch_true: following ‘true’ branch (when ‘i < num_threads’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:284:26: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:289:20: branch_true: following ‘true’ branch (when ‘err != 0’)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:290:25: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:290:25: danger: ‘t’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2) # 288| err = libxdp_get_error(t[i].prog); # 289| if (err) { # 290|-> pr_warn("Failed to clone xdp_program: %s\n", strerror(-err)); # 291| t[i].prog = NULL; # 292| goto err; Error: GCC_ANALYZER_WARNING (CWE-401): [#def224] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:386:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pkt’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:369:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:376:12: branch_false: following ‘false’ branch (when ‘pkt’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:379:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:386:14: danger: ‘pkt’ leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2) # 384| # 385| memcpy(pkt->eth.h_source, &src_mac, sizeof(src_mac)); # 386|-> if (!macaddr_is_null(&cfg->dst_mac)) # 387| memcpy(pkt->eth.h_dest, &cfg->dst_mac, sizeof(cfg->dst_mac)); # 388| Error: GCC_ANALYZER_WARNING (CWE-401): [#def225] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pkt’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:369:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:376:12: branch_false: following ‘false’ branch (when ‘pkt’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:379:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:386:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:14: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:14: danger: ‘pkt’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2) # 387| memcpy(pkt->eth.h_dest, &cfg->dst_mac, sizeof(cfg->dst_mac)); # 388| # 389|-> if (!ipaddr_is_null(&cfg->src_ip)) { # 390| if (cfg->src_ip.af != AF_INET6) { # 391| pr_warn("Only IPv6 is supported\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def226] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:391:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pkt’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:369:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:376:12: branch_false: following ‘false’ branch (when ‘pkt’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:379:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:386:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:14: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:390:21: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:390:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:391:25: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:391:25: danger: ‘pkt’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2) # 389| if (!ipaddr_is_null(&cfg->src_ip)) { # 390| if (cfg->src_ip.af != AF_INET6) { # 391|-> pr_warn("Only IPv6 is supported\n"); # 392| goto err; # 393| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def227] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:397:14: warning[-Wanalyzer-malloc-leak]: leak of ‘pkt’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:369:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:376:12: branch_false: following ‘false’ branch (when ‘pkt’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:379:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:386:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:14: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:397:14: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:397:14: danger: ‘pkt’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2) # 395| } # 396| # 397|-> if (!ipaddr_is_null(&cfg->dst_ip)) { # 398| if (cfg->dst_ip.af != AF_INET6) { # 399| pr_warn("Only IPv6 is supported\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def228] xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:399:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pkt’ xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:369:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:375:15: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:376:12: branch_false: following ‘false’ branch (when ‘pkt’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:379:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:386:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:14: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:389:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:397:14: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:397:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:398:21: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:398:20: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:399:25: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp-trafficgen.c:399:25: danger: ‘pkt’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2) # 397| if (!ipaddr_is_null(&cfg->dst_ip)) { # 398| if (cfg->dst_ip.af != AF_INET6) { # 399|-> pr_warn("Only IPv6 is supported\n"); # 400| goto err; # 401| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def229] xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:112:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:97:1: enter_function: entry to ‘xdp_trafficgen__open_opts’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:103:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: call_function: calling ‘xdp_trafficgen__create_skeleton’ from ‘xdp_trafficgen__open_opts’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: return_function: returning to ‘xdp_trafficgen__open_opts’ from ‘xdp_trafficgen__create_skeleton’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:109:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:112:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:112:15: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7) # 110| goto err_out; # 111| # 112|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 113| if (err) # 114| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def230] xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:112:15: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:97:1: enter_function: entry to ‘xdp_trafficgen__open_opts’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:102:40: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:103:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: call_function: calling ‘xdp_trafficgen__create_skeleton’ from ‘xdp_trafficgen__open_opts’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: return_function: returning to ‘xdp_trafficgen__open_opts’ from ‘xdp_trafficgen__create_skeleton’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:109:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:112:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:112:15: danger: ‘obj’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1) # 110| goto err_out; # 111| # 112|-> err = bpf_object__open_skeleton(obj->skeleton, opts); # 113| if (err) # 114| goto err_out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def231] xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:314:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:175:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:180:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:187:46: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:189:12: branch_false: following ‘false’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:195:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:248:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:250:17: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:314:9: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 312| return 0; # 313| err: # 314|-> bpf_object__destroy_skeleton(s); # 315| return err; # 316| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def232] xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:314:9: warning[-Wanalyzer-malloc-leak]: leak of ‘obj’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:97:1: enter_function: entry to ‘xdp_trafficgen__open_opts’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:102:40: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:103:12: branch_false: following ‘false’ branch (when ‘obj’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:108:15: call_function: calling ‘xdp_trafficgen__create_skeleton’ from ‘xdp_trafficgen__open_opts’ # 312| return 0; # 313| err: # 314|-> bpf_object__destroy_skeleton(s); # 315| return err; # 316| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def233] xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:314:9: warning[-Wanalyzer-malloc-leak]: leak of ‘s’ xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:174:43: acquire_memory: allocated here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:175:12: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:180:9: branch_false: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:189:12: branch_true: following ‘true’ branch... xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:191:17: branch_true: ...to here xdp-tools-1.5.7/xdp-trafficgen/xdp_trafficgen.skel.h:314:9: danger: ‘s’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 312| return 0; # 313| err: # 314|-> bpf_object__destroy_skeleton(s); # 315| return err; # 316| }
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-97.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-gcc-latest-x86_64 |
| project-name | xdp-tools-1.5.7-1.fc44 |
| store-results-to | /tmp/tmpyolxo6dg/xdp-tools-1.5.7-1.fc44.tar.xz |
| time-created | 2025-10-28 20:41:59 |
| time-finished | 2025-10-28 20:44:15 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpyolxo6dg/xdp-tools-1.5.7-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpyolxo6dg/xdp-tools-1.5.7-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |