libnftnl-1.3.1-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libnftnl-1.3.1/src/batch.c:37:23: warning[-Wanalyzer-malloc-leak]: leak of 'batch'
libnftnl-1.3.1/src/batch.c:58:21: enter_function: entry to 'nftnl_batch_alloc'
libnftnl-1.3.1/src/batch.c:63:17: acquire_memory: allocated here
libnftnl-1.3.1/src/batch.c:64:12: branch_false: following 'false' branch (when 'batch' is non-NULL)...
libnftnl-1.3.1/src/batch.c:67:9: branch_false: ...to here
libnftnl-1.3.1/src/batch.c:71:16: call_function: calling 'nftnl_batch_page_alloc' from 'nftnl_batch_alloc'
#   35|   		goto err1;
#   36|   
#   37|-> 	page->batch = mnl_nlmsg_batch_start(buf, batch->page_size);
#   38|   	if (page->batch == NULL)
#   39|   		goto err2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libnftnl-1.3.1/src/batch.c:37:23: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
libnftnl-1.3.1/src/batch.c:30:12: branch_false: following 'false' branch (when 'page' is non-NULL)...
libnftnl-1.3.1/src/batch.c:33:22: branch_false: ...to here
libnftnl-1.3.1/src/batch.c:33:15: acquire_memory: allocated here
libnftnl-1.3.1/src/batch.c:34:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
libnftnl-1.3.1/src/batch.c:37:23: branch_false: ...to here
libnftnl-1.3.1/src/batch.c:37:23: throw: if 'mnl_nlmsg_batch_start' throws an exception...
libnftnl-1.3.1/src/batch.c:37:23: danger: 'buf' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   35|   		goto err1;
#   36|   
#   37|-> 	page->batch = mnl_nlmsg_batch_start(buf, batch->page_size);
#   38|   	if (page->batch == NULL)
#   39|   		goto err2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libnftnl-1.3.1/src/batch.c:37:23: warning[-Wanalyzer-malloc-leak]: leak of 'page'
libnftnl-1.3.1/src/batch.c:29:16: acquire_memory: allocated here
libnftnl-1.3.1/src/batch.c:30:12: branch_false: following 'false' branch (when 'page' is non-NULL)...
libnftnl-1.3.1/src/batch.c:33:22: branch_false: ...to here
libnftnl-1.3.1/src/batch.c:34:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
libnftnl-1.3.1/src/batch.c:37:23: branch_false: ...to here
libnftnl-1.3.1/src/batch.c:37:23: throw: if 'mnl_nlmsg_batch_start' throws an exception...
libnftnl-1.3.1/src/batch.c:37:23: danger: 'page' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   35|   		goto err1;
#   36|   
#   37|-> 	page->batch = mnl_nlmsg_batch_start(buf, batch->page_size);
#   38|   	if (page->batch == NULL)
#   39|   		goto err2;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def4]
libnftnl-1.3.1/src/chain.c:212:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  210|   					  attr, data, data_len);
#  211|   	case NFTNL_CHAIN_HOOKNUM:
#  212|-> 		memcpy(&c->hooknum, data, sizeof(c->hooknum));
#  213|   		break;
#  214|   	case NFTNL_CHAIN_PRIO:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def5]
libnftnl-1.3.1/src/chain.c:215:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  213|   		break;
#  214|   	case NFTNL_CHAIN_PRIO:
#  215|-> 		memcpy(&c->prio, data, sizeof(c->prio));
#  216|   		break;
#  217|   	case NFTNL_CHAIN_POLICY:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def6]
libnftnl-1.3.1/src/chain.c:218:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  216|   		break;
#  217|   	case NFTNL_CHAIN_POLICY:
#  218|-> 		memcpy(&c->policy, data, sizeof(c->policy));
#  219|   		break;
#  220|   	case NFTNL_CHAIN_USE:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def7]
libnftnl-1.3.1/src/chain.c:221:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  219|   		break;
#  220|   	case NFTNL_CHAIN_USE:
#  221|-> 		memcpy(&c->use, data, sizeof(c->use));
#  222|   		break;
#  223|   	case NFTNL_CHAIN_BYTES:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def8]
libnftnl-1.3.1/src/chain.c:224:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  222|   		break;
#  223|   	case NFTNL_CHAIN_BYTES:
#  224|-> 		memcpy(&c->bytes, data, sizeof(c->bytes));
#  225|   		break;
#  226|   	case NFTNL_CHAIN_PACKETS:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def9]
libnftnl-1.3.1/src/chain.c:227:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  225|   		break;
#  226|   	case NFTNL_CHAIN_PACKETS:
#  227|-> 		memcpy(&c->packets, data, sizeof(c->packets));
#  228|   		break;
#  229|   	case NFTNL_CHAIN_HANDLE:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def10]
libnftnl-1.3.1/src/chain.c:230:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  228|   		break;
#  229|   	case NFTNL_CHAIN_HANDLE:
#  230|-> 		memcpy(&c->handle, data, sizeof(c->handle));
#  231|   		break;
#  232|   	case NFTNL_CHAIN_FAMILY:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def11]
libnftnl-1.3.1/src/chain.c:233:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  231|   		break;
#  232|   	case NFTNL_CHAIN_FAMILY:
#  233|-> 		memcpy(&c->family, data, sizeof(c->family));
#  234|   		break;
#  235|   	case NFTNL_CHAIN_TYPE:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def12]
libnftnl-1.3.1/src/chain.c:246:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  244|   		break;
#  245|   	case NFTNL_CHAIN_FLAGS:
#  246|-> 		memcpy(&c->chain_flags, data, sizeof(c->chain_flags));
#  247|   		break;
#  248|   	case NFTNL_CHAIN_ID:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def13]
libnftnl-1.3.1/src/chain.c:249:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/chain.c:291:6: enter_function: entry to 'nftnl_chain_set_u8'
libnftnl-1.3.1/src/chain.c:293:9: call_function: calling 'nftnl_chain_set_data' from 'nftnl_chain_set_u8'
#  247|   		break;
#  248|   	case NFTNL_CHAIN_ID:
#  249|-> 		memcpy(&c->chain_id, data, sizeof(c->chain_id));
#  250|   		break;
#  251|   	case NFTNL_CHAIN_USERDATA:

