[dev] New Defects reported by Coverity Scan for freerangerouting/frr

scan-admin at coverity.com scan-admin at coverity.com
Tue Sep 5 00:00:09 EDT 2017


Hi,

Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.

6 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 6 of 6 defect(s)


** CID 1455339:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_fsm.c: 416 in eigrp_fsm_event_keep_state()


________________________________________________________________________________________________________
*** CID 1455339:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_fsm.c: 416 in eigrp_fsm_event_keep_state()
410     				prefix->distance = ne->distance;
411     			prefix->reported_metric =
412     				ne->total_metric;
413     			if (msg->packet_type == EIGRP_OPC_QUERY)
414     				eigrp_send_reply(msg->adv_router, prefix);
415     			prefix->req_action |= EIGRP_FSM_NEED_UPDATE;
>>>     CID 1455339:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "eigrp_lookup()".
416     			listnode_add(
417     				(eigrp_lookup())->topology_changes_internalIPV4,
418     				prefix);
419     		}
420     		eigrp_topology_update_node_flags(prefix);
421     		eigrp_update_routing_table(prefix);

** CID 1455338:    (NULL_RETURNS)
/eigrpd/eigrp_filter.c: 85 in eigrp_distribute_update()
/eigrpd/eigrp_filter.c: 87 in eigrp_distribute_update()
/eigrpd/eigrp_filter.c: 89 in eigrp_distribute_update()
/eigrpd/eigrp_filter.c: 184 in eigrp_distribute_update()


________________________________________________________________________________________________________
*** CID 1455338:    (NULL_RETURNS)
/eigrpd/eigrp_filter.c: 85 in eigrp_distribute_update()
79     	if (!dist->ifname) {
80     		/* access list IN for whole process */
81     		if (dist->list[DISTRIBUTE_V4_IN]) {
82     			alist = access_list_lookup(
83     				AFI_IP, dist->list[DISTRIBUTE_V4_IN]);
84     			if (alist)
>>>     CID 1455338:    (NULL_RETURNS)
>>>     Dereferencing a null pointer "e".
85     				e->list[EIGRP_FILTER_IN] = alist;
86     			else
87     				e->list[EIGRP_FILTER_IN] = NULL;
88     		} else {
89     			e->list[EIGRP_FILTER_IN] = NULL;
90     		}
/eigrpd/eigrp_filter.c: 87 in eigrp_distribute_update()
81     		if (dist->list[DISTRIBUTE_V4_IN]) {
82     			alist = access_list_lookup(
83     				AFI_IP, dist->list[DISTRIBUTE_V4_IN]);
84     			if (alist)
85     				e->list[EIGRP_FILTER_IN] = alist;
86     			else
>>>     CID 1455338:    (NULL_RETURNS)
>>>     Dereferencing a null pointer "e".
87     				e->list[EIGRP_FILTER_IN] = NULL;
88     		} else {
89     			e->list[EIGRP_FILTER_IN] = NULL;
90     		}
91     
92     		/* access list OUT for whole process */
/eigrpd/eigrp_filter.c: 89 in eigrp_distribute_update()
83     				AFI_IP, dist->list[DISTRIBUTE_V4_IN]);
84     			if (alist)
85     				e->list[EIGRP_FILTER_IN] = alist;
86     			else
87     				e->list[EIGRP_FILTER_IN] = NULL;
88     		} else {
>>>     CID 1455338:    (NULL_RETURNS)
>>>     Dereferencing a null pointer "e".
89     			e->list[EIGRP_FILTER_IN] = NULL;
90     		}
91     
92     		/* access list OUT for whole process */
93     		if (dist->list[DISTRIBUTE_V4_OUT]) {
94     			alist = access_list_lookup(
/eigrpd/eigrp_filter.c: 184 in eigrp_distribute_update()
178     
179     	/*struct eigrp_if_info * info = ifp->info;
180     	ei = info->eigrp_interface;*/
181     	struct listnode *node, *nnode;
182     	struct eigrp_interface *ei2;
183     	/* Find proper interface */
>>>     CID 1455338:    (NULL_RETURNS)
>>>     Dereferencing a null pointer "e".
184     	for (ALL_LIST_ELEMENTS(e->eiflist, node, nnode, ei2)) {
185     		if (strcmp(ei2->ifp->name, ifp->name) == 0) {
186     			ei = ei2;
187     			break;
188     		}
189     	}

** CID 1455337:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_interface.c: 444 in eigrp_if_free()


________________________________________________________________________________________________________
*** CID 1455337:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_interface.c: 444 in eigrp_if_free()
438     		THREAD_OFF(ei->t_hello);
439     		eigrp_hello_send(ei, EIGRP_HELLO_GRACEFUL_SHUTDOWN, NULL);
440     	}
441     
442     	dest_addr = *ei->connected->address;
443     	apply_mask(&dest_addr);
>>>     CID 1455337:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "eigrp".
444     	pe = eigrp_topology_table_lookup_ipv4(eigrp->topology_table,
445     					      &dest_addr);
446     	if (pe)
447     		eigrp_prefix_entry_delete(eigrp->topology_table, pe);
448     
449     	eigrp_if_down(ei);

** CID 1455336:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_topology.c: 467 in eigrp_update_routing_table()


________________________________________________________________________________________________________
*** CID 1455336:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_topology.c: 467 in eigrp_update_routing_table()
461     	}
462     }
463     
464     void eigrp_update_routing_table(struct eigrp_prefix_entry *prefix)
465     {
466     	struct eigrp *eigrp = eigrp_lookup();
>>>     CID 1455336:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "eigrp".
467     	struct list *successors =
468     		eigrp_topology_get_successor_max(prefix, eigrp->max_paths);
469     	struct listnode *node;
470     	struct eigrp_nexthop_entry *entry;
471     
472     	if (successors) {

** CID 1455335:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_topology.c: 446 in eigrp_topology_update_node_flags()


________________________________________________________________________________________________________
*** CID 1455335:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_topology.c: 446 in eigrp_topology_update_node_flags()
440     {
441     	struct listnode *node;
442     	struct eigrp_nexthop_entry *entry;
443     	struct eigrp *eigrp = eigrp_lookup();
444     
445     	for (ALL_LIST_ELEMENTS_RO(dest->entries, node, entry)) {
>>>     CID 1455335:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "eigrp".
446     		if (((uint64_t)entry->distance
447     		     <= (uint64_t)dest->distance * (uint64_t)eigrp->variance)
448     		    && entry->distance != EIGRP_MAX_METRIC) // is successor
449     		{
450     			entry->flags |= EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
451     			entry->flags &= ~EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;

** CID 1455334:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_topology.c: 217 in eigrp_prefix_entry_delete()


________________________________________________________________________________________________________
*** CID 1455334:  Null pointer dereferences  (NULL_RETURNS)
/eigrpd/eigrp_topology.c: 217 in eigrp_prefix_entry_delete()
211     	struct eigrp *eigrp = eigrp_lookup();
212     
213     	/*
214     	 * Emergency removal of the node from this list.
215     	 * Whatever it is.
216     	 */
>>>     CID 1455334:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "eigrp".
217     	listnode_delete(eigrp->topology_changes_internalIPV4, node);
218     
219     	if (listnode_lookup(topology, node) != NULL) {
220     		list_delete_all_node(node->entries);
221     		list_free(node->entries);
222     		list_free(node->rij);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRa7dJ8klHLUFWVd2fqpS-2B-2FHaN43B-2FQ11ntcKmbKat2WeHs8691VOJpZofPkpp-2BRBqc-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJkr2OLAySyjwG-2BkTZyxLGr-2Frd6rU94iAGFjrM7Nur9lfq4JJHFCRLH4Lg-2FDWtAk5bin4ydnGHXyNKcSvLJb3-2BJvhWQhEG3XNNVWm7QPaTvdJibcKtCrWpLZZuLrGt-2F6OBCXN4SF2AoK9zgrtBi9HG1gTMd4LfGBOtWcEc9lZIkA-2BQ-3D-3D

To manage Coverity Scan email notifications for "frr at lists.nox.tf", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4lcTWm1Zma8LQDNpOYqrETKrqBiM18kcBcL8b08LzBPOYJYGySZ4Vv7d5QYcnSbGxl3QyORKgEmDxh-2BE2mj6dp1V4JSs2jbMZuLnEQJOW0Z0-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJkr2OLAySyjwG-2BkTZyxLGr-2FvphjG-2F499AyihsrmLcpYY3ROq14JfJUDK2uEKG2o6eIOqYTdI8DlC2VAdJzu-2F7awUAIjbS25g92-2BAONNaDY-2Fh2LMJCBXzkp-2F2T-2B7Z7FdLHxoUaU0JBt3jOhlKFRK9fpWczZNJbCxafgLw-2FeQrKnMuQ-3D-3D




More information about the dev mailing list