HomeFreeBSD

Fix possible NULL pointer dereference.

Description

Fix possible NULL pointer dereference.

bpf_mtap() can invoke catchpacket() for already detached descriptor.
And this can lead to NULL pointer dereference, since bd_bif pointer
was reset to NULL in bpf_detachd_locked(). To avoid this, use
NET_EPOCH_WAIT() when descriptor is removed from interface's descriptors
list. After the wait it is safe to modify descriptor's content.

Submitted by: kib
Reported by: slavash
MFC after: 1 week

Details

Provenance
aeAuthored on
Parents
rS348302: Chase r261913: hardcoded default crypt(3) algorithm is SHA-512 when DES
Branches
Unknown
Tags
Unknown