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

scan-admin at coverity.com scan-admin at coverity.com
Tue Mar 21 14:32:22 EDT 2017


Hi,

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

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


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


** CID 1420265:  Resource leaks  (RESOURCE_LEAK)
/zebra/label_manager.c: 229 in assign_label_chunk()


________________________________________________________________________________________________________
*** CID 1420265:  Resource leaks  (RESOURCE_LEAK)
/zebra/label_manager.c: 229 in assign_label_chunk()
223     	else
224     		lmc->start = ((struct label_manager_chunk *)
225     			      listgetdata(listtail(lbl_mgr.lc_list)))->end + 1;
226     	if (lmc->start > MPLS_MAX_UNRESERVED_LABEL - size + 1) {
227     		zlog_err("Reached max labels. Start: %u, size: %u", lmc->start,
228     			 size);
>>>     CID 1420265:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "lmc" going out of scope leaks the storage it points to.
229     		return NULL;
230     	}
231     	lmc->end = lmc->start + size - 1;
232     	lmc->proto = proto;
233     	lmc->instance = instance;
234     	lmc->keep = keep;

** CID 1420264:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1420264:  Null pointer dereferences  (NULL_RETURNS)
/pimd/pim_nht.c: 563 in pim_parse_nexthop_update()
557                 case NEXTHOP_TYPE_IPV6:
558                   stream_get (&nexthop->gate.ipv6, s, 16);
559                   break;
560                 case NEXTHOP_TYPE_IPV6_IFINDEX:
561                   stream_get (&nexthop->gate.ipv6, s, 16);
562                   nexthop->ifindex = stream_getl (s);
>>>     CID 1420264:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "if_lookup_by_index(nexthop->ifindex, 0)" when calling "pim_neighbor_find_if".
563                   nbr =
564                     pim_neighbor_find_if (if_lookup_by_index
565                                           (nexthop->ifindex, VRF_DEFAULT));
566                   /* Overwrite with Nbr address as NH addr */
567                   if (nbr)
568                     nexthop->gate.ipv4 = nbr->source_addr;

** CID 1420263:  Null pointer dereferences  (NULL_RETURNS)
/ldpd/lde.c: 1624 in on_get_label_chunk_response()


________________________________________________________________________________________________________
*** CID 1420263:  Null pointer dereferences  (NULL_RETURNS)
/ldpd/lde.c: 1624 in on_get_label_chunk_response()
1618     	struct label_chunk *new_label_chunk;
1619     
1620     	log_debug("Label Chunk assign: %u - %u", start, end);
1621     
1622     	new_label_chunk = calloc(1, sizeof(struct label_chunk));
1623     
>>>     CID 1420263:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "new_label_chunk".
1624     	new_label_chunk->start = start;
1625     	new_label_chunk->end = end;
1626     	new_label_chunk->used_mask = 0;
1627     
1628     	listnode_add(label_chunk_list, (void *)new_label_chunk);
1629     

** CID 1420262:  Null pointer dereferences  (FORWARD_NULL)
/pimd/pim_nht.c: 519 in pim_parse_nexthop_update()


________________________________________________________________________________________________________
*** CID 1420262:  Null pointer dereferences  (FORWARD_NULL)
/pimd/pim_nht.c: 519 in pim_parse_nexthop_update()
513                               __PRETTY_FUNCTION__, buf);
514                 }
515               return;
516             }
517         }
518     
>>>     CID 1420262:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "pnc".
519       pnc->last_update = pim_time_monotonic_sec ();
520       distance = stream_getc (s);
521       metric = stream_getl (s);
522       nexthop_num = stream_getc (s);
523     
524       if (PIM_DEBUG_TRACE)


________________________________________________________________________________________________________
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-2FJmhVZEOMEpl7Un36ZEagSA-2BFSTdmnwlL6h8xIQHiSoCjoRHJmesfYYHp-2Fsx55WRFBDCTZO5qeR5wTMNPM6CZaQjQnv1QhNMa-2FgDSDmFaJvbuwDU-2FSnRGZFzHR60n4BaX9M-2F4X-2Fxiz1fSFWSP96v-2FAqn4a5ES9c8pzoMe2cBUdDw5Q-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-2FJmhVZEOMEpl7Un36ZEagSA-2BxM8wsxnWDgeF08KCCqb9xIGc0mp1IzuwHYh5vNOo-2FjrXcEymCtWcxqlnn0O2mtetHheE0MinGCbHNRdxdPBeTh9plyeAv-2FdJ-2FHoXvnpq-2BWcxgVc2lp990EEVt9mKzz6X1-2BTAPJS-2BxQI7elQOCI2fNg-3D-3D





More information about the dev mailing list