From nobody Tue Jul 18 17:01:33 2023 X-Original-To: bugs@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 4R54ws1xT0z4nHYm for ; Tue, 18 Jul 2023 17:01:33 +0000 (UTC) (envelope-from bugzilla-noreply@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 4R54ws08BXz3lh5 for ; Tue, 18 Jul 2023 17:01:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689699693; 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=SSCO2QOjBO1iN8eYBsXyQGm50OI52gDxxgRWYAQYxOI=; b=noi6OFnCcwY1fBWvwHhPg52boTJenuq9+4DhkfOiYxfnI3EypQF7tEXjFVW69W2YuCm6EZ kanpiV75kVCjgkF3odF0Ctf4+RUVA5spU4SUuduxY+9wufNYR3hoz9+fOD23ROKvcQ1Z+Z GX4//9I33PQLgxmpi4651iRG2tIJKH97+n5OMfitcOua/Zr2ZLtbjbW36rpR9OhO4bpd4m xfrIuzXFX76Yl1Ogy0kHBZR6wjNcpF35HOckwz8KFr4QgCx1WBez8E8dg1zXlUnBy/zMe5 3JCUJfhOkIDgFdjNHXJJtH1mwQ3Ppai675/9yWi0F+hYBP5ymalnxiLNFsbR5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689699693; a=rsa-sha256; cv=none; b=qWI6hzbltcXpBvfjwShuPOopFs0IpfxH5PHOuSR3jCnhaNu4ZCS8gCsO4j0h1iIVA99FYu QCePA2Opo8PWiN4nVbbXdoLmckB1c0r9DWiii6fLjvxJYHjZIyssWazkpc7x7uODS5wIMU lCKWgMrpUH0xt6Tp+OPRxaP8m1xAGBLWn1X0C3Ra5t7tjv+FtfNncIev/1Ifm6DDMXlskq IaI5VjbroQtCMH8+ZiOa64WxjMOnvNRZHZto7IVOXfPXhUEsQ6hbaHcNu84B/Cg/WvnNJw 7sipEAmvL/TGzmwHksvKCL3n5lHFAJ8ly8ixmVIIYh2GCb6Uil4v9AtJyQF31A== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4R54wr6NPGz1Cfn for ; Tue, 18 Jul 2023 17:01:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 36IH1WBs080300 for ; Tue, 18 Jul 2023 17:01:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36IH1WO3080299 for bugs@FreeBSD.org; Tue, 18 Jul 2023 17:01:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272573] Lock order reversal with OpenVPN over UDP (udpinp) Date: Tue, 18 Jul 2023 17:01:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pierre@freebsdfoundation.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272573 Bug ID: 272573 Summary: Lock order reversal with OpenVPN over UDP (udpinp) Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: pierre@freebsdfoundation.org While using OpenVPN on UDP, the kernel reported the following error: ``` Jul 18 16:27:30 kwarx kernel: lock order reversal: Jul 18 16:27:30 kwarx kernel: 1st 0xfffff801303b5c60 udpinp (udpinp, rw) @ /usr/home/khorben/Projects/FreeBSD/src/sys/netinet/udp_usrreq.c:1100 Jul 18 16:27:30 kwarx kernel: 2nd 0xfffff8015e199a88 if_ovpn_lock (if_ovpn_lock, rm) @ /usr/home/khorben/Projects/FreeBSD/src/sys/net/if_ovpn.c:2109 Jul 18 16:27:30 kwarx kernel: lock order if_ovpn_lock -> udpinp established= at: Jul 18 16:27:30 kwarx kernel: #0 0xffffffff80bbda0a at witness_checkorder+0= x30a Jul 18 16:27:30 kwarx kernel: #1 0xffffffff80b462b5 at _rw_wlock_cookie+0x65 Jul 18 16:27:30 kwarx kernel: #2 0xffffffff80d5e7be at udp_set_kernel_tunneling+0x4e Jul 18 16:27:30 kwarx kernel: #3 0xffffffff8294a3b9 at ovpn_ioctl_set+0xe69 Jul 18 16:27:30 kwarx kernel: #4 0xffffffff82948ded at ovpn_ioctl+0xed Jul 18 16:27:30 kwarx kernel: #5 0xffffffff80c7c600 at ifioctl+0x940 Jul 18 16:27:30 kwarx kernel: #6 0xffffffff80bc3ff6 at kern_ioctl+0x286 Jul 18 16:27:30 kwarx kernel: #7 0xffffffff80bc3d02 at sys_ioctl+0x152 Jul 18 16:27:30 kwarx kernel: #8 0xffffffff81047c19 at amd64_syscall+0x139 Jul 18 16:27:30 kwarx kernel: #9 0xffffffff8101a3bb at fast_syscall_common+= 0xf8 Jul 18 16:27:30 kwarx kernel: lock order udpinp -> if_ovpn_lock attempted a= t: Jul 18 16:27:30 kwarx kernel: #0 0xffffffff80bbe2be at witness_checkorder+0= xbbe Jul 18 16:27:30 kwarx kernel: #1 0xffffffff80b44e13 at _rm_rlock_debug+0x133 Jul 18 16:27:30 kwarx kernel: #2 0xffffffff82948e91 at ovpn_output+0x41 Jul 18 16:27:30 kwarx kernel: #3 0xffffffff80d296f6 at ip_output+0x13d6 Jul 18 16:27:30 kwarx kernel: #4 0xffffffff80d5e48c at udp_send+0xa0c Jul 18 16:27:30 kwarx kernel: #5 0xffffffff80bfabb1 at sosend_dgram+0x321 Jul 18 16:27:30 kwarx kernel: #6 0xffffffff80bfb7a9 at sousrsend+0x79 Jul 18 16:27:30 kwarx kernel: #7 0xffffffff80c02000 at kern_sendit+0x1c0 Jul 18 16:27:30 kwarx kernel: #8 0xffffffff80c02207 at sendit+0xb7 Jul 18 16:27:30 kwarx kernel: #9 0xffffffff80c0213d at sys_sendto+0x4d Jul 18 16:27:30 kwarx kernel: #10 0xffffffff81047c19 at amd64_syscall+0x139 Jul 18 16:27:30 kwarx kernel: #11 0xffffffff8101a3bb at fast_syscall_common+0xf8 ``` The kernel is 14.0-CURRENT, built on `Wed Jul 5 11:40:52 CEST 2023`. OpenVPN itself was obtained from binary ports: ``` # pkg info openvpn openvpn-2.6.5 Name : openvpn Version : 2.6.5 Installed on : Wed Jul 5 13:08:37 2023 CEST Origin : security/openvpn Architecture : FreeBSD:14:amd64 [...] Annotations : FreeBSD_version: 1400092 cpe : cpe:2.3:a:openvpn:openvpn:2.6.5:::::freebsd14:x64 repo_type : binary repository : FreeBSD ``` --=20 You are receiving this mail because: You are the assignee for the bug.=