Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2023 17:01:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 272573] Lock order reversal with OpenVPN over UDP (udpinp)
Message-ID:  <bug-272573-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272573-227>