Error: CPPCHECK_WARNING (CWE-457): [#def14]
libnftnl-1.3.1/src/chain.c:1014: error[uninitvar]: Uninitialized variable: c
# 1012|   
# 1013|   	hlist_for_each_entry(c, n, &chain_list->name_hash[key], hnode) {
# 1014|-> 		if (!strcmp(chain, c->name))
# 1015|   			return c;
# 1016|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libnftnl-1.3.1/src/expr.c:33:54: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_expr_alloc(mnl_attr_get_str(tb[1]))'
libnftnl-1.3.1/src/expr.c:253:20: enter_function: entry to 'nftnl_expr_parse'
libnftnl-1.3.1/src/expr.c:258:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/expr.c:261:50: branch_false: ...to here
libnftnl-1.3.1/src/expr.c:261:16: call_function: calling 'nftnl_expr_alloc' from 'nftnl_expr_parse'
libnftnl-1.3.1/src/expr.c:261:16: return_function: returning to 'nftnl_expr_parse' from 'nftnl_expr_alloc'
libnftnl-1.3.1/src/expr.c:262:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/expr.c:265:13: branch_false: ...to here
libnftnl-1.3.1/src/expr.c:265:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/expr.c:266:13: branch_true: ...to here
libnftnl-1.3.1/src/expr.c:265:13: branch_true: following 'true' branch...
libnftnl-1.3.1/src/expr.c:267:13: branch_true: ...to here
libnftnl-1.3.1/src/expr.c:267:13: throw: if the called function throws an exception...
libnftnl-1.3.1/src/expr.c:33:54: danger: 'nftnl_expr_alloc(mnl_attr_get_str(tb[1]))' leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#   31|   		return NULL;
#   32|   
#   33|-> 	expr = calloc(1, sizeof(struct nftnl_expr) + ops->alloc_len);
#   34|   	if (expr == NULL)
#   35|   		return NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
libnftnl-1.3.1/src/expr.c:42:17: warning[-Wanalyzer-malloc-leak]: leak of 'expr'
libnftnl-1.3.1/src/expr.c:30:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/expr.c:33:54: branch_false: ...to here
libnftnl-1.3.1/src/expr.c:33:16: acquire_memory: allocated here
libnftnl-1.3.1/src/expr.c:34:12: branch_false: following 'false' branch (when 'expr' is non-NULL)...
libnftnl-1.3.1/src/expr.c:38:9: branch_false: ...to here
libnftnl-1.3.1/src/expr.c:41:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/expr.c:42:17: branch_true: ...to here
libnftnl-1.3.1/src/expr.c:42:17: throw: if the called function throws an exception...
libnftnl-1.3.1/src/expr.c:42:17: danger: 'expr' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   40|   
#   41|   	if (ops->init)
#   42|-> 		ops->init(expr);
#   43|   
#   44|   	return expr;

Error: CPPCHECK_WARNING (CWE-758): [#def17]
libnftnl-1.3.1/src/expr/data_reg.c:144: error[overlappingWriteUnion]: Overlapping read/write of union is undefined behavior
#  142|   		if (type)
#  143|   			*type = DATA_VERDICT;
#  144|-> 		data->len = sizeof(data->verdict);
#  145|   		break;
#  146|   	case NFT_JUMP:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
libnftnl-1.3.1/src/expr/match.c:150:36: warning[-Wanalyzer-malloc-leak]: leak of 'match_data'
libnftnl-1.3.1/src/expr/match.c:123:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/expr/match.c:126:13: branch_false: ...to here
libnftnl-1.3.1/src/expr/match.c:139:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/expr/match.c:140:32: branch_true: ...to here
libnftnl-1.3.1/src/expr/match.c:143:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/expr/match.c:146:30: branch_false: ...to here
libnftnl-1.3.1/src/expr/match.c:146:30: acquire_memory: allocated here
libnftnl-1.3.1/src/expr/match.c:147:20: branch_false: following 'false' branch (when 'match_data' is non-NULL)...
libnftnl-1.3.1/src/expr/match.c:150:57: branch_false: ...to here
libnftnl-1.3.1/src/expr/match.c:150:36: throw: if 'mnl_attr_get_payload' throws an exception...
libnftnl-1.3.1/src/expr/match.c:150:36: danger: 'match_data' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  148|   			return -1;
#  149|   
#  150|-> 		memcpy(match_data, mnl_attr_get_payload(tb[NFTA_MATCH_INFO]), len);
#  151|   
#  152|   		match->data = match_data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libnftnl-1.3.1/src/expr/target.c:150:37: warning[-Wanalyzer-malloc-leak]: leak of 'target_data'
libnftnl-1.3.1/src/expr/target.c:123:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/expr/target.c:126:13: branch_false: ...to here
libnftnl-1.3.1/src/expr/target.c:139:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/expr/target.c:140:32: branch_true: ...to here
libnftnl-1.3.1/src/expr/target.c:143:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/expr/target.c:146:31: branch_false: ...to here
libnftnl-1.3.1/src/expr/target.c:146:31: acquire_memory: allocated here
libnftnl-1.3.1/src/expr/target.c:147:20: branch_false: following 'false' branch (when 'target_data' is non-NULL)...
libnftnl-1.3.1/src/expr/target.c:150:58: branch_false: ...to here
libnftnl-1.3.1/src/expr/target.c:150:37: throw: if 'mnl_attr_get_payload' throws an exception...
libnftnl-1.3.1/src/expr/target.c:150:37: danger: 'target_data' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  148|   			return -1;
#  149|   
#  150|-> 		memcpy(target_data, mnl_attr_get_payload(tb[NFTA_TARGET_INFO]), len);
#  151|   
#  152|   		target->data = target_data;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def20]
libnftnl-1.3.1/src/flowtable.c:134:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/flowtable.c:154:6: enter_function: entry to 'nftnl_flowtable_set_s32'
libnftnl-1.3.1/src/flowtable.c:156:9: call_function: calling 'nftnl_flowtable_set_data' from 'nftnl_flowtable_set_s32'
#  132|   		break;
#  133|   	case NFTNL_FLOWTABLE_HANDLE:
#  134|-> 		memcpy(&c->handle, data, sizeof(c->handle));
#  135|   		break;
#  136|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libnftnl-1.3.1/src/obj/tunnel.c:462:13: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:631:39: call_function: calling 'nftnl_obj_tunnel_parse_vxlan' from 'nftnl_obj_tunnel_parse_opts'
#  460|   	struct nftnl_tunnel_opt *opt;
#  461|   
#  462|-> 	if (mnl_attr_parse_nested(attr, nftnl_obj_tunnel_vxlan_cb, tb) < 0)
#  463|   		return -1;
#  464|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libnftnl-1.3.1/src/obj/tunnel.c:469:13: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_tunnel_opt_alloc(0)'
libnftnl-1.3.1/src/obj/tunnel.c:457:1: enter_function: entry to 'nftnl_obj_tunnel_parse_vxlan'
libnftnl-1.3.1/src/obj/tunnel.c:462:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:465:15: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:465:15: call_function: calling 'nftnl_tunnel_opt_alloc' from 'nftnl_obj_tunnel_parse_vxlan'
libnftnl-1.3.1/src/obj/tunnel.c:465:15: return_function: returning to 'nftnl_obj_tunnel_parse_vxlan' from 'nftnl_tunnel_opt_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:466:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:469:13: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:469:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:471:25: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:471:25: throw: if 'mnl_attr_get_u32' throws an exception...
libnftnl-1.3.1/src/obj/tunnel.c:469:13: danger: 'nftnl_tunnel_opt_alloc(0)' leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  467|   		return -1;
#  468|   
#  469|-> 	if (tb[NFTA_TUNNEL_KEY_VXLAN_GBP]) {
#  470|   		opt->vxlan.gbp =
#  471|   			ntohl(mnl_attr_get_u32(tb[NFTA_TUNNEL_KEY_VXLAN_GBP]));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libnftnl-1.3.1/src/obj/tunnel.c:471:25: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:631:39: call_function: calling 'nftnl_obj_tunnel_parse_vxlan' from 'nftnl_obj_tunnel_parse_opts'
#  469|   	if (tb[NFTA_TUNNEL_KEY_VXLAN_GBP]) {
#  470|   		opt->vxlan.gbp =
#  471|-> 			ntohl(mnl_attr_get_u32(tb[NFTA_TUNNEL_KEY_VXLAN_GBP]));
#  472|   		opt->flags |= (1 << NFTNL_TUNNEL_VXLAN_GBP);
#  473|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libnftnl-1.3.1/src/obj/tunnel.c:518:13: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_tunnel_opt_alloc(1)'
libnftnl-1.3.1/src/obj/tunnel.c:506:1: enter_function: entry to 'nftnl_obj_tunnel_parse_erspan'
libnftnl-1.3.1/src/obj/tunnel.c:511:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:514:15: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:514:15: call_function: calling 'nftnl_tunnel_opt_alloc' from 'nftnl_obj_tunnel_parse_erspan'
libnftnl-1.3.1/src/obj/tunnel.c:514:15: return_function: returning to 'nftnl_obj_tunnel_parse_erspan' from 'nftnl_tunnel_opt_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:515:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:518:13: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:518:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:520:25: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:520:25: throw: if 'mnl_attr_get_u32' throws an exception...
libnftnl-1.3.1/src/obj/tunnel.c:518:13: danger: 'nftnl_tunnel_opt_alloc(1)' leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
#  516|   		return -1;
#  517|   
#  518|-> 	if (tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION]) {
#  519|   		opt->erspan.version =
#  520|   			ntohl(mnl_attr_get_u32(tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION]));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libnftnl-1.3.1/src/obj/tunnel.c:577:13: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:641:36: branch_true: following 'true' branch (when 'opts' is NULL)...
libnftnl-1.3.1/src/obj/tunnel.c:642:48: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:642:48: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:642:48: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:644:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:647:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:647:39: call_function: calling 'nftnl_obj_tunnel_parse_geneve' from 'nftnl_obj_tunnel_parse_opts'
#  575|   	struct nftnl_tunnel_opt *opt;
#  576|   
#  577|-> 	if (mnl_attr_parse_nested(attr, nftnl_obj_tunnel_geneve_cb, tb) < 0)
#  578|   		return -1;
#  579|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libnftnl-1.3.1/src/obj/tunnel.c:584:13: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_tunnel_opt_alloc(2)'
libnftnl-1.3.1/src/obj/tunnel.c:572:1: enter_function: entry to 'nftnl_obj_tunnel_parse_geneve'
libnftnl-1.3.1/src/obj/tunnel.c:577:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:580:15: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:580:15: call_function: calling 'nftnl_tunnel_opt_alloc' from 'nftnl_obj_tunnel_parse_geneve'
libnftnl-1.3.1/src/obj/tunnel.c:580:15: return_function: returning to 'nftnl_obj_tunnel_parse_geneve' from 'nftnl_tunnel_opt_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:581:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:584:13: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:584:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:586:25: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:586:25: throw: if 'mnl_attr_get_u16' throws an exception...
libnftnl-1.3.1/src/obj/tunnel.c:584:13: danger: 'nftnl_tunnel_opt_alloc(2)' leaks here; was allocated at [(8)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/7)
#  582|   		return -1;
#  583|   
#  584|-> 	if (tb[NFTA_TUNNEL_KEY_GENEVE_CLASS]) {
#  585|   		opt->geneve.geneve_class =
#  586|   			ntohs(mnl_attr_get_u16(tb[NFTA_TUNNEL_KEY_GENEVE_CLASS]));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libnftnl-1.3.1/src/obj/tunnel.c:586:25: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:641:36: branch_true: following 'true' branch (when 'opts' is NULL)...
libnftnl-1.3.1/src/obj/tunnel.c:642:48: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:642:48: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:642:48: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:644:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:647:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:647:39: call_function: calling 'nftnl_obj_tunnel_parse_geneve' from 'nftnl_obj_tunnel_parse_opts'
#  584|   	if (tb[NFTA_TUNNEL_KEY_GENEVE_CLASS]) {
#  585|   		opt->geneve.geneve_class =
#  586|-> 			ntohs(mnl_attr_get_u16(tb[NFTA_TUNNEL_KEY_GENEVE_CLASS]));
#  587|   		opt->flags |= (1 << NFTNL_TUNNEL_GENEVE_CLASS);
#  588|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libnftnl-1.3.1/src/obj/tunnel.c:592:25: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:641:36: branch_true: following 'true' branch (when 'opts' is NULL)...
libnftnl-1.3.1/src/obj/tunnel.c:642:48: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:642:48: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:642:48: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:644:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:647:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:647:39: call_function: calling 'nftnl_obj_tunnel_parse_geneve' from 'nftnl_obj_tunnel_parse_opts'
#  590|   	if (tb[NFTA_TUNNEL_KEY_GENEVE_TYPE]) {
#  591|   		opt->geneve.type =
#  592|-> 			mnl_attr_get_u8(tb[NFTA_TUNNEL_KEY_GENEVE_TYPE]);
#  593|   		opt->flags |= (1 << NFTNL_TUNNEL_GENEVE_TYPE);
#  594|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libnftnl-1.3.1/src/obj/tunnel.c:597:32: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:641:36: branch_true: following 'true' branch (when 'opts' is NULL)...
libnftnl-1.3.1/src/obj/tunnel.c:642:48: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:642:48: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:642:48: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:644:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:647:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:647:39: call_function: calling 'nftnl_obj_tunnel_parse_geneve' from 'nftnl_obj_tunnel_parse_opts'
#  595|   
#  596|   	if (tb[NFTA_TUNNEL_KEY_GENEVE_DATA]) {
#  597|-> 		uint32_t len = mnl_attr_get_payload_len(tb[NFTA_TUNNEL_KEY_GENEVE_DATA]);
#  598|   
#  599|   		memcpy(opt->geneve.data,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libnftnl-1.3.1/src/obj/tunnel.c:622:21: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:21: throw: if 'mnl_attr_validate' throws an exception...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: danger: 'opts' leaks here; was allocated at [(10)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/9)
#  620|   
#  621|   	mnl_attr_for_each_nested(attr, nest) {
#  622|-> 		if (mnl_attr_validate(attr, MNL_TYPE_NESTED) < 0)
#  623|   			abi_breakage();
#  624|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libnftnl-1.3.1/src/obj/tunnel.c:623:25: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:623:25: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:623:25: throw: if '__abi_breakage' throws an exception...
libnftnl-1.3.1/src/obj/tunnel.c:623:25: danger: 'opts' leaks here; was allocated at [(10)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/9)
#  621|   	mnl_attr_for_each_nested(attr, nest) {
#  622|   		if (mnl_attr_validate(attr, MNL_TYPE_NESTED) < 0)
#  623|-> 			abi_breakage();
#  624|   
#  625|   		switch(mnl_attr_get_type(attr)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libnftnl-1.3.1/src/obj/tunnel.c:625:24: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:625:24: throw: if 'mnl_attr_get_type' throws an exception...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: danger: 'opts' leaks here; was allocated at [(10)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/9)
#  623|   			abi_breakage();
#  624|   
#  625|-> 		switch(mnl_attr_get_type(attr)) {
#  626|   			case NFTA_TUNNEL_KEY_OPTS_VXLAN:
#  627|   				opts = nftnl_tunnel_opts_alloc(NFTNL_TUNNEL_TYPE_VXLAN);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libnftnl-1.3.1/src/obj/tunnel.c:658:1: warning[-Wanalyzer-malloc-leak]: leak of 'opts'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:658:1: danger: 'opts' leaks here; was allocated at [(10)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/9)
#  656|   
#  657|   	return err;
#  658|-> }
#  659|   
#  660|   static int

Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
libnftnl-1.3.1/src/obj/tunnel.c:741:9: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_tunnel_opts_alloc(0)'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:627:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:627:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:628:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:631:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:631:39: call_function: calling 'nftnl_obj_tunnel_parse_vxlan' from 'nftnl_obj_tunnel_parse_opts'
#  739|   
#  740|   	opts->type = type;
#  741|-> 	INIT_LIST_HEAD(&opts->opts_list);
#  742|   
#  743|   	return opts;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
libnftnl-1.3.1/src/obj/tunnel.c:741:9: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_tunnel_opts_alloc(1)'
libnftnl-1.3.1/src/obj/tunnel.c:614:1: enter_function: entry to 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:621:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/obj/tunnel.c:622:21: branch_true: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:622:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:625:24: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:634:40: call_function: calling 'nftnl_tunnel_opts_alloc' from 'nftnl_obj_tunnel_parse_opts'
libnftnl-1.3.1/src/obj/tunnel.c:634:40: return_function: returning to 'nftnl_obj_tunnel_parse_opts' from 'nftnl_tunnel_opts_alloc'
libnftnl-1.3.1/src/obj/tunnel.c:635:36: branch_false: following 'false' branch...
libnftnl-1.3.1/src/obj/tunnel.c:638:39: branch_false: ...to here
libnftnl-1.3.1/src/obj/tunnel.c:638:39: call_function: calling 'nftnl_obj_tunnel_parse_erspan' from 'nftnl_obj_tunnel_parse_opts'
#  739|   
#  740|   	opts->type = type;
#  741|-> 	INIT_LIST_HEAD(&opts->opts_list);
#  742|   
#  743|   	return opts;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def36]
libnftnl-1.3.1/src/object.c:123:28: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/object.c:177:5: enter_function: entry to 'nftnl_obj_set_u16'
libnftnl-1.3.1/src/object.c:179:16: call_function: calling 'nftnl_obj_set_data' from 'nftnl_obj_set_u16'
#  121|   					  attr, data, data_len);
#  122|   	case NFTNL_OBJ_TYPE:
#  123|-> 		obj->ops = nftnl_obj_ops_lookup(*((uint32_t *)data));
#  124|   		if (!obj->ops)
#  125|   			return -1;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def37]
libnftnl-1.3.1/src/object.c:128:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/object.c:177:5: enter_function: entry to 'nftnl_obj_set_u16'
libnftnl-1.3.1/src/object.c:179:16: call_function: calling 'nftnl_obj_set_data' from 'nftnl_obj_set_u16'
#  126|   		break;
#  127|   	case NFTNL_OBJ_FAMILY:
#  128|-> 		memcpy(&obj->family, data, sizeof(obj->family));
#  129|   		break;
#  130|   	case NFTNL_OBJ_USE:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def38]
libnftnl-1.3.1/src/object.c:131:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/object.c:177:5: enter_function: entry to 'nftnl_obj_set_u16'
libnftnl-1.3.1/src/object.c:179:16: call_function: calling 'nftnl_obj_set_data' from 'nftnl_obj_set_u16'
#  129|   		break;
#  130|   	case NFTNL_OBJ_USE:
#  131|-> 		memcpy(&obj->use, data, sizeof(obj->use));
#  132|   		break;
#  133|   	case NFTNL_OBJ_HANDLE:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def39]
libnftnl-1.3.1/src/object.c:134:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/object.c:183:5: enter_function: entry to 'nftnl_obj_set_u32'
libnftnl-1.3.1/src/object.c:185:16: call_function: calling 'nftnl_obj_set_data' from 'nftnl_obj_set_u32'
#  132|   		break;
#  133|   	case NFTNL_OBJ_HANDLE:
#  134|-> 		memcpy(&obj->handle, data, sizeof(obj->handle));
#  135|   		break;
#  136|   	case NFTNL_OBJ_USERDATA:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def40]
libnftnl-1.3.1/src/rule.c:120:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/rule.c:163:6: enter_function: entry to 'nftnl_rule_set_u32'
libnftnl-1.3.1/src/rule.c:165:9: call_function: calling 'nftnl_rule_set_data' from 'nftnl_rule_set_u32'
#  118|   					  attr, data, data_len);
#  119|   	case NFTNL_RULE_HANDLE:
#  120|-> 		memcpy(&r->handle, data, sizeof(r->handle));
#  121|   		break;
#  122|   	case NFTNL_RULE_COMPAT_PROTO:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def41]
libnftnl-1.3.1/src/rule.c:132:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/rule.c:163:6: enter_function: entry to 'nftnl_rule_set_u32'
libnftnl-1.3.1/src/rule.c:165:9: call_function: calling 'nftnl_rule_set_data' from 'nftnl_rule_set_u32'
#  130|   		break;
#  131|   	case NFTNL_RULE_POSITION:
#  132|-> 		memcpy(&r->position, data, sizeof(r->position));
#  133|   		break;
#  134|   	case NFTNL_RULE_USERDATA:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libnftnl-1.3.1/src/set.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_set_alloc()'
libnftnl-1.3.1/src/set.c:363:19: enter_function: entry to 'nftnl_set_clone'
libnftnl-1.3.1/src/set.c:368:18: call_function: calling 'nftnl_set_alloc' from 'nftnl_set_clone'
libnftnl-1.3.1/src/set.c:368:18: return_function: returning to 'nftnl_set_clone' from 'nftnl_set_alloc'
libnftnl-1.3.1/src/set.c:369:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:372:9: branch_false: ...to here
libnftnl-1.3.1/src/set.c:374:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:379:13: branch_false: ...to here
libnftnl-1.3.1/src/set.c:379:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:385:9: branch_false: ...to here
libnftnl-1.3.1/src/set.c:386:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/set.c:387:27: branch_true: ...to here
libnftnl-1.3.1/src/set.c:387:27: throw: if 'nftnl_set_elem_clone' throws an exception...
libnftnl-1.3.1/src/set.c:35:9: danger: 'nftnl_set_alloc()' leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   33|   		return NULL;
#   34|   
#   35|-> 	INIT_LIST_HEAD(&s->element_list);
#   36|   	INIT_LIST_HEAD(&s->expr_list);
#   37|   	return s;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libnftnl-1.3.1/src/set.c:53:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libnftnl-1.3.1/src/set.c:363:19: enter_function: entry to 'nftnl_set_clone'
libnftnl-1.3.1/src/set.c:368:18: call_function: calling 'nftnl_set_alloc' from 'nftnl_set_clone'
libnftnl-1.3.1/src/set.c:368:18: return_function: returning to 'nftnl_set_clone' from 'nftnl_set_alloc'
libnftnl-1.3.1/src/set.c:369:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:372:9: branch_false: ...to here
libnftnl-1.3.1/src/set.c:374:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/set.c:375:40: branch_true: ...to here
libnftnl-1.3.1/src/set.c:375:33: acquire_memory: allocated here
libnftnl-1.3.1/src/set.c:376:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:379:13: branch_false: ...to here
libnftnl-1.3.1/src/set.c:379:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:385:9: branch_false: ...to here
libnftnl-1.3.1/src/set.c:386:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/set.c:387:27: branch_true: ...to here
libnftnl-1.3.1/src/set.c:388:20: branch_true: following 'true' branch...
libnftnl-1.3.1/src/set.c:389:25: branch_true: ...to here
libnftnl-1.3.1/src/set.c:398:9: call_function: calling 'nftnl_set_free' from 'nftnl_set_clone'
#   51|   		xfree(s->user.data);
#   52|   
#   53|-> 	list_for_each_entry_safe(expr, next, &s->expr_list, head) {
#   54|   		list_del(&expr->head);
#   55|   		nftnl_expr_free(expr);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def44]
libnftnl-1.3.1/src/set.c:155:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/set.c:239:6: enter_function: entry to 'nftnl_set_set_u32'
libnftnl-1.3.1/src/set.c:241:9: call_function: calling 'nftnl_set_set_data' from 'nftnl_set_set_u32'
#  153|   					  attr, data, data_len);
#  154|   	case NFTNL_SET_HANDLE:
#  155|-> 		memcpy(&s->handle, data, sizeof(s->handle));
#  156|   		break;
#  157|   	case NFTNL_SET_FLAGS:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def45]
libnftnl-1.3.1/src/set.c:200:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/set.c:239:6: enter_function: entry to 'nftnl_set_set_u32'
libnftnl-1.3.1/src/set.c:241:9: call_function: calling 'nftnl_set_set_data' from 'nftnl_set_set_u32'
#  198|   		break;
#  199|   	case NFTNL_SET_TIMEOUT:
#  200|-> 		memcpy(&s->timeout, data, sizeof(s->timeout));
#  201|   		break;
#  202|   	case NFTNL_SET_GC_INTERVAL:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libnftnl-1.3.1/src/set.c:387:27: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libnftnl-1.3.1/src/set.c:363:19: enter_function: entry to 'nftnl_set_clone'
libnftnl-1.3.1/src/set.c:368:18: call_function: calling 'nftnl_set_alloc' from 'nftnl_set_clone'
libnftnl-1.3.1/src/set.c:368:18: return_function: returning to 'nftnl_set_clone' from 'nftnl_set_alloc'
libnftnl-1.3.1/src/set.c:369:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:372:9: branch_false: ...to here
libnftnl-1.3.1/src/set.c:374:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/set.c:375:40: branch_true: ...to here
libnftnl-1.3.1/src/set.c:375:33: acquire_memory: allocated here
libnftnl-1.3.1/src/set.c:376:20: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:379:13: branch_false: ...to here
libnftnl-1.3.1/src/set.c:379:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set.c:385:9: branch_false: ...to here
libnftnl-1.3.1/src/set.c:386:9: branch_true: following 'true' branch...
libnftnl-1.3.1/src/set.c:387:27: branch_true: ...to here
libnftnl-1.3.1/src/set.c:387:27: throw: if 'nftnl_set_elem_clone' throws an exception...
libnftnl-1.3.1/src/set.c:387:27: danger: '<unknown>' leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  385|   	INIT_LIST_HEAD(&newset->element_list);
#  386|   	list_for_each_entry(elem, &set->element_list, head) {
#  387|-> 		newelem = nftnl_set_elem_clone(elem);
#  388|   		if (newelem == NULL)
#  389|   			goto err;

Error: CPPCHECK_WARNING (CWE-457): [#def47]
libnftnl-1.3.1/src/set.c:1053: error[uninitvar]: Uninitialized variable: s
# 1051|   
# 1052|   	hlist_for_each_entry(s, n, &set_list->name_hash[key], hnode) {
# 1053|-> 		if (!strcmp(set, s->name))
# 1054|   			return s;
# 1055|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
libnftnl-1.3.1/src/set_elem.c:35:9: warning[-Wanalyzer-malloc-leak]: leak of 'nftnl_set_elem_alloc()'
libnftnl-1.3.1/src/set_elem.c:478:12: enter_function: entry to 'nftnl_set_elems_parse2'
libnftnl-1.3.1/src/set_elem.c:484:13: call_function: calling 'nftnl_set_elem_alloc' from 'nftnl_set_elems_parse2'
libnftnl-1.3.1/src/set_elem.c:484:13: return_function: returning to 'nftnl_set_elems_parse2' from 'nftnl_set_elem_alloc'
libnftnl-1.3.1/src/set_elem.c:485:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/set_elem.c:488:15: branch_false: ...to here
libnftnl-1.3.1/src/set_elem.c:488:15: throw: if 'mnl_attr_parse_nested' throws an exception...
libnftnl-1.3.1/src/set_elem.c:35:9: danger: 'nftnl_set_elem_alloc()' leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   33|   		return NULL;
#   34|   
#   35|-> 	INIT_LIST_HEAD(&s->expr_list);
#   36|   
#   37|   	return s;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def49]
libnftnl-1.3.1/src/set_elem.c:148:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/set_elem.c:184:6: enter_function: entry to 'nftnl_set_elem_set_u32'
libnftnl-1.3.1/src/set_elem.c:186:9: call_function: calling 'nftnl_set_elem_set' from 'nftnl_set_elem_set_u32'
#  146|   		break;
#  147|   	case NFTNL_SET_ELEM_TIMEOUT:	/* NFTA_SET_ELEM_TIMEOUT */
#  148|-> 		memcpy(&s->timeout, data, sizeof(s->timeout));
#  149|   		break;
#  150|   	case NFTNL_SET_ELEM_EXPIRATION:	/* NFTA_SET_ELEM_EXPIRATION */

Error: GCC_ANALYZER_WARNING (CWE-126): [#def50]
libnftnl-1.3.1/src/set_elem.c:151:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/set_elem.c:184:6: enter_function: entry to 'nftnl_set_elem_set_u32'
libnftnl-1.3.1/src/set_elem.c:186:9: call_function: calling 'nftnl_set_elem_set' from 'nftnl_set_elem_set_u32'
#  149|   		break;
#  150|   	case NFTNL_SET_ELEM_EXPIRATION:	/* NFTA_SET_ELEM_EXPIRATION */
#  151|-> 		memcpy(&s->expiration, data, sizeof(s->expiration));
#  152|   		break;
#  153|   	case NFTNL_SET_ELEM_USERDATA: /* NFTA_SET_ELEM_USERDATA */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
libnftnl-1.3.1/src/set_elem.c:261:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#  259|   	uint32_t size, val;
#  260|   
#  261|-> 	memcpy(&val, nftnl_set_elem_get(s, attr, &size), sizeof(val));
#  262|   
#  263|   	return val;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
libnftnl-1.3.1/src/set_elem.c:272:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
#  270|   	uint64_t val;
#  271|   
#  272|-> 	memcpy(&val, nftnl_set_elem_get(s, attr, &size), sizeof(val));
#  273|   
#  274|   	return val;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def53]
libnftnl-1.3.1/src/table.c:106:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/table.c:154:6: enter_function: entry to 'nftnl_table_set_u8'
libnftnl-1.3.1/src/table.c:156:9: call_function: calling 'nftnl_table_set_data' from 'nftnl_table_set_u8'
#  104|   					  attr, data, data_len);
#  105|   	case NFTNL_TABLE_HANDLE:
#  106|-> 		memcpy(&t->handle, data, sizeof(t->handle));
#  107|   		break;
#  108|   	case NFTNL_TABLE_FLAGS:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def54]
libnftnl-1.3.1/src/table.c:109:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/table.c:154:6: enter_function: entry to 'nftnl_table_set_u8'
libnftnl-1.3.1/src/table.c:156:9: call_function: calling 'nftnl_table_set_data' from 'nftnl_table_set_u8'
#  107|   		break;
#  108|   	case NFTNL_TABLE_FLAGS:
#  109|-> 		memcpy(&t->table_flags, data, sizeof(t->table_flags));
#  110|   		break;
#  111|   	case NFTNL_TABLE_FAMILY:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def55]
libnftnl-1.3.1/src/table.c:112:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/table.c:154:6: enter_function: entry to 'nftnl_table_set_u8'
libnftnl-1.3.1/src/table.c:156:9: call_function: calling 'nftnl_table_set_data' from 'nftnl_table_set_u8'
#  110|   		break;
#  111|   	case NFTNL_TABLE_FAMILY:
#  112|-> 		memcpy(&t->family, data, sizeof(t->family));
#  113|   		break;
#  114|   	case NFTNL_TABLE_USE:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def56]
libnftnl-1.3.1/src/table.c:115:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/table.c:154:6: enter_function: entry to 'nftnl_table_set_u8'
libnftnl-1.3.1/src/table.c:156:9: call_function: calling 'nftnl_table_set_data' from 'nftnl_table_set_u8'
#  113|   		break;
#  114|   	case NFTNL_TABLE_USE:
#  115|-> 		memcpy(&t->use, data, sizeof(t->use));
#  116|   		break;
#  117|   	case NFTNL_TABLE_USERDATA:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def57]
libnftnl-1.3.1/src/table.c:128:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
libnftnl-1.3.1/src/table.c:154:6: enter_function: entry to 'nftnl_table_set_u8'
libnftnl-1.3.1/src/table.c:156:9: call_function: calling 'nftnl_table_set_data' from 'nftnl_table_set_u8'
#  126|   		break;
#  127|   	case NFTNL_TABLE_OWNER:
#  128|-> 		memcpy(&t->owner, data, sizeof(t->owner));
#  129|   		break;
#  130|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def58]
libnftnl-1.3.1/src/udata.c:85: warning[nullPointer]: Possible null pointer dereference: value
#   83|   	attr->len  = len;
#   84|   	attr->type = type;
#   85|-> 	memcpy(attr->value, value, len);
#   86|   
#   87|   	buf->end = (char *)nftnl_udata_next(attr);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def59]
libnftnl-1.3.1/src/udata.c:85:9: warning[-Wanalyzer-null-argument]: use of NULL 'value' where non-null expected
libnftnl-1.3.1/src/udata.c:157:21: enter_function: entry to 'nftnl_udata_nest_start'
libnftnl-1.3.1/src/udata.c:162:9: call_function: calling 'nftnl_udata_put' from 'nftnl_udata_nest_start'
#   83|   	attr->len  = len;
#   84|   	attr->type = type;
#   85|-> 	memcpy(attr->value, value, len);
#   86|   
#   87|   	buf->end = (char *)nftnl_udata_next(attr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
libnftnl-1.3.1/src/utils.c:103:23: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
libnftnl-1.3.1/src/utils.c:93:12: branch_false: following 'false' branch...
libnftnl-1.3.1/src/utils.c:96:12: branch_false: ...to here
libnftnl-1.3.1/src/utils.c:96:12: branch_true: following 'true' branch...
libnftnl-1.3.1/src/utils.c:97:26: branch_true: ...to here
libnftnl-1.3.1/src/utils.c:99:23: acquire_memory: allocated here
libnftnl-1.3.1/src/utils.c:100:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
libnftnl-1.3.1/src/utils.c:103:23: branch_false: ...to here
libnftnl-1.3.1/src/utils.c:103:23: throw: if the called function throws an exception...
libnftnl-1.3.1/src/utils.c:103:23: danger: 'buf' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  101|   			return -1;
#  102|   
#  103|-> 		ret = snprintf_cb(buf, bufsiz, obj, cmd, type, flags);
#  104|   		if (ret <= 0)
#  105|   			goto out;

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-34.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibnftnl-1.3.1-1.fc44
store-results-to/tmp/tmpq3_gad5u/libnftnl-1.3.1-1.fc44.tar.xz
time-created2026-01-08 18:55:38
time-finished2026-01-08 18:57:00
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpq3_gad5u/libnftnl-1.3.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpq3_gad5u/libnftnl-1.3.1-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9