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

scan-admin at coverity.com scan-admin at coverity.com
Fri Jan 12 03:51:05 EST 2018


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.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

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


** CID 1463851:  Null pointer dereferences  (FORWARD_NULL)
/bgpd/bgp_evpn.c: 395 in map_vrf_to_rt()


________________________________________________________________________________________________________
*** CID 1463851:  Null pointer dereferences  (FORWARD_NULL)
/bgpd/bgp_evpn.c: 395 in map_vrf_to_rt()
389     	memcpy(&eval_tmp, eval, ECOMMUNITY_SIZE);
390     	if (!CHECK_FLAG(bgp_vrf->vrf_flags,
391     			BGP_VRF_IMPORT_RT_CFGD))
392     		mask_ecom_global_admin(&eval_tmp, eval);
393     
394     	irt = lookup_vrf_import_rt(&eval_tmp);
>>>     CID 1463851:  Null pointer dereferences  (FORWARD_NULL)
>>>     Comparing "irt->vrfs" to null implies that "irt->vrfs" might be null.
395     	if (irt && irt->vrfs)
396     		if (is_vrf_present_in_irt_vrfs(irt->vrfs, bgp_vrf))
397     			/* Already mapped. */
398     			return;
399     
400     	if (!irt) {

** CID 1463850:  Error handling issues  (CHECKED_RETURN)
/bgpd/bgp_evpn.c: 3808 in bgp_evpn_derive_auto_rd_for_vrf()


________________________________________________________________________________________________________
*** CID 1463850:  Error handling issues  (CHECKED_RETURN)
/bgpd/bgp_evpn.c: 3808 in bgp_evpn_derive_auto_rd_for_vrf()
3802     {
3803     	char buf[100];
3804     
3805     	bgp->vrf_prd.family = AF_UNSPEC;
3806     	bgp->vrf_prd.prefixlen = 64;
3807     	sprintf(buf, "%s:%hu", inet_ntoa(bgp->router_id), bgp->vrf_rd_id);
>>>     CID 1463850:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "str2prefix_rd" without checking return value (as is done elsewhere 14 out of 15 times).
3808     	str2prefix_rd(buf, &bgp->vrf_prd);
3809     }
3810     
3811     /*
3812      * Derive RD automatically for VNI using passed information - it
3813      * is of the form RouterId:unique-id-for-vni.


________________________________________________________________________________________________________
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-2FJk9F-2FqpyrjmkbRSicVby5y5G0fUDUfqlRd6plBiB7YxZVEKqVen379KIM6Z5tUtl2xW8DM8w6Lr8g-2F-2FXH79ARIWmRHedtkaWFUbn92i-2FWO5GKa0-2FoKv46kY7uNCbmZwSiHdHILPPJ7VEjl192YEaJopwYBgMFuY1lZCm-2Bpb5Nk9dA-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-2FJk9F-2FqpyrjmkbRSicVby5y5bX40a9qrA33rI6w9oHOeKHm6HodPRYa4koNqBQ-2FEJA4vkzigZt7M2SGpxkCfA-2B9HCLDlgMeheRlI5-2FkZQySRHO5nxaOsDIJWwTZpCZJ48X9DhCqD99q-2FrB-2FEsu-2F42Mw6LFEEmaWOfDaC1SvkuZpw3A-3D-3D




More information about the dev mailing list