HomeFreeBSD

Lock the socket in soo_stat().

Description

Lock the socket in soo_stat().

Otherwise nothing synchronizes with a concurrent conversion of the
socket to a listening socket.

Only the PF_LOCAL protocols implement pru_sense, and it is safe to hold
the socket lock there, so do so for now.

Reported by: syzbot+4801f1b79ea40953ca8e@syzkaller.appspotmail.com
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on
Parents
rS359183: Fix uselocale(3) to not leak a reference to the old locale.
Branches
Unknown
Tags
Unknown