> Date: Tue, 18 Sep 2018 07:55:43 +0100 > From: Ricardo Mestre <[email protected]> > > Hi, > > In the case that a mue(4) device is put in promiscuous mode then hashtbl will > be used uninitialized a little bit down the road so set it 0 like it's done in > a lot of other devices. Coverity ID 1473316. > > OK? > > Index: if_mue.c > =================================================================== > RCS file: /cvs/src/sys/dev/usb/if_mue.c,v > retrieving revision 1.4 > diff -u -p -u -r1.4 if_mue.c > --- if_mue.c 15 Aug 2018 07:13:51 -0000 1.4 > +++ if_mue.c 18 Sep 2018 06:47:54 -0000 > @@ -1016,6 +1016,7 @@ mue_iff(struct mue_softc *sc) > rxfilt = mue_csr_read(sc, reg); > rxfilt &= ~(MUE_RFE_CTL_PERFECT | MUE_RFE_CTL_MULTICAST_HASH | > MUE_RFE_CTL_UNICAST | MUE_RFE_CTL_MULTICAST); > + memset(hashtbl, 0x00, sizeof(hashtbl)); > ifp->if_flags &= ~IFF_ALLMULTI; > > /* Always accept broadcast frames. */ > >
Thare already is a memset call to clear the hash table in the else block. I think that should simply be moved up.
