wpa_supplicant-2.11-2.fc41

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/usr/share/doc/wpa_supplicant/examples/p2p-action-udhcp.sh:3:1: warning[SC2034]: IFNAME appears unused. Verify use (or export if used externally).
#    1|   #!/bin/sh
#    2|   
#    3|-> IFNAME=$1
#    4|   CMD=$2
#    5|   

Error: SHELLCHECK_WARNING (CWE-563): [#def2]
/usr/share/doc/wpa_supplicant/examples/p2p-action.sh:3:1: warning[SC2034]: IFNAME appears unused. Verify use (or export if used externally).
#    1|   #!/bin/sh
#    2|   
#    3|-> IFNAME=$1
#    4|   CMD=$2
#    5|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c: scope_hint: In function ‘dpp_relay_tcp_cb’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:2432:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(struct dpp_global *)eloop_ctx.relay_sock’
# 2430|   
# 2431|   	fd = accept(dpp->relay_sock, (struct sockaddr *) &addr, &addr_len);
# 2432|-> 	if (fd < 0) {
# 2433|   		wpa_printf(MSG_DEBUG,
# 2434|   			   "DPP: Failed to accept new connection: %s",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:2438:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/includes.h:38: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:10: included_from: Included from here.
# 2436|   		return;
# 2437|   	}
# 2438|-> 	wpa_printf(MSG_DEBUG, "DPP: Connection from %s:%d",
# 2439|   		   inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
# 2440|   

Error: GCC_ANALYZER_WARNING (CWE-416): [#def5]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c: scope_hint: In function ‘dpp_tcp_send_conn_status_msg’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:2638:57: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘conn’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c: scope_hint: In function ‘dpp_tcp_send_conn_status_msg’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c: scope_hint: In function ‘dpp_tcp_send_conn_status_msg’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:127:9: note: in expansion of macro ‘os_free’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp.h:15: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:18: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:2634:9: note: in expansion of macro ‘dl_list_for_each’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/dpp_tcp.c:2634:9: note: in expansion of macro ‘dl_list_for_each’
# 2636|   			/* This exchange will be terminated in the TX status
# 2637|   			 * handler */
# 2638|-> 			conn->on_tcp_tx_complete_remove = 1;
# 2639|   			break;
# 2640|   		}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/wpa_ctrl.c: scope_hint: In function ‘wpa_ctrl_open2’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/wpa_ctrl.c:151:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*<unknown>.s’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/wpa_ctrl.c:36: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/wpa_ctrl.c:121:23: note: in expansion of macro ‘os_snprintf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/wpa_ctrl.c: scope_hint: In function ‘wpa_ctrl_open2’
#  149|   	fchmod(ctrl->s, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
#  150|   #endif /* ANDROID */
#  151|-> 	if (bind(ctrl->s, (struct sockaddr *) &ctrl->local,
#  152|   		    sizeof(ctrl->local)) < 0) {
#  153|   		if (errno == EADDRINUSE && tries < 2) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/wpa_ctrl.c:208:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*<unknown>.s’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/wpa_ctrl.c: scope_hint: In function ‘wpa_ctrl_open2’
#  206|   #endif /* ANDROID */
#  207|   
#  208|-> 	ctrl->dest.sun_family = AF_UNIX;
#  209|   	if (os_strncmp(ctrl_path, "@abstract:", 10) == 0) {
#  210|   		ctrl->dest.sun_path[0] = '\0';

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_macsec_linux.c: scope_hint: In function ‘macsec_drv_init_sockets’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_macsec_linux.c:1566:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*drv.common.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_macsec_linux.c:24: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_macsec_linux.c:1552:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_macsec_linux.c:1560:9: note: in expansion of macro ‘os_memset’
# 1564|   		   addr.sll_ifindex);
# 1565|   
# 1566|-> 	if (bind(drv->common.sock, (struct sockaddr *) &addr, sizeof(addr)) < 0)
# 1567|   	{
# 1568|   		wpa_printf(MSG_ERROR, "bind: %s", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c: scope_hint: In function ‘bss_info_handler’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c:892:18: warning[-Wanalyzer-malloc-leak]: leak of ‘*res.res’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:589:16: note: in expansion of macro ‘os_realloc’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:589:16: note: in expansion of macro ‘os_realloc’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:589:16: note: in expansion of macro ‘os_realloc’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c: scope_hint: In function ‘bss_info_handler’
#  890|   	}
#  891|   	tmp[res->num++] = r;
#  892|-> 	res->res = tmp;
#  893|   
#  894|   	return NL_SKIP;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def10]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c: scope_hint: In function ‘wext_get_scan_mode’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1209:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*iwe.u.mode’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1157:17: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1534:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1543:25: note: in expansion of macro ‘os_memcpy’
# 1207|   			       struct wext_scan_data *res)
# 1208|   {
# 1209|-> 	if (iwe->u.mode == IW_MODE_ADHOC)
# 1210|   		res->res.caps |= IEEE80211_CAP_IBSS;
# 1211|   	else if (iwe->u.mode == IW_MODE_MASTER || iwe->u.mode == IW_MODE_INFRA)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c: scope_hint: In function ‘wext_get_scan_freq’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1237:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*iwe.u.freq.e’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1157:17: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1534:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1543:25: note: in expansion of macro ‘os_memcpy’
# 1235|   	int divi = 1000000, i;
# 1236|   
# 1237|-> 	if (iwe->u.freq.e == 0) {
# 1238|   		/*
# 1239|   		 * Some drivers do not report frequency, but a channel.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c: scope_hint: In function ‘wext_get_scan_qual’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1277:36: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*iwe.u.qual.qual’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1157:17: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1534:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1543:25: note: in expansion of macro ‘os_memcpy’
# 1275|   			       struct wext_scan_data *res)
# 1276|   {
# 1277|-> 	res->res.qual = iwe->u.qual.qual;
# 1278|   	res->res.noise = iwe->u.qual.noise;
# 1279|   	res->res.level = iwe->u.qual.level;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c: scope_hint: In function ‘wired_init_sockets’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:203:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*drv.common.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:189:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:197:9: note: in expansion of macro ‘os_memset’
#  201|   		   addr.sll_ifindex);
#  202|   
#  203|-> 	if (bind(drv->common.sock, (struct sockaddr *) &addr, sizeof(addr)) < 0)
#  204|   	{
#  205|   		wpa_printf(MSG_ERROR, "bind: %s", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:273:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*drv.dhcp_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:189:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:197:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:217:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:230:9: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:245:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired.c:263:9: note: in expansion of macro ‘os_memset’
#  271|   	}
#  272|   
#  273|-> 	if (bind(drv->dhcp_sock, (struct sockaddr *) &addr2,
#  274|   		 sizeof(struct sockaddr)) == -1) {
#  275|   		wpa_printf(MSG_ERROR, "bind: %s", strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired_common.c: scope_hint: In function ‘driver_wired_get_ifflags’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wired_common.c:39:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor
#   37|   
#   38|   	s = socket(PF_INET, SOCK_DGRAM, 0);
#   39|-> 	if (s < 0) {
#   40|   		wpa_printf(MSG_ERROR, "socket: %s", strerror(errno));
#   41|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/p2p/p2p_pd.c: scope_hint: In function ‘p2p_process_prov_disc_req’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/p2p/p2p_pd.c:760:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘req_fcap’
#  758|   
#  759|   		resp_fcap.cpt = p2ps_own_preferred_cpt(p2ps_adv->cpt_priority,
#  760|-> 						       req_fcap->cpt);
#  761|   
#  762|   		p2p_dbg(p2p, "cpt: service:0x%x remote:0x%x result:0x%x",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/p2p/p2p_pd.c:916:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘req_fcap’
#  914|   
#  915|   	resp_fcap.cpt = p2ps_own_preferred_cpt(p2p->p2ps_prov->cpt_priority,
#  916|-> 					       req_fcap->cpt);
#  917|   
#  918|   	p2p_dbg(p2p, "cpt: local:0x%x remote:0x%x result:0x%x",

Error: GCC_ANALYZER_WARNING (CWE-666): [#def18]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/radius/radius_client.c: scope_hint: In function ‘radius_change_server’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/radius/radius_client.c:1692:13: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘sel_sock’ in wrong phase
# 1690|   	}
# 1691|   
# 1692|-> 	if (connect(sel_sock, addr, addrlen) < 0) {
# 1693|   		if (nserv->tls && errno == EINPROGRESS) {
# 1694|   			wpa_printf(MSG_DEBUG,

Error: GCC_ANALYZER_WARNING (CWE-457): [#def19]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:24: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c: scope_hint: In function ‘wpa_driver_wext_event_wireless’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:430:63: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((u8 *)((char *)&iwe_buf + offsetof(struct iw_event, u)))[7]’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:452:36: note: in expansion of macro ‘MAC2STR’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:425:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:452:36: note: in expansion of macro ‘MAC2STR’
#  428|   
#  429|   #ifndef MAC2STR
#  430|-> #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
#  431|   #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
#  432|   

Error: GCC_ANALYZER_WARNING (CWE-479): [#def20]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/eloop.c: scope_hint: In function ‘eloop_handle_alarm’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/eloop.c:974:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/eloop.c:974:9: note: ‘_exit’ is a possible signal-safe alternative for ‘exit’
#  972|   		   "prevents clean shutdown.\n"
#  973|   		   "Killing program forcefully.\n");
#  974|-> 	exit(1);
#  975|   }
#  976|   #endif /* CONFIG_NATIVE_WINDOWS */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/list.h:43:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_nl80211.c: scope_hint: In function ‘nl80211_put_wiphy_data_ap’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_nl80211.c: scope_hint: In function ‘nl80211_put_wiphy_data_ap’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_nl80211.c: scope_hint: In function ‘nl80211_put_wiphy_data_ap’
#   41|   static inline void dl_list_del(struct dl_list *item)
#   42|   {
#   43|-> 	item->next->prev = item->prev;
#   44|   	item->prev->next = item->next;
#   45|   	item->next = NULL;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def22]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_dict_helpers.c:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_dict_helpers.c: scope_hint: In function ‘_wpa_dbus_dict_entry_get_string_array’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:511:20: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_dict_helpers.c:826:17: note: in expansion of macro ‘os_free’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:589:16: note: in expansion of macro ‘os_realloc’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:589:16: note: in expansion of macro ‘os_realloc’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_dict_helpers.c: scope_hint: In function ‘_wpa_dbus_dict_entry_get_string_array’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_dict_helpers.c:826:17: note: in expansion of macro ‘os_free’
#  509|   #endif
#  510|   #ifndef os_free
#  511|-> #define os_free(p) free((p))
#  512|   #endif
#  513|   #ifndef os_strdup

Error: GCC_ANALYZER_WARNING (CWE-126): [#def23]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c:10: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c: scope_hint: In function ‘eap_pwd_kdf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:523:28: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c:72:25: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c: scope_hint: In function ‘eap_pwd_kdf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c: scope_hint: In function ‘eap_pwd_kdf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c: scope_hint: In function ‘eap_pwd_kdf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c: scope_hint: In function ‘eap_pwd_kdf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c:72:25: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c:72:25: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:523:28: note: read of 96 bytes from after the end of ‘digest’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c:72:25: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:523:28: note: valid subscripts for ‘digest’ are ‘[0]’ to ‘[31]’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_common/eap_pwd_common.c:72:25: note: in expansion of macro ‘os_memcpy’
#  521|   
#  522|   #ifndef os_memcpy
#  523|-> #define os_memcpy(d, s, n) memcpy((d), (s), (n))
#  524|   #endif
#  525|   #ifndef os_memmove

Error: GCC_ANALYZER_WARNING: [#def24]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/wps/wps_registrar.c:11: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/wps/wps_registrar.c: scope_hint: In function ‘wps_registrar_remove_authorized_mac’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:523:28: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to ‘memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/wps/wps_registrar.c:271:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/wps/wps_registrar.c:15: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/wps/wps_registrar.c:914:9: note: in expansion of macro ‘dl_list_for_each_safe’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:532:38: note: in definition of macro ‘os_memcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:523:41: note: in definition of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/wps/wps_registrar.c:271:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/includes.h:24: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/wps/wps_registrar.c:9: included_from: Included from here.
/usr/include/string.h:43:14: note: the behavior of ‘memcpy’ is undefined for overlapping buffers
#  521|   
#  522|   #ifndef os_memcpy
#  523|-> #define os_memcpy(d, s, n) memcpy((d), (s), (n))
#  524|   #endif
#  525|   #ifndef os_memmove

Error: GCC_ANALYZER_WARNING (CWE-457): [#def25]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c: scope_hint: In function ‘wpa_driver_wext_get_scan_results’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:523:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(unsigned char (*)[6])((char *)&iwe_buf + offsetof(struct iw_event, u) + 2)’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1557:25: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1157:17: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1534:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1543:25: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:511:26: note: in definition of macro ‘os_free’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/drivers/driver_wext.c:1557:25: note: in expansion of macro ‘os_memcpy’
#  521|   
#  522|   #ifndef os_memcpy
#  523|-> #define os_memcpy(d, s, n) memcpy((d), (s), (n))
#  524|   #endif
#  525|   #ifndef os_memmove

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/p2p/p2p_build.c:11: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h: scope_hint: In function ‘wpabuf_put_data.part.0’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:523:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h:176:17: note: in expansion of macro ‘os_memcpy’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpa_debug.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:560: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h: scope_hint: In function ‘wpabuf_put_data.part.0’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h:176:17: note: in expansion of macro ‘os_memcpy’
#  521|   
#  522|   #ifndef os_memcpy
#  523|-> #define os_memcpy(d, s, n) memcpy((d), (s), (n))
#  524|   #endif
#  525|   #ifndef os_memmove

Error: COMPILER_WARNING (CWE-563): [#def27]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:26: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h: scope_hint: In function ‘testing_set_fail_pattern’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:698:49: warning[-Wunused-parameter]: unused parameter ‘is_alloc’
#  698 | static inline int testing_set_fail_pattern(bool is_alloc, char *patterns)
#      |                                                 ^
#  696|   #define TEST_FAIL() 0
#  697|   #define TEST_FAIL_TAG(tag) 0
#  698|-> static inline int testing_set_fail_pattern(bool is_alloc, char *patterns)
#  699|   {
#  700|   	return -1;

Error: COMPILER_WARNING (CWE-563): [#def28]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:698:65: warning[-Wunused-parameter]: unused parameter ‘patterns’
#  698 | static inline int testing_set_fail_pattern(bool is_alloc, char *patterns)
#      |                                                           ~~~~~~^~~~~~~~
#  696|   #define TEST_FAIL() 0
#  697|   #define TEST_FAIL_TAG(tag) 0
#  698|-> static inline int testing_set_fail_pattern(bool is_alloc, char *patterns)
#  699|   {
#  700|   	return -1;

Error: COMPILER_WARNING (CWE-563): [#def29]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h: scope_hint: In function ‘testing_get_fail_pattern’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:703:49: warning[-Wunused-parameter]: unused parameter ‘is_alloc’
#  703 | static inline int testing_get_fail_pattern(bool is_alloc, char *buf,
#      |                                                 ^
#  701|   }
#  702|   
#  703|-> static inline int testing_get_fail_pattern(bool is_alloc, char *buf,
#  704|   					   size_t buflen)
#  705|   {

Error: COMPILER_WARNING (CWE-563): [#def30]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:703:65: warning[-Wunused-parameter]: unused parameter ‘buf’
#  703 | static inline int testing_get_fail_pattern(bool is_alloc, char *buf,
#      |                                                           ~~~~~~^~~
#  701|   }
#  702|   
#  703|-> static inline int testing_get_fail_pattern(bool is_alloc, char *buf,
#  704|   					   size_t buflen)
#  705|   {

Error: COMPILER_WARNING (CWE-563): [#def31]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:704:51: warning[-Wunused-parameter]: unused parameter ‘buflen’
#  704 |                                            size_t buflen)
#      |                                            ~~~~~~~^~~~~~
#  702|   
#  703|   static inline int testing_get_fail_pattern(bool is_alloc, char *buf,
#  704|-> 					   size_t buflen)
#  705|   {
#  706|   	return -1;

Error: COMPILER_WARNING (CWE-590): [#def32]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_1187’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def33]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_154’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def34]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_157’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def35]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_255’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def36]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_258’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def37]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_29’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def38]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_310’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def39]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_515’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def40]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_624’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: COMPILER_WARNING (CWE-590): [#def41]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.c:202:17: warning[-Wfree-nonheap-object]: ‘free’ called on pointer ‘_682’ with nonzero offset 32
#  202 |                 os_free(buf->buf);
#      |                 ^
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os_unix.c:486:16: note: returned from ‘calloc’
#  486 |         return calloc(1, size);
#      |                ^
#  200|   		return;
#  201|   	if (buf->flags & WPABUF_FLAG_EXT_DATA)
#  202|-> 		os_free(buf->buf);
#  203|   	os_free(buf);
#  204|   #endif /* WPA_TRACE */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h:60:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘adv_proto’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dpp_supplicant.c: scope_hint: In function ‘wpas_dpp_gas_resp_cb’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dpp_supplicant.c: scope_hint: In function ‘wpas_dpp_gas_resp_cb’
#   58|   static inline size_t wpabuf_len(const struct wpabuf *buf)
#   59|   {
#   60|-> 	return buf->used;
#   61|   }
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def43]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h:60:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘in_decrypted’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_peer/eap_fast.c: scope_hint: In function ‘eap_fast_decrypt’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_peer/eap_fast.c: scope_hint: In function ‘eap_fast_decrypt’
#   58|   static inline size_t wpabuf_len(const struct wpabuf *buf)
#   59|   {
#   60|-> 	return buf->used;
#   61|   }
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h:60:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘query_resp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/gas_server.c: scope_hint: In function ‘gas_server_send_resp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/gas_server.c: scope_hint: In function ‘gas_server_send_resp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/gas_server.c:14: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/common/gas_server.c:226:9: note: in expansion of macro ‘dl_list_for_each’
#   58|   static inline size_t wpabuf_len(const struct wpabuf *buf)
#   59|   {
#   60|-> 	return buf->used;
#   61|   }
#   62|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h:95:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘reqData’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_peer/eap_aka.c: scope_hint: In function ‘eap_aka_process’
#   93|   static inline const void * wpabuf_head(const struct wpabuf *buf)
#   94|   {
#   95|-> 	return buf->buf;
#   96|   }
#   97|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/wpabuf.h:110:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘in_decrypted’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/eap_peer/eap_peap.c: scope_hint: In function ‘eap_peap_decrypt’
#  108|   static inline void * wpabuf_mhead(struct wpabuf *buf)
#  109|   {
#  110|-> 	return buf->buf;
#  111|   }
#  112|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def47]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/config.c: scope_hint: In function ‘wpa_config_debug_dump_networks’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/config.c:4723:24: warning[-Wanalyzer-deref-before-check]: check of ‘ssid’ for NULL after already dereferencing it
# 4721|   		wpa_printf(MSG_DEBUG, "Priority group %d",
# 4722|   			   ssid->priority);
# 4723|-> 		while (ssid) {
# 4724|   			wpa_printf(MSG_DEBUG, "   id=%d ssid='%s'",
# 4725|   				   ssid->id,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:621:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:23: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:525:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:612:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:253:16: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:256:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:272:15: note: in expansion of macro ‘os_snprintf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:290:9: note: in expansion of macro ‘os_free’
#  619|   		goto fail;
#  620|   	os_strlcpy(addr.sun_path, fname, sizeof(addr.sun_path));
#  621|-> 	if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
#  622|   		wpa_printf(MSG_DEBUG, "ctrl_iface bind(PF_UNIX) failed: %s",
#  623|   			   strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:624:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:525:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:612:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:253:16: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:256:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:272:15: note: in expansion of macro ‘os_snprintf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:290:9: note: in expansion of macro ‘os_free’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/includes.h:28: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:9: included_from: Included from here.
#  622|   		wpa_printf(MSG_DEBUG, "ctrl_iface bind(PF_UNIX) failed: %s",
#  623|   			   strerror(errno));
#  624|-> 		if (connect(priv->sock, (struct sockaddr *) &addr,
#  625|   			    sizeof(addr)) < 0) {
#  626|   			wpa_printf(MSG_DEBUG, "ctrl_iface exists, but does not"

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:635:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:525:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:612:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:253:16: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:256:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:272:15: note: in expansion of macro ‘os_snprintf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:290:9: note: in expansion of macro ‘os_free’
#  633|   				goto fail;
#  634|   			}
#  635|-> 			if (bind(priv->sock, (struct sockaddr *) &addr,
#  636|   				 sizeof(addr)) < 0) {
#  637|   				wpa_printf(MSG_ERROR, "supp-ctrl-iface-init: bind(PF_UNIX): %s",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:641:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:525:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:612:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:253:16: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:256:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:272:15: note: in expansion of macro ‘os_snprintf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:290:9: note: in expansion of macro ‘os_free’
#  639|   				goto fail;
#  640|   			}
#  641|-> 			wpa_printf(MSG_DEBUG, "Successfully replaced leftover "
#  642|   				   "ctrl_iface socket '%s'", fname);
#  643|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:654:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:525:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:600:13: note: in expansion of macro ‘os_strlen’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:612:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:253:16: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:256:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:272:15: note: in expansion of macro ‘os_snprintf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:290:9: note: in expansion of macro ‘os_free’
#  652|   	}
#  653|   
#  654|-> 	if (gid_set && lchown(fname, -1, gid) < 0) {
#  655|   		wpa_printf(MSG_ERROR, "lchown[ctrl_interface=%s,gid=%d]: %s",
#  656|   			   fname, (int) gid, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:660:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:525:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:612:9: note: in expansion of macro ‘os_memset’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:253:16: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:256:13: note: in expansion of macro ‘os_strncmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:272:15: note: in expansion of macro ‘os_snprintf’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:290:9: note: in expansion of macro ‘os_free’
#  658|   	}
#  659|   
#  660|-> 	if (chmod(fname, S_IRWXU | S_IRWXG) < 0) {
#  661|   		wpa_printf(MSG_ERROR, "chmod[ctrl_interface=%s]: %s",
#  662|   			   fname, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c: scope_hint: In function ‘wpas_global_ctrl_iface_open_sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1231:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1221:9: note: in expansion of macro ‘os_memset’
# 1229|   		os_strlcpy(addr.sun_path + 1, ctrl + 10,
# 1230|   			   sizeof(addr.sun_path) - 1);
# 1231|-> 		if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) <
# 1232|   		    0) {
# 1233|   			wpa_printf(MSG_ERROR, "supp-global-ctrl-iface-init: "

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1238:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1221:9: note: in expansion of macro ‘os_memset’
# 1236|   			goto fail;
# 1237|   		}
# 1238|-> 		wpa_printf(MSG_DEBUG, "Using Abstract control socket '%s'",
# 1239|   			   ctrl + 10);
# 1240|   		goto havesock;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1244:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1221:9: note: in expansion of macro ‘os_memset’
# 1242|   
# 1243|   	os_strlcpy(addr.sun_path, ctrl, sizeof(addr.sun_path));
# 1244|-> 	if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
# 1245|   		wpa_printf(MSG_INFO, "supp-global-ctrl-iface-init(%s) (will try fixup): bind(PF_UNIX): %s",
# 1246|   			   ctrl, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1247:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1221:9: note: in expansion of macro ‘os_memset’
# 1245|   		wpa_printf(MSG_INFO, "supp-global-ctrl-iface-init(%s) (will try fixup): bind(PF_UNIX): %s",
# 1246|   			   ctrl, strerror(errno));
# 1247|-> 		if (connect(priv->sock, (struct sockaddr *) &addr,
# 1248|   			    sizeof(addr)) < 0) {
# 1249|   			wpa_printf(MSG_DEBUG, "ctrl_iface exists, but does not"

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1258:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1221:9: note: in expansion of macro ‘os_memset’
# 1256|   				goto fail;
# 1257|   			}
# 1258|-> 			if (bind(priv->sock, (struct sockaddr *) &addr,
# 1259|   				 sizeof(addr)) < 0) {
# 1260|   				wpa_printf(MSG_ERROR, "supp-glb-iface-init: bind(PF_UNIX;%s): %s",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1264:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1221:9: note: in expansion of macro ‘os_memset’
# 1262|   				goto fail;
# 1263|   			}
# 1264|-> 			wpa_printf(MSG_DEBUG, "Successfully replaced leftover "
# 1265|   				   "ctrl_iface socket '%s'",
# 1266|   				   ctrl);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1277:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*priv.sock’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/ctrl_iface_unix.c:1221:9: note: in expansion of macro ‘os_memset’
# 1275|   	}
# 1276|   
# 1277|-> 	wpa_printf(MSG_DEBUG, "Using UNIX control socket '%s'", ctrl);
# 1278|   
# 1279|   	if (global->params.ctrl_interface_group) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c: scope_hint: In function ‘wpas_dbus_handler_p2p_invite’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:816:25: warning[-Wanalyzer-malloc-leak]: leak of ‘peer_object_path’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:813:21: note: in expansion of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:517:29: note: in definition of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:815:44: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:813:21: note: in expansion of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:517:29: note: in definition of macro ‘os_strdup’
#  814|   		    entry.type == DBUS_TYPE_OBJECT_PATH) {
#  815|   			peer_object_path = os_strdup(entry.str_value);
#  816|-> 			wpa_dbus_dict_entry_clear(&entry);
#  817|   		} else if (os_strcmp(entry.key, "persistent_group_object") ==
#  818|   			   0 &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:822:25: warning[-Wanalyzer-malloc-leak]: leak of ‘pg_object_path’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:813:21: note: in expansion of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:517:29: note: in definition of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:820:42: note: in expansion of macro ‘os_strdup’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_handlers_p2p.c:813:21: note: in expansion of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:517:29: note: in definition of macro ‘os_strdup’
#  820|   			pg_object_path = os_strdup(entry.str_value);
#  821|   			persistent = 1;
#  822|-> 			wpa_dbus_dict_entry_clear(&entry);
#  823|   		} else {
#  824|   			wpa_dbus_dict_entry_clear(&entry);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def63]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/common.h:12: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:13: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c: scope_hint: In function ‘add_interface’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:33:36: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:556:35: note: in definition of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:14: included_from: Included from here.
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:32:9: note: in expansion of macro ‘dl_list_for_each’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:556:35: note: in definition of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:556:35: note: in definition of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:33:36: note: read of 8 bytes from after the end of ‘ifaces’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:556:35: note: in definition of macro ‘os_strcmp’
#   31|   
#   32|   	dl_list_for_each(iface, list, struct interfaces, list) {
#   33|-> 		if (os_strcmp(iface->dbus_interface, dbus_interface) == 0)
#   34|   			return iface; /* already in the list */
#   35|   	}

Error: GCC_ANALYZER_WARNING (CWE-126): [#def64]
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c: scope_hint: In function ‘extract_interfaces_methods’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:105:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:32:9: note: in expansion of macro ‘dl_list_for_each’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/src/utils/os.h:556:35: note: in definition of macro ‘os_strcmp’
wpa_supplicant-2.11-build/wpa_supplicant-2.11/wpa_supplicant/dbus/dbus_new_introspect.c:105:25: note: read of 8 bytes from after the end of ‘ifaces’
#  103|   		iface = add_interface(list, dsc->dbus_interface);
#  104|   		if (iface)
#  105|-> 			add_entry(iface->xml, "method", dsc->dbus_method,
#  106|   				  dsc->args, 1);
#  107|   	}

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-210.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namewpa_supplicant-2.11-2.fc41
store-results-to/tmp/tmpgplg_odq/wpa_supplicant-2.11-2.fc41.tar.xz
time-created2024-11-13 03:34:06
time-finished2024-11-13 03:37:48
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpgplg_odq/wpa_supplicant-2.11-2.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpgplg_odq/wpa_supplicant-2.11-2.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9