From nobody Wed Feb 01 22:44:57 2023 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 4P6cSB08Vfz3cF33; Wed, 1 Feb 2023 22:44:58 +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 4P6cS96kkFz4N1l; Wed, 1 Feb 2023 22:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291497; 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=bjhcXI1rLAPauXZN60W50uFAJj0oWbhlQI2ZvM5qr7E=; b=stSdO2mIMVH8YdnoC30pfsZwY5GBslhcpNOw6fXNR340eLVTJU5yInli4nVvl7kGG4do3E uPuFLBtOgApSjuGoraDQVRr4UoPCzaLdh9Go4s8M96dcZnuCkKWTf2q9VAzZmfBbj/551f LWv11RD9u3S7nu2YqlbzB/7j+PgWcRGr2V+8KD4+pSsmeU/O4nIi0xxx1FqXwwZ3rLZEJe 9+Mpz272oKqXa9xdBEnGNTSViqgLrFBaip7RKINc60PMMZdsuGPwlJUsSVKtt9ZUfB3n04 VewY1DeX3IubrBW+XWf5okM2gM31FUuCjMpmp9Tl7rOPBl98amHXpZIiiK5a2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291497; 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=bjhcXI1rLAPauXZN60W50uFAJj0oWbhlQI2ZvM5qr7E=; b=d+YHMj6nCNFeXL/NBJ/y/SJtbUdTUkiG+ihFruJfOYhmRfxp3RcWGkA2OPkR0ZGE0qK8nX Cn9mx1CIsifh3suJmQEC40nBZGlLy8NTmHHv/xh9FuBNGGkf+xmfdOBls1Ob+X48xblhbM +YKmmobm0KePzHSrBURs+GlUKiz+oHhHQqf8vJCuFdv/hq5hZre8l38ApFNgCBO/PC9sPD f1RblQOd8CmVTxSrDuYpHJHnlrjYsh6DP9sybOSfBrFVlB3BmYen5Iaj25FvPTAhKQ34+5 ekMCwaPpfKNBl6E4To48/fBNX5IE99vVq7LeXBCJ6Pe38l5bWOBkq8JxB7oMrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675291497; a=rsa-sha256; cv=none; b=fx5uQhB1vWJIBtxWRAbLRuymTNi2XJK/tq5+HeggNFunGE9OhmB6s9GtOiINmKh/EPrco0 XwJt2+zQKn19gj8OYYqtqOtkbCHSjcixvdgPdVYfWSA3KoZZIFbZ6WQECI17bnJTJA8Xfx VF/6oUJxMvqh0zKEKBH6XzFjMmxxl+Qd6efft84Mpzzy8NTjePQRluijUte2tXotCsLEbS UP42Tkc7KxJMgpJZ/18AjQQ7aomXvJzRNwQnjsNyBqZf6LIkPxe1LQAa61q1HR7TM1kWBH HSNDOal9IYqeEa4uyCe8roToAB3Ztb8ntNxRZ9kIaCGA1zLK5738XLWsc76gyw== 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 4P6cS95ndBzWft; Wed, 1 Feb 2023 22:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 311MivCo002266; Wed, 1 Feb 2023 22:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311Mivcc002265; Wed, 1 Feb 2023 22:44:57 GMT (envelope-from git) Date: Wed, 1 Feb 2023 22:44:57 GMT Message-Id: <202302012244.311Mivcc002265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: a162e6496a7c - stable/13 - sctp: hold the inp lock while calling ip6_output 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a162e6496a7ccd3a1a1b5caf276de915dc3a0e74 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a162e6496a7ccd3a1a1b5caf276de915dc3a0e74 commit a162e6496a7ccd3a1a1b5caf276de915dc3a0e74 Author: Michael Tuexen AuthorDate: 2022-04-19 11:03:08 +0000 Commit: Michael Tuexen CommitDate: 2023-02-01 22:44:25 +0000 sctp: hold the inp lock while calling ip6_output This fixes an issue with handling IPPROTO_IPV6 level socket options. Reported by: syzbot+66ede232c3d1271c6226@syzkaller.appspotmail.com MFC after: 3 days (cherry picked from commit a12d89332efe0b02307c580a6f3025652374cd47) --- sys/netinet/sctp_os_bsd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h index e8d08588fbfb..faca8a3b6276 100644 --- a/sys/netinet/sctp_os_bsd.h +++ b/sys/netinet/sctp_os_bsd.h @@ -428,9 +428,11 @@ typedef struct route sctp_route_t; \ m_clrprotoflags(o_pak); \ if (local_inp != NULL) { \ + INP_RLOCK(&local_inp->ip_inp.inp); \ result = ip6_output(o_pak, \ local_inp->ip_inp.inp.in6p_outputopts, \ (ro), 0, 0, ifp, NULL); \ + INP_RUNLOCK(&local_inp->ip_inp.inp); \ } else { \ result = ip6_output(o_pak, NULL, (ro), 0, 0, ifp, NULL); \ } \