Coverity-updates archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New Defects reported by Coverity Scan for NetBSD-amd64-kernel



Hi,

Please find the latest report on new defect(s) introduced to NetBSD-amd64-kernel found with Coverity Scan.

3 new defect(s) introduced to NetBSD-amd64-kernel found with Coverity Scan.
2 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 3 of 3 defect(s)


** CID 1322880:    (REVERSE_INULL)
/sys/netinet/if_arp.c: 908 in arpresolve()
/sys/netinet/if_arp.c: 920 in arpresolve()


________________________________________________________________________________________________________
*** CID 1322880:    (REVERSE_INULL)
/sys/netinet/if_arp.c: 908 in arpresolve()
902     		m_freem(m);
903     		error = EINVAL;
904     		goto done;
905     	}
906     
907     	renew = (la->la_asked == 0 || la->la_expire != time_uptime);
>>>     CID 1322880:    (REVERSE_INULL)
>>>     Null-checking "m" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
908     	if ((renew || m != NULL) && (flags & LLE_EXCLUSIVE) == 0) {
909     		flags |= LLE_EXCLUSIVE;
910     		LLE_RUNLOCK(la);
911     		la = NULL;
912     		goto retry;
913     	}
/sys/netinet/if_arp.c: 920 in arpresolve()
914     	/*
915     	 * There is an arptab entry, but no ethernet address
916     	 * response yet.  Add the mbuf to the list, dropping
917     	 * the oldest packet if we have exceeded the system
918     	 * setting.
919     	 */
>>>     CID 1322880:    (REVERSE_INULL)
>>>     Null-checking "m" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
920     	if (m != NULL) {
921     		LLE_WLOCK_ASSERT(la);
922     		if (la->la_numheld >= arp_maxhold) {
923     			if (la->la_hold != NULL) {
924     				struct mbuf *next = la->la_hold->m_nextpkt;
925     				m_freem(la->la_hold);

** CID 1322879:  Control flow issues  (DEADCODE)
/sys/netinet/if_arp.c: 840 in arpresolve()


________________________________________________________________________________________________________
*** CID 1322879:  Control flow issues  (DEADCODE)
/sys/netinet/if_arp.c: 840 in arpresolve()
834     	if (la == NULL) {
835     		IF_AFDATA_RLOCK(ifp);
836     		la = lla_lookup(LLTABLE(ifp), flags, dst);
837     		IF_AFDATA_RUNLOCK(ifp);
838     	}
839     
>>>     CID 1322879:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach the expression "(ifp->if_flags & 0x80) == 0" inside this statement: "if (la == NULL && (flags & ...".
840     	if ((la == NULL) && ((flags & LLE_EXCLUSIVE) == 0)
841     #ifdef __FreeBSD__
842     	    && ((ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) == 0)) {
843     #else
844     	    && ((ifp->if_flags & IFF_NOARP) == 0)) {
845     #endif

** CID 1322878:  Control flow issues  (DEADCODE)
/sys/netinet/if_arp.c: 855 in arpresolve()


________________________________________________________________________________________________________
*** CID 1322878:  Control flow issues  (DEADCODE)
/sys/netinet/if_arp.c: 855 in arpresolve()
849     		la = lla_create(LLTABLE(ifp), flags, dst);
850     		IF_AFDATA_WUNLOCK(ifp);
851     	}
852     
853     	if (la == NULL) {
854     		if (create) {
>>>     CID 1322878:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "log(7, "%s: failed to creat...".
855     			log(LOG_DEBUG,
856     			    "%s: failed to create llentry for %s on %s\n",
857     			    __func__, inet_ntoa(satocsin(dst)->sin_addr),
858     			    ifp->if_xname);
859     		}
860     		m_freem(m);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/netbsd-amd64-kernel?tab=overview

To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782



Home | Main Index | Thread Index | Old Index