From nobody Tue Apr 09 00:10:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VD5vP5W5Vz5G7Vc; Tue, 9 Apr 2024 00:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VD5vP4vgcz4bNv; Tue, 9 Apr 2024 00:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712621425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z8XPK8+uRnSw3FiF1eeHnMI4+D03nfGByxmK/H9WjAU=; b=ggjIgJD0URxSsZ9lkBX/uV4nuZLG6Tkp5u9W/z1okSiAYAngNejuCvhARg8iHAL2c6wExr anrwGBCs3gTLztUGIrwavq+N8IAJ/HNuxvHdV0LVK5xy7t2SmwrbnwKhcPdP9Yz2KMvyMo KqBZgszXKWDxxTIE4jR+A8kghKvVwt4PR/5iYjnb/2R5B7F2zZaQhH/3W/ibjxvUR1OE/U 3qEPVclEcd2u87LKAiWk1awoSU8fDlBrK6MiasZS6UvpSa+5l7yJPmxpjio6VEx+vV8Myl RbNwWdd6y29LtriQPg8z/8hN72y+bWJEIe5HSeXPx8rsezTzuqti9ML5zv8M9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712621425; a=rsa-sha256; cv=none; b=DffWigxu/kEs1flIxh1pmMVE8EkNp2BN8M/DTNu9so5CSpJ0GnGNP7+/Bqp4lwdkqyj7yg YTe7npHzcuFbnAzxNCjDHvEKS2FRigRmIC3Z+lemzCkUM/eYOLFnBfxmJhJ/m6LuGjAuTd qKo+pxIzLZJ082p8KWwlrRf4ZiZGiH5ayPGUN3DYhhyyt8CEJslLydUzqMzCtpiincd+ZX c2+p6KDoRYXtoC3inD0IS1svszjtf3oqaBgjLo3eaK33ZW+2gjaWi3MaHcwZUeHM5X9vpu y6UJH7Y9mrCsJwmQiu3d1E3rdABos32Z9aWDVmRR1zeocKihcVmy99uVwi3v3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712621425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z8XPK8+uRnSw3FiF1eeHnMI4+D03nfGByxmK/H9WjAU=; b=cF43IyDOjJWxAj77CmW77zs0YhZSm+vClCstsZmKD3RP+Qx4ScTNkBk9mSORuoplBrYp3F 5XWPnbdyj2pPmueuyDEoGlBfwTL16kfdJx479Jh52mKtsjDdOBshJ5pjdaXZOsIOCYjXJq WiWnu6f3l0CxpILv6OOYRsEaK4ASu9iRcOytua2M7QBTdNHWcm1UoH2AlBfzgNFD0xE1O7 J3wrOMxtjdEbw4nD0zZ1H1JwazT4Ao0kKpJbOc7HWnw9irXsv8IildMXVjB/DlEHt4ylDf j+/VxICKRBVOgARslF9wdcUoYkRT5L6DPpnAbfQu2VZRDjws32ZsFcFLq86r5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VD5vP4WMNzY8Q; Tue, 9 Apr 2024 00:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4390APcm024824; Tue, 9 Apr 2024 00:10:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4390APbn024821; Tue, 9 Apr 2024 00:10:25 GMT (envelope-from git) Date: Tue, 9 Apr 2024 00:10:25 GMT Message-Id: <202404090010.4390APbn024821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: fb8a8333b481 - main - unix: return immediately on MSG_OOB List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb8a8333b481cc4256d0b3f0b5b4feaa4594e01f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fb8a8333b481cc4256d0b3f0b5b4feaa4594e01f commit fb8a8333b481cc4256d0b3f0b5b4feaa4594e01f Author: Gleb Smirnoff AuthorDate: 2024-04-09 00:09:16 +0000 Commit: Gleb Smirnoff 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+4adf0b37849ea7723586@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));