libteam-1.32-8.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
libteam-1.32-build/libteam-1.32/examples/team_manual_control.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def2]
libteam-1.32-build/libteam-1.32/examples/team_manual_control.c:208:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  206|   
#  207|   	if (strcmp(cmd, "dumplist") == 0) {
#  208|-> 		err = cmd_dumplist(th, argc, argv);
#  209|   	} else if (strcmp(cmd, "set") == 0) {
#  210|   		err = cmd_set(th, argc, argv);

Error: CLANG_WARNING: [#def3]
libteam-1.32-build/libteam-1.32/examples/team_manual_control.c:210:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  208|   		err = cmd_dumplist(th, argc, argv);
#  209|   	} else if (strcmp(cmd, "set") == 0) {
#  210|-> 		err = cmd_set(th, argc, argv);
#  211|   	} else if (strcmp(cmd, "get") == 0) {
#  212|   		err = cmd_get(th, argc, argv);

Error: CLANG_WARNING: [#def4]
libteam-1.32-build/libteam-1.32/examples/team_manual_control.c:212:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  210|   		err = cmd_set(th, argc, argv);
#  211|   	} else if (strcmp(cmd, "get") == 0) {
#  212|-> 		err = cmd_get(th, argc, argv);
#  213|   	} else {
#  214|   		fprintf(stderr, "Unknown command \"%s\".\n", cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libteam-1.32-build/libteam-1.32/include/private/list.h:47:25: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 56)’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c:46: included_from: Included from here.
libteam-1.32-build/libteam-1.32/teamd/teamd.h:56:37: note: in expansion of macro ‘teamd_log_dbgx’
libteam-1.32-build/libteam-1.32/teamd/teamd.c:1899:9: note: in expansion of macro ‘teamd_log_dbg’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c:475:9: note: in expansion of macro ‘list_for_each_node_entry’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
#   45|   	new_node->prev = prev_node;
#   46|   	new_node->next = next_node;
#   47|-> 	prev_node->next = new_node;
#   48|   	next_node->prev = new_node;
#   49|   }

Error: GCC_ANALYZER_WARNING (CWE-124): [#def6]
libteam-1.32-build/libteam-1.32/teamd/teamd_state.c:28: included_from: Included from here.
libteam-1.32-build/libteam-1.32/include/private/misc.h: scope_hint: In function ‘hwaddr_str’
libteam-1.32-build/libteam-1.32/include/private/misc.h:64:14: warning[-Wanalyzer-out-of-bounds]: heap-based buffer underwrite
#   62|   	if (len)
#   63|   		str--;
#   64|-> 	*str = '\0';
#   65|   }
#   66|   

Error: CPPCHECK_WARNING: [#def7]
libteam-1.32-build/libteam-1.32/libteam/ifinfo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def8]
libteam-1.32-build/libteam-1.32/libteam/libteam.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
libteam-1.32-build/libteam-1.32/libteam/options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
libteam-1.32-build/libteam-1.32/libteam/ports.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
libteam-1.32-build/libteam-1.32/libteamdctl/cli_dbus.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def12]
libteam-1.32-build/libteam-1.32/libteamdctl/cli_usock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def13]
libteam-1.32-build/libteam-1.32/libteamdctl/cli_usock.c:211:14: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  209|   
#  210|   	if (p_reply) {
#  211|-> 		replystr = strdup(replystr);
#  212|   		if (!replystr) {
#  213|   			err = -ENOMEM;

Error: CPPCHECK_WARNING: [#def14]
libteam-1.32-build/libteam-1.32/libteamdctl/libteamdctl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
libteam-1.32-build/libteam-1.32/teamd/teamd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def16]
libteam-1.32-build/libteam-1.32/teamd/teamd_balancer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def17]
libteam-1.32-build/libteam-1.32/teamd/teamd_bpf_chef.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def18]
libteam-1.32-build/libteam-1.32/teamd/teamd_ctl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def19]
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def20]
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c:396:14: warning[core.NullDereference]: Access to field 'fd_w' results in a dereference of a null pointer (loaded from variable 'dp')
#  394|   
#  395|   retry:
#  396|-> 	err = write(dp->fd_w, "a", 1);
#  397|   	if (err == -1 && errno == EINTR)
#  398|   		goto retry;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c: scope_hint: In function ‘wakeup_dispatch’
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c:396:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dp’
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c:28: included_from: Included from here.
#  394|   
#  395|   retry:
#  396|-> 	err = write(dp->fd_w, "a", 1);
#  397|   	if (err == -1 && errno == EINTR)
#  398|   		goto retry;

Error: CPPCHECK_WARNING (CWE-401): [#def22]
libteam-1.32-build/libteam-1.32/teamd/teamd_events.c:256: error[memleak]: Memory leak: watch
#  254|   	watch->priv = priv;
#  255|   	list_add_tail(&ctx->event_watch_list, &watch->list);
#  256|-> 	return 0;
#  257|   }
#  258|   

Error: CPPCHECK_WARNING: [#def23]
libteam-1.32-build/libteam-1.32/teamd/teamd_ifinfo_watch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def24]
libteam-1.32-build/libteam-1.32/teamd/teamd_json.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def25]
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_arp_ping.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def26]
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_psr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def27]
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_tipc.c:72: error[uninitvar]: Uninitialized variable: l->peer
#   70|   
#   71|   	LIST_FOREACH(l, &priv->links, next) {
#   72|-> 		if ((tipc_cluster(l->peer) == tipc_cluster(addr)) && l->up)
#   73|   			return true;
#   74|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_tipc.c: scope_hint: In function ‘lw_tipc_filter_events’
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_tipc.c:125:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘remote’
#  123|   		tipc_cluster(lnr->peer), tipc_node(lnr->peer));
#  124|   	remote = strstr(name, needle);
#  125|-> 	*(remote++) = '\0';
#  126|   	bearer = strchr(name, ':') + 1;
#  127|   	return strcmp(bearer, tipc_ppriv->bearer);

Error: CPPCHECK_WARNING: [#def29]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_activebackup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-401): [#def30]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_activebackup.c:622: error[memleak]: Memory leak: info
#  620|   	info->ifindex = tdport->ifindex;
#  621|   	teamd_workq_schedule_work(ctx, &info->workq);
#  622|-> 	return 0;
#  623|   }
#  624|   

Error: CPPCHECK_WARNING: [#def31]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def32]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c:27: included_from: Included from here.
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c:418:53: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*prio_info.system_priority’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
#  416|   
#  417|   	/* adjust values for further memcmp comparison */
#  418|-> 	prio_info->system_priority = ntohs(prio_info->system_priority);
#  419|   	prio_info->key = 0;
#  420|   	prio_info->port_priority = ntohs(prio_info->port_priority);

Error: CPPCHECK_WARNING (CWE-401): [#def33]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c:1819: error[memleak]: Memory leak: info
# 1817|   	info->ifindex = gsc->info.tdport->ifindex;
# 1818|   	teamd_workq_schedule_work(ctx, &info->workq);
# 1819|-> 	return 0;
# 1820|   }
# 1821|   

Error: CPPCHECK_WARNING: [#def34]
libteam-1.32-build/libteam-1.32/teamd/teamd_state.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def35]
libteam-1.32-build/libteam-1.32/teamd/teamd_state.c:114:6: warning[core.NullDereference]: Access to field 'subpath' results in a dereference of a null pointer (loaded from variable 'child_val')
#  112|   
#  113|   			err = __reg_val(ctx, child_val, priv, subpath,
#  114|-> 					child_val->subpath, per_port,
#  115|   					tdport, val);
#  116|   			if (err)

Error: CPPCHECK_WARNING: [#def36]
libteam-1.32-build/libteam-1.32/teamd/teamd_usock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def37]
libteam-1.32-build/libteam-1.32/utils/teamdctl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
libteam-1.32-build/libteam-1.32/utils/teamdctl.c: scope_hint: In function ‘print_cmd’
libteam-1.32-build/libteam-1.32/utils/teamdctl.c:935:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘command_type’
libteam-1.32-build/libteam-1.32/utils/teamdctl.c: scope_hint: In function ‘print_cmd’
#  933|   static void print_cmd(struct command_type *command_type)
#  934|   {
#  935|-> 	if (command_type->parent_id != ID_CMDTYPE_NONE) {
#  936|   		print_cmd(__get_cmd_by_id(command_type->parent_id));
#  937|   		pr_out(" ");

Error: CPPCHECK_WARNING: [#def39]
libteam-1.32-build/libteam-1.32/utils/teamnl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def40]
libteam-1.32-build/libteam-1.32/utils/teamnl.c:577:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'cmd_ctx.array_index_arg'
#  575|   			return EXIT_FAILURE;
#  576|   		default:
#  577|-> 			fprintf(stderr, "unknown option \"%c\".\n", opt);
#  578|   			print_help(argv0);
#  579|   			return EXIT_FAILURE;

Error: CLANG_WARNING: [#def41]
libteam-1.32-build/libteam-1.32/utils/teamnl.c:577:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'cmd_ctx.port_devname_arg'
#  575|   			return EXIT_FAILURE;
#  576|   		default:
#  577|-> 			fprintf(stderr, "unknown option \"%c\".\n", opt);
#  578|   			print_help(argv0);
#  579|   			return EXIT_FAILURE;

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-15.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibteam-1.32-8.fc41
store-results-to/tmp/tmp7wrekmv9/libteam-1.32-8.fc41.tar.xz
time-created2024-07-03 15:58:55
time-finished2024-07-03 16:00:14
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp7wrekmv9/libteam-1.32-8.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp7wrekmv9/libteam-1.32-8.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9