panic: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/multicore/kernel/sys/net/if_tun.c", line 319 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *450688 80157 0 0x2 0 1K ifconfig 340823 46518 0 0 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834f7689) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff83536616,ffffffff83583826,13f,ffffffff834771f1) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff80000161e800) at tun_clone_destroy+0x38a if_clone_destroy(ffff800037fb4fb0) at if_clone_destroy+0x205 sys/net/if.c:1464 ifioctl(ffff800010fdb4a0,80206979,ffff800037fb4fb0,ffff80003c443a20) at ifioctl+0x59d sys/net/if.c:2142 sys_ioctl(ffff80003c443a20,ffff800037fb5190,ffff800037fb50e0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff800037fb5190) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800037fb5190) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x797615c4cd20, count: 6 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: kernel diagnostic assertion "sc->sc_dev == 0" failed: file "/syzkaller/managers/multicore/kernel/sys/net/if_tun.c", line 319 ddb{1}> show kasan No such command ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834f7689) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff83536616,ffffffff83583826,13f,ffffffff834771f1) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff80000161e800) at tun_clone_destroy+0x38a if_clone_destroy(ffff800037fb4fb0) at if_clone_destroy+0x205 sys/net/if.c:1464 ifioctl(ffff800010fdb4a0,80206979,ffff800037fb4fb0,ffff80003c443a20) at ifioctl+0x59d sys/net/if.c:2142 sys_ioctl(ffff80003c443a20,ffff800037fb5190,ffff800037fb50e0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff800037fb5190) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800037fb5190) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x797615c4cd20, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800037fb4d70 rbx 0xffff80002998ee0f rdx 0 rcx 0xffff80003c443a20 rax 0xffff80002998dff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x56e4de0bf8b47063 r11 0x1d0bcd192708f160 r12 0xffff80002998ec10 r13 0 r14 0 r15 0x1 rip 0xffffffff831d43e5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037fb4d60 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (ifconfig) tid=450688 pid=80157 tcnt=1 stat=onproc flags process=2 proc=0 runpri=50, usrpri=57, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c442030,0xffffffff83ae3978 process=0xffff800045feceb0 user=0xffff800037fb0000, vmspace=0xfffffc80723925d8 estcpu=7, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND *80157 450688 88389 0 7 0x2 0 ifconfig 88389 73358 71750 0 3 0x100002 0x88 sigsusp sh 46518 340823 96322 0 7 0 0 syz-executor 83749 163564 24684 0 2 0 0 syz-executor 19811 429620 45256 0 2 0 0 syz-executor 91026 424715 64567 0 2 0 0 syz-executor 71750 148829 39488 0 3 0x2 0x80 wait syz-executor 64607 172937 31394 0 3 0 0x80 nanoslp syz-executor 64607 120305 31394 0 3 0 0x4000080 kqread syz-executor 64607 419533 31394 0 3 0 0x4000080 fsleep syz-executor 64607 427496 31394 0 3 0 0x4000080 fsleep syz-executor 64567 269699 39488 0 3 0x2 0x80 nanoslp syz-executor 96322 419690 39488 0 3 0x2 0x80 nanoslp syz-executor 11109 300085 83039 0 3 0 0x80 nanoslp syz-executor 11109 186056 83039 0 3 0 0x4000080 lockf syz-executor 11109 336957 83039 0 3 0 0x4000080 fsleep syz-executor 83039 452162 39488 0 3 0x2 0x80 nanoslp syz-executor 73844 29280 0 0 3 0x14000 0x280 nfsidl nfsio 50822 14400 0 0 3 0x14000 0x280 nfsidl nfsio 34835 94483 0 0 3 0x14000 0x280 nfsidl nfsio 75377 241035 0 0 3 0x14000 0x280 nfsidl nfsio 56786 35545 0 0 3 0x14000 0x280 nfsidl nfsio 74882 270565 0 0 3 0x14000 0x280 nfsidl nfsio 71392 40726 0 0 3 0x14000 0x280 nfsidl nfsio 94684 150814 0 0 3 0x14000 0x280 nfsidl nfsio 34093 369561 0 0 3 0x14000 0x280 nfsidl nfsio 69228 499206 0 0 3 0x14000 0x280 nfsidl nfsio 90832 188941 0 0 3 0x14000 0x280 nfsidl nfsio 27483 450945 0 0 3 0x14000 0x280 nfsidl nfsio 64224 474631 0 0 3 0x14000 0x280 nfsidl nfsio 68187 133191 0 0 3 0x14000 0x280 nfsidl nfsio 16654 68864 0 0 3 0x14000 0x280 nfsidl nfsio 48362 51510 0 0 3 0x14000 0x280 nfsidl nfsio 97384 325259 0 0 3 0x14000 0x280 nfsidl nfsio 71120 3744 0 0 3 0x14000 0x280 nfsidl nfsio 61603 7723 0 0 3 0x14000 0x280 nfsidl nfsio 78448 285938 0 0 3 0x14000 0x280 nfsidl nfsio 67111 87226 29074 0 2 0x100002 0x80 arp 29074 460324 66568 0 3 0x100002 0x88 sigsusp sh 24684 431951 39488 0 3 0x2 0x80 nanoslp syz-executor 45256 523558 39488 0 3 0x2 0x80 nanoslp syz-executor 31394 6504 39488 0 3 0x2 0x80 nanoslp syz-executor 66568 107803 39488 0 3 0x2 0x80 wait syz-executor 39488 509768 43426 0 3 0x2 0x80 kqread syz-executor 43426 280975 20261 0 3 0x100002 0x88 sigsusp ksh 20261 1349 27025 0 3 0x10 0x88 kqread sshd-session 27025 385478 57354 0 3 0x12 0x80 kqread sshd-session 79627 239023 1 0 3 0x100003 0x80 ttyin getty 57354 265463 1 0 3 0 0x88 kqread sshd 35835 151343 81394 74 3 0x1100012 0x80 bpf pflogd 81394 372317 1 0 3 0 0x80 sbwait pflogd 64456 142071 20480 73 3 0x1100010 0x80 kqread syslogd 20480 335911 1 0 3 0x100002 0x80 sbwait syslogd-parent 2025 371108 1 0 3 0x100000 0x80 kqread resolvd 45620 138489 67839 77 2 0x100012 0x80 dhcpleased 98408 134774 67839 77 3 0x100012 0x80 kqread dhcpleased 67839 87917 1 0 3 0 0x80 kqread dhcpleased 96586 324027 0 0 3 0x14000 0x200 bored smr 41151 518591 0 0 2 0x14000 0x200 zerothread 40210 151175 0 0 3 0x14000 0x200 aiodoned aiodoned 95017 192476 0 0 3 0x14000 0x200 syncer update 20442 334069 0 0 3 0x14000 0x200 cleaner cleaner 65441 139480 0 0 3 0x14000 0x200 reaper reaper 83746 310789 0 0 3 0x14000 0x200 pgdaemon pagedaemon 94184 404003 0 0 3 0x14000 0x200 bored viomb 25047 424541 0 0 3 0x14000 0x40000200 acpi0 acpi0 23376 432391 0 0 3 0x14000 0x40000200 idle1 33903 454618 0 0 3 0x14000 0x200 bored softnet1 11110 347668 0 0 3 0x14000 0x200 bored softnet0 54448 410460 0 0 3 0x14000 0x200 smrbar systqmp 28526 444244 0 0 3 0x14000 0x200 bored systq 86638 67212 0 0 3 0x14000 0x200 tmoslp softclockmp 40274 218800 0 0 3 0x14000 0x40000200 tmoslp softclock 5190 43081 0 0 3 0x14000 0x40000200 idle0 1 21158 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{1}> show all locks Process 80157 (ifconfig) thread 0xffff80003c443a20 (450688) exclusive rwlock clonelk r = 0 (0xffffffff83933cb8) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x42c sys/kern/kern_rwlock.c:320 #2 if_clone_destroy+0x93 sys/net/if.c:-1 #3 ifioctl+0x59d sys/net/if.c:2142 #4 sys_ioctl+0x674 sys/kern/sys_generic.c:-1 #5 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a99240) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 ifioctl+0x58c sys/net/if.c:2142 #2 sys_ioctl+0x674 sys/kern/sys_generic.c:-1 #3 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #3 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 #4 Xsyscall+0x128 Process 54448 (systqmp) thread 0xffff800045ffe530 (410460) shared rwlock systqmp r = 0 (0xffffffff8392af48) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 taskq_thread+0x11a sys/kern/kern_task.c:442 #2 proc_trampoline+0x10 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11056 12085K 12150K 166960K 12255 0 pcb 17 12K 12K 166960K 21 0 rtable 189 5K 6K 166960K 476 0 pf 34 17K 21K 166960K 65 0 ifaddr 38 6K 7K 166960K 67 0 ifgroup 55 2K 2K 166960K 81 0 sysctl 1 1K 9K 166960K 5 0 counters 70 37K 37K 166960K 84 0 ioctlops 0 0K 4K 166960K 1495 0 iov 0 0K 16K 166960K 3 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1289 81K 81K 166960K 1443 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 3 0K 0K 166960K 37 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12472 0 file desc 20 73K 97K 166960K 259 0 sigio 0 0K 0K 166960K 1 0 proc 78 131K 180K 166960K 699 0 subproc 72 4K 4K 166960K 126 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 2 0 in_multi 78 5K 6K 166960K 144 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 61 281K 281K 166960K 61 0 exec 0 0K 1K 166960K 457 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 14 124K 124K 166960K 15 0 UVM amap 222 169K 179K 166960K 3971 0 UVM aobj 8 2K 2K 166960K 9 0 pinsyscall 46 92K 112K 166960K 1540 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 2 0 NDP 18 0K 1K 166960K 43 0 temp 36 9126K 9134K 166960K 10343 0 kqueue 14 22K 26K 166960K 35 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 28 0 0 1 0 1 1 0 8 0 rtpcb 120 48 0 44 1 0 1 1 0 8 0 rtentry 176 158 0 67 5 0 5 5 0 8 0 unpcb 144 146 0 129 4 0 4 4 0 8 3 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 19 0 15 1 0 1 1 0 8 0 arp 136 27 0 12 1 0 1 1 0 8 0 inpcb 328 126 0 118 2 0 2 2 0 8 1 nd6 152 36 0 18 1 0 1 1 0 8 0 kcovpl 48 14 0 6 1 0 1 1 0 8 0 ppxss 1192 1 0 1 1 0 1 1 0 8 1 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 32 0 0 1 0 1 1 0 8 0 pfstkey 128 32 0 0 2 0 2 2 0 8 0 pfstate 448 32 0 0 4 0 4 4 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 634 0 220 29 0 29 29 0 8 0 art_table 40 635 0 220 5 0 5 5 0 8 0 art_node 32 158 0 63 1 0 1 1 0 8 0 semapl 72 35 0 34 1 0 1 1 0 8 0 shmpl 120 6 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1659 0 180 93 0 93 93 0 8 0 ffsino 296 1659 0 180 114 0 114 114 0 8 0 nchpl 144 1924 0 201 64 0 64 64 0 8 0 vnodes 216 1813 0 0 101 0 101 101 0 8 0 namei 1024 7108 0 7108 3 1 2 2 0 8 2 percpumem 16 58 0 7 1 0 1 1 0 8 0 kstatmem 264 41 0 14 2 0 2 2 0 8 0 scxspl 216 6801 0 6801 4 3 1 3 1 8 1 plimitpl 152 37 0 20 1 0 1 1 0 8 0 sigapl 424 577 0 507 9 0 9 9 0 8 0 knotepl 120 309 0 0 10 0 10 10 0 8 0 kqueuepl 224 37 0 27 1 0 1 1 0 8 0 pipepl 344 151 0 124 3 0 3 3 0 8 0 fdescpl 528 541 0 507 3 0 3 3 0 8 0 filepl 160 2006 0 1795 13 0 13 13 0 8 3 lockfpl 104 36 0 32 1 0 1 1 0 8 0 lockfspl 48 16 0 13 1 0 1 1 0 8 0 sessionpl 144 33 0 24 1 0 1 1 0 8 0 pgrppl 48 48 0 30 1 0 1 1 0 8 0 ucredpl 104 152 0 139 1 0 1 1 0 8 0 zombiepl 144 507 0 507 1 0 1 1 0 8 1 processpl 1240 577 0 507 6 0 6 6 0 8 0 procpl 664 665 0 590 8 0 8 8 0 8 1 sockpl 752 323 0 294 10 0 10 10 0 8 7 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 125 0 0 16 0 16 16 0 8 0 mcl2k 2048 31 0 0 4 0 4 4 0 8 0 mextrefs 64 30 0 0 1 0 1 1 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 259 0 0 17 0 17 17 0 8 0 bufpl 272 2618 0 89 169 0 169 169 0 8 0 anonpl 32 3640 0 0 30 0 30 30 0 247 0 amapchunkpl 152 10786 0 10373 20 0 20 20 0 158 2 amappl16 200 1470 0 1454 5 1 4 5 0 8 3 amappl15 192 10 0 9 1 0 1 1 0 8 0 amappl14 184 479 0 476 1 0 1 1 0 8 0 amappl13 176 137 0 124 1 0 1 1 0 8 0 amappl12 168 805 0 773 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 66 0 54 1 0 1 1 0 8 0 amappl9 144 303 0 303 1 1 0 1 0 8 0 amappl8 136 112 0 109 1 0 1 1 0 8 0 amappl7 128 157 0 144 1 0 1 1 0 8 0 amappl6 120 145 0 142 1 0 1 1 0 8 0 amappl5 112 158 0 148 1 0 1 1 0 8 0 amappl4 104 304 0 284 1 0 1 1 0 8 0 amappl3 96 2045 0 1939 4 0 4 4 0 8 1 amappl2 88 476 0 420 2 0 2 2 0 8 0 amappl1 80 11054 0 10427 16 0 16 16 0 8 2 amappl 88 3193 0 3049 4 0 4 4 0 92 0 uvmvnodes 80 102 0 0 3 0 3 3 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 8 0 1 1 0 1 1 0 8 0 uaddrrnd 24 541 0 507 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 541 0 507 1 0 1 1 0 8 0 vmmpekpl 168 6153 0 6110 3 0 3 3 0 8 0 vmmpepl 168 43672 0 41785 89 0 89 89 0 357 4 vmsppl 488 540 0 507 6 1 5 5 0 8 0 rwobjpl 80 15494 0 14460 25 0 25 25 0 8 1 pdppl 4096 1090 0 1014 98 18 80 88 0 8 4 pvpl 32 10223 0 0 83 0 83 83 0 265 0 pmappl 256 540 0 507 4 1 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 451 0 23 13 0 13 13 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff839adff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 sys/kern/kern_lock.c:173 softintr_dispatch(0) at softintr_dispatch+0x14e sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862 Xsoftclock() at Xsoftclock+0x27 __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 sys/kern/kern_lock.c:173 syscall(ffff800037b93970) at syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] syscall(ffff800037b93970) at syscall+0xaf4 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x78bed9889f50, count: 5 ddb{0}> trace x86_ipi_db(ffffffff839adff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 sys/kern/kern_lock.c:173 softintr_dispatch(0) at softintr_dispatch+0x14e sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862 Xsoftclock() at Xsoftclock+0x27 __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a98a40) at __mp_lock+0x192 sys/kern/kern_lock.c:173 syscall(ffff800037b93970) at syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] syscall(ffff800037b93970) at syscall+0xaf4 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x78bed9889f50, count: -10 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834f7689) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff83536616,ffffffff83583826,13f,ffffffff834771f1) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff80000161e800) at tun_clone_destroy+0x38a if_clone_destroy(ffff800037fb4fb0) at if_clone_destroy+0x205 sys/net/if.c:1464 ifioctl(ffff800010fdb4a0,80206979,ffff800037fb4fb0,ffff80003c443a20) at ifioctl+0x59d sys/net/if.c:2142 sys_ioctl(ffff80003c443a20,ffff800037fb5190,ffff800037fb50e0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff800037fb5190) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800037fb5190) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x797615c4cd20, count: 6 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834f7689) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff83536616,ffffffff83583826,13f,ffffffff834771f1) at __assert+0x29 sys/kern/subr_prf.c:-1 tun_clone_destroy(ffff80000161e800) at tun_clone_destroy+0x38a if_clone_destroy(ffff800037fb4fb0) at if_clone_destroy+0x205 sys/net/if.c:1464 ifioctl(ffff800010fdb4a0,80206979,ffff800037fb4fb0,ffff80003c443a20) at ifioctl+0x59d sys/net/if.c:2142 sys_ioctl(ffff80003c443a20,ffff800037fb5190,ffff800037fb50e0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff800037fb5190) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800037fb5190) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:804 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x797615c4cd20, count: -9