New Defects reported by Coverity Scan for freerangerouting/frr

scan-admin at coverity.com scan-admin at coverity.com
Wed Feb 2 11:21:40 UTC 2022


Hi,

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

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


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


** CID 1511320:    (CHECKED_RETURN)
/bgpd/bgp_vty.c: 690 in peer_address_self_check()
/bgpd/bgp_vty.c: 693 in peer_address_self_check()


________________________________________________________________________________________________________
*** CID 1511320:    (CHECKED_RETURN)
/bgpd/bgp_vty.c: 690 in peer_address_self_check()
684     	struct interface *ifp = NULL;
685     	struct listnode *node;
686     	struct bgp_listener *listener;
687     	union sockunion all_su;
688     
689     	if (su->sa.sa_family == AF_INET) {
>>>     CID 1511320:    (CHECKED_RETURN)
>>>     Calling "str2sockunion" without checking return value (as is done elsewhere 19 out of 21 times).
690     		str2sockunion("0.0.0.0", &all_su);
691     		ifp = if_lookup_by_ipv4_exact(&su->sin.sin_addr, bgp->vrf_id);
692     	} else if (su->sa.sa_family == AF_INET6) {
693     		str2sockunion("::", &all_su);
694     		ifp = if_lookup_by_ipv6_exact(&su->sin6.sin6_addr,
695     					      su->sin6.sin6_scope_id,
/bgpd/bgp_vty.c: 693 in peer_address_self_check()
687     	union sockunion all_su;
688     
689     	if (su->sa.sa_family == AF_INET) {
690     		str2sockunion("0.0.0.0", &all_su);
691     		ifp = if_lookup_by_ipv4_exact(&su->sin.sin_addr, bgp->vrf_id);
692     	} else if (su->sa.sa_family == AF_INET6) {
>>>     CID 1511320:    (CHECKED_RETURN)
>>>     Calling "str2sockunion" without checking return value (as is done elsewhere 19 out of 21 times).
693     		str2sockunion("::", &all_su);
694     		ifp = if_lookup_by_ipv6_exact(&su->sin6.sin6_addr,
695     					      su->sin6.sin6_scope_id,
696     					      bgp->vrf_id);
697     	}
698     

** CID 1511319:  Incorrect expression  (SIZEOF_MISMATCH)
/bgpd/bgp_rpki.c: 372 in bgpd_sync_callback()


________________________________________________________________________________________________________
*** CID 1511319:  Incorrect expression  (SIZEOF_MISMATCH)
/bgpd/bgp_rpki.c: 372 in bgpd_sync_callback()
366     	int retval;
367     	int socket = THREAD_FD(thread);
368     
369     	thread_add_read(bm->master, bgpd_sync_callback, NULL, socket, &t_rpki);
370     
371     	if (atomic_load_explicit(&rtr_update_overflow, memory_order_seq_cst)) {
>>>     CID 1511319:  Incorrect expression  (SIZEOF_MISMATCH)
>>>     Passing argument "&rec" of type "struct pfx_record *" and argument "1UL" to function "read" is suspicious because "sizeof (struct pfx_record) /*40*/" is expected.
372     		while (read(socket, &rec, sizeof(rec) != -1))
373     			;
374     
375     		atomic_store_explicit(&rtr_update_overflow, 0,
376     				      memory_order_seq_cst);
377     		revalidate_all_routes();


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrtN2DGUU98GYhjd55wXsXtw53zRK70R0agdV-2Fb7c45-2BkxBoZjryQtr5SpUD80NNfE-3DiH3f_O0IDF7c8sUs2B6kWTeWwAJZqriD5fgsfL8PAN30oQTyOOztZTGljJVyqZpCpPGTB-2BEvdTv4rgUWR-2BBCzxs2XLJ98SLruIKGYfqnFFbHx-2FUhNgDW0nndMJDddDjcNeURiRXHtsBmDliHrkBxtlyhL8UgbEtFW1TrgBZP8fslCHHyGW0qG2Wo-2BMVbY2Lvik9drbkiehShLqD7LXm4lMmJljQ-3D-3D




More information about the dev mailing list