Do UNP_CONNECTING and UNP_BINDING flags check in uipc_listen() and
authormvs <mvs@openbsd.org>
Sun, 17 Mar 2024 19:47:08 +0000 (19:47 +0000)
committermvs <mvs@openbsd.org>
Sun, 17 Mar 2024 19:47:08 +0000 (19:47 +0000)
commitd1ea0a7c7de994c94e080237116e3e91989b4d68
tree3d6c5502866e18aff8fab7f1fa831ad7fa078704
parente00f38ee8c8e6dbcc4f850634e9dc8ac048560f4
Do UNP_CONNECTING and UNP_BINDING flags check in uipc_listen() and
return EINVAL if set. This prevents concurrent solisten() thread to make
this socket listening while socket is unlocked.

Reported-by: syzbot+4acfcd73d15382a3e7cf@syzkaller.appspotmail.com
ok mpi
sys/kern/uipc_usrreq.c