New Defects reported by Coverity Scan for freerangerouting/frr
scan-admin at coverity.com
scan-admin at coverity.com
Mon Oct 28 19:59:01 EDT 2019
Hi,
Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
3 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1487381: Null pointer dereferences (REVERSE_INULL)
/zebra/zebra_nhg.c: 889 in nhg_ctx_process_finish()
________________________________________________________________________________________________________
*** CID 1487381: Null pointer dereferences (REVERSE_INULL)
/zebra/zebra_nhg.c: 889 in nhg_ctx_process_finish()
883
884 nh = nhg_ctx_get_nh(ctx);
885
886 nexthop_del_labels(nh);
887
888 done:
>>> CID 1487381: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "ctx" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
889 if (ctx)
890 nhg_ctx_free(ctx);
891 }
892
893 static int queue_add(struct nhg_ctx *ctx)
894 {
** CID 1487380: Null pointer dereferences (FORWARD_NULL)
/zebra/zebra_nhg.c: 1007 in depends_find()
________________________________________________________________________________________________________
*** CID 1487380: Null pointer dereferences (FORWARD_NULL)
/zebra/zebra_nhg.c: 1007 in depends_find()
1001 struct nexthop *lookup = NULL;
1002 struct nhg_hash_entry *nhe = NULL;
1003
1004 copy_nexthops(&lookup, nh, NULL);
1005
1006 /* Clear it, in case its a group */
>>> CID 1487380: Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "lookup".
1007 nexthops_free(lookup->next);
1008 nexthops_free(lookup->prev);
1009 lookup->next = NULL;
1010 lookup->prev = NULL;
1011
1012 nhe = zebra_nhg_find_nexthop(0, lookup, afi, 0);
** CID 1487379: Null pointer dereferences (REVERSE_INULL)
/zebra/rt_netlink.c: 2284 in netlink_nexthop_process_nh()
________________________________________________________________________________________________________
*** CID 1487379: Null pointer dereferences (REVERSE_INULL)
/zebra/rt_netlink.c: 2284 in netlink_nexthop_process_nh()
2278 memcpy(&(nh.gate), gate, sz);
2279
2280 if (if_index)
2281 nh.ifindex = if_index;
2282
2283 *ifp = if_lookup_by_index_per_ns(zebra_ns_lookup(ns_id), nh.ifindex);
>>> CID 1487379: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "ifp" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
2284 if (ifp)
2285 nh.vrf_id = (*ifp)->vrf_id;
2286 else {
2287 flog_warn(
2288 EC_ZEBRA_UNKNOWN_INTERFACE,
2289 "%s: Unknown nexthop interface %u received, defaulting to VRF_DEFAULT",
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRa7dJ8klHLUFWVd2fqpS-2B-2FHaN43B-2FQ11ntcKmbKat2WeDU1AdI-2FBBrnda9ub5tlg3U-3D_d-2Fi2nRutHp-2FDWtw8JRg-2Bc1m9CS4-2B5uVbodfDyLsp-2FJn1RJIDSOIHSUw5jzCSGQOsk1VougbZRRAGGf1-2F-2FltDm5nqdYk-2FFEd34KPt5CDBAlSW5OrFiioPGUOyDkJ2Ph4OLKGaoUIlJi-2FQKn4mUJPGPyVXVzQ9UAoZG9jRaJCEK6S3zpnuwDY3Y-2B5cUxo7LeAKrtK4c69kHrReqaeCvolecQ-3D-3D
More information about the dev
mailing list