From nobody Tue Jun 21 13:02:39 2022 X-Original-To: dev-commits-src-branches@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 10C87873161; Tue, 21 Jun 2022 13:02:40 +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 4LS6B76Rn0z3r8G; Tue, 21 Jun 2022 13:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655816559; 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=0NhPWB/Soz8tFfrRcw97qWyq8VFM3CkLTl/533grZJc=; b=WmVMBZq3CVz/w+XjQ+xaUcLdj3JioeJPeytJk+5sch2aLoYucY7tWWhXRtArKbC2wsaOeH Rljpc7Kt+0LrizeAHsGBCcNGWuev71tmZG9wL9C5blnxSEERQTk5bfNez2J6MLnHbvNQp5 HYAyltdgOgodHt9MaoTezMzsysRtwO9SX/SCbKauUifVenLFFthN/IeMx2tgAP6ymB/i3z MGPz3ATT8sf7jtpHWgNHikzjyPZjLS/b07Ui4VJDk0rf0r/cy5Bgs29jsXaGzqrtD0O/ne ksLV/Fln+ZTmrMZz/fzs31ul3mcGYeaUJ+xLCzHMst/oK9zd/k0arerBiwhRPw== 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 BBD6212627; Tue, 21 Jun 2022 13:02:39 +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 25LD2dxA073645; Tue, 21 Jun 2022 13:02:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25LD2dKT073644; Tue, 21 Jun 2022 13:02:39 GMT (envelope-from git) Date: Tue, 21 Jun 2022 13:02:39 GMT Message-Id: <202206211302.25LD2dKT073644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 14f7dd4744e4 - stable/13 - rip6: Fix a lock order reversal in rip6_bind() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 14f7dd4744e4ff0e4447fb6b07aea24dbfbda31c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655816559; 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=0NhPWB/Soz8tFfrRcw97qWyq8VFM3CkLTl/533grZJc=; b=pQZZh49jkLwo1gS2TcOUd0ITOzAjF/leD26YxjclA6Ryi2CgaHIrjf/04EOUnOcTqk7+4I LDJGG+iiuLCV3vL43ozrXyT9TSOXq4bA9wTIyEnQXh1s5lL1KU5hFIPv2S3D36MqqwVfqn R4udn6d7z+qlif1Jy9I9XpLP9f/KO3V7Fas7fff+pLvF7h+GAuCfe+WOu53jvvta4+eheE KnZIxTnwD8NyuhucjcuHpgmfTdq0hX/wXd3ARlEZJ7tqRthoEwxtC8Pp8JtEUkTkypg8y6 D9MT1+a7yrUX4PSWKSOOx4IGANuGlaSwOnSjrnfV2fqjDwZz92F1yBrDvQuWYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655816559; a=rsa-sha256; cv=none; b=e0b1MNLxHJrf5Uakiu64GcZF+hqWfxOI4EfYo1/KT0+GZ5smtIccZn20nBWG/aZqyni7+x tAjgJK7Dt56i0Bap3pL97rLHCifKJ7lf/IVO7NIu6tlNYPa84gw45dZ04Eg2P6tUDoCzMP bXg7Fsq4iY7W/IXcnTeuYG5OeHR7OZxHUGqbFtR+4VSdgoYNjcspGgcImfCSUfOMzNA2Ow TnMHPlaUZ7Mb0a8oG2n+LlREBifvTg3PXoLDQQjCKujqj1/qpKFzU5OP8lbpt1cVinKGnM 6vuBHeI/PUS8vY3gBfIX7qHMmA16gOu2W46MlLifnBYbnAo/FPbjFqKcmRz0dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=14f7dd4744e4ff0e4447fb6b07aea24dbfbda31c commit 14f7dd4744e4ff0e4447fb6b07aea24dbfbda31c Author: Mark Johnston AuthorDate: 2022-06-14 15:27:38 +0000 Commit: Mark Johnston CommitDate: 2022-06-21 12:53:34 +0000 rip6: Fix a lock order reversal in rip6_bind() See also commit 71a1539e3783. Reported by: syzbot+9b461b6a07a83cc10daa@syzkaller.appspotmail.com Reported by: syzbot+b6ce0aec16f5fdab3282@syzkaller.appspotmail.com Reviewed by: glebius Sponsored by: The FreeBSD Foundation (cherry picked from commit a14465e1b9a53d6abf58f42e113c1888ffeebe42) --- sys/netinet6/raw_ip6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index aaba91c6d5e7..445912c965ba 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -791,11 +791,11 @@ rip6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) return (EADDRNOTAVAIL); } NET_EPOCH_EXIT(et); - INP_INFO_WLOCK(&V_ripcbinfo); INP_WLOCK(inp); + INP_INFO_WLOCK(&V_ripcbinfo); inp->in6p_laddr = addr->sin6_addr; - INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&V_ripcbinfo); + INP_WUNLOCK(inp); return (0); }