diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2022-02-25 23:51:05 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2022-02-25 23:51:05 +0000 |
commit | 35d935e7af10bc634f79c37722158ba200732393 (patch) | |
tree | 204598a1369d152503cd594dbe6d3ad5b7dd1630 /sys/kern/uipc_usrreq.c | |
parent | 4f8344a22bf26c93d3595f04fc892a8bb47e268a (diff) |
Reported-by: syzbot+1b5b209ce506db4d411d@syzkaller.appspotmail.com
Revert the pr_usrreqs move: syzkaller found a NULL pointer deref
and I won't be available to monitor for followup issues for a bit
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index a25bda5a765..a4538f2c805 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.162 2022/02/25 08:36:01 guenther Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.163 2022/02/25 23:51:03 guenther Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -150,6 +150,8 @@ uipc_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct socket *so2; int error = 0; + if (req == PRU_CONTROL) + return (EOPNOTSUPP); if (req != PRU_SEND && control && control->m_len) { error = EOPNOTSUPP; goto release; @@ -470,11 +472,6 @@ uipc_detach(struct socket *so) return (0); } -const struct pr_usrreqs uipc_usrreqs = { - .pru_attach = uipc_attach, - .pru_detach = uipc_detach, -}; - int uipc_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen) |