The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=fb8a8333b481cc4256d0b3f0b5b4feaa4594e01f

commit fb8a8333b481cc4256d0b3f0b5b4feaa4594e01f
Author:     Gleb Smirnoff <gleb...@freebsd.org>
AuthorDate: 2024-04-09 00:09:16 +0000
Commit:     Gleb Smirnoff <gleb...@freebsd.org>
CommitDate: 2024-04-09 00:09:16 +0000

    unix: return immediately on MSG_OOB
    
    Jumping to cleanup routines will work on uninitialized stack mc.
    
    Fixes:  d80a97def9a1db6f07f5d2e68f7ad62b27918947
    Reported-by:    syzbot+4adf0b37849ea7723...@syzkaller.appspotmail.com
---
 sys/kern/uipc_usrreq.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index d1f32cf3d711..4a1c480c43fa 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1001,10 +1001,8 @@ uipc_sosend_stream_or_seqpacket(struct socket *so, 
struct sockaddr *addr,
        MPASS((uio != NULL && m == NULL) || (m != NULL && uio == NULL));
        MPASS(m == NULL || c == NULL);
 
-       if (__predict_false(flags & MSG_OOB)) {
-               error = EOPNOTSUPP;
-               goto out;
-       }
+       if (__predict_false(flags & MSG_OOB))
+               return (EOPNOTSUPP);
 
        nonblock = (so->so_state & SS_NBIO) ||
            (flags & (MSG_DONTWAIT | MSG_NBIO));

Reply via email to