kernel: protection fault trap, code=0 Stopped at in_ifdetach+0x67: movzbl 0x1(%rax),%r12d ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic the kernel did not panic ddb{0}> show kasan No such command ddb{0}> trace in_ifdetach(ffff8000015f7000) at in_ifdetach+0x67 sys/netinet/in.c:1018 if_detach(ffff8000015f7000) at if_detach+0x2fe sys/net/if.c:1311 tun_clone_destroy(ffff8000015f7000) at tun_clone_destroy+0x2ce sys/net/if_tun.c:343 if_clone_destroy(ffff80003c3bf780) at if_clone_destroy+0x205 sys/net/if.c:1480 tun_dev_close(5d00,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80003c3bf840) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff2806e2d2b20,7,fffff280097fd6e8,ffff80003b7b94e0) at VOP_CLOSE+0x132 sys/kern/vfs_vops.c:156 vn_closefile(fffff2806d0b8400,ffff80003b7b94e0) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff2806d0b8400,ffff80003b7b94e0) at vn_closefile+0x12b sys/kern/vfs_vnops.c:621 fdrop(fffff2806d0b8400,ffff80003b7b94e0) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff2806d0b8400,ffff80003b7b94e0) at closef+0x192 sys/kern/kern_descrip.c:1265 fdfree(ffff80003b7b94e0) at fdfree+0x116 sys/kern/kern_descrip.c:1196 exit1(ffff80003b7b94e0,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003b7b94e0,ffff80003c3bfbb0,ffff80003c3bfb00) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003c3bfbb0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3bfbb0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73b433439e70, count: -15 ddb{0}> show registers rdi 0 rsi 0 rbp 0xffff80003c3bf670 rbx 0xffff8000015ebc80 rdx 0 rcx 0xffff80003b7b94e0 rax 0xdeaf4152deaf4152 r8 0xffffffffffffffff r9 0 r10 0x501a054d6408ff9a r11 0xef9630b9e2e343b7 r12 0 r13 0xffff8000015f7048 r14 0xffff8000015f7000 r15 0xdeaf0036deaf4152 rip 0xffffffff81f04527 in_ifdetach+0x67 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff80003c3bf620 ss 0 in_ifdetach+0x67: movzbl 0x1(%rax),%r12d ddb{0}> show proc PROC (syz-executor) tid=468959 pid=12005 tcnt=0 stat=onproc flags process=18 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=1 forw=0xffffffffffffffff, list=0xffff800045fefca0,0xffff80003b7b9cb8 process=0xffff80002ef7d828 user=0xffff80003c3ba000, vmspace=0xfffff2806d08ad80 estcpu=36, cpticks=5, pctcpu=0.2, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 30150 485723 33773 0 3 0x2 0 clonelk ifconfig 92549 315140 67300 32767 2 0x10 0 syz-executor 92549 334816 67300 32767 3 0x10 0x4000000 biowait syz-executor 92549 441636 67300 32767 3 0x10 0x4000080 fsleep syz-executor 92549 374284 67300 32767 3 0x10 0x4000080 fsleep syz-executor 22687 209595 46668 32767 3 0x10 0x80 nanoslp syz-executor 22687 489371 46668 32767 3 0x10 0x4000080 msgwait syz-executor 22687 243110 46668 32767 3 0x10 0x4000080 fsleep syz-executor 96640 318952 79526 32767 2 0x10 0 syz-executor 96640 246307 79526 32767 3 0x10 0x4000080 fsleep syz-executor 33773 190179 53952 0 3 0x100002 0x88 sigsusp sh 59697 520514 73752 32767 2 0x10 0 syz-executor 59697 74492 73752 32767 3 0x10 0x4000080 fsleep syz-executor 53952 316131 99297 0 3 0 0x80 wait syz-executor 99297 486566 37106 0 3 0x2 0x80 wait syz-executor 79526 24086 32125 32767 3 0x10 0x80 nanoslp syz-executor 92610 507137 93165 32767 7 0x10000010 0 syz-executor 67300 171518 78070 32767 3 0x10 0x80 nanoslp syz-executor 73752 61733 14497 32767 2 0x10 0 syz-executor 46668 284153 3701 32767 3 0x10 0x80 nanoslp syz-executor 32125 418264 37106 0 3 0x2 0x80 wait syz-executor 93165 8111 37106 0 3 0x2 0x80 wait syz-executor 45705 106808 37106 0 3 0x2 0x80 wait syz-executor 3701 467850 37106 0 3 0x2 0x80 wait syz-executor 78070 482165 37106 0 3 0x2 0x80 wait syz-executor 14497 496045 37106 0 3 0x2 0x80 wait syz-executor 42069 249101 37106 0 3 0x2 0x80 wait syz-executor 37106 506616 1399 0 3 0x2 0x80 kqread syz-executor 1399 456596 26979 0 3 0x100002 0x88 sigsusp ksh 26979 462257 23086 0 3 0x10 0x88 kqread sshd-session 23086 207804 68547 0 3 0x12 0x80 kqread sshd-session 63140 181861 1 0 3 0x100003 0x80 ttyin getty 68547 160519 1 0 3 0 0x88 kqread sshd 50463 457717 2032 73 3 0x1100010 0x80 kqread syslogd 2032 522277 1 0 3 0x100002 0x80 sbwait syslogd 48809 248196 1 0 3 0x100000 0x80 kqread resolvd 18642 322809 76046 77 3 0x100012 0x80 kqread dhcpleased 45112 29871 76046 77 3 0x100012 0x80 kqread dhcpleased 76046 328580 1 0 3 0 0x80 kqread dhcpleased 74475 71462 0 0 3 0x14000 0x200 bored smr 97355 25008 0 0 2 0x14000 0x200 zerothread 28625 185525 0 0 3 0x14000 0x200 aiodoned aiodoned 55323 502485 0 0 3 0x14000 0x200 syncer update 30885 440429 0 0 3 0x14000 0x200 cleaner cleaner 41029 198208 0 0 3 0x14000 0x200 reaper reaper 97120 297637 0 0 3 0x14000 0x200 pgdaemon pagedaemon 92360 80696 0 0 3 0x14000 0x200 bored viomb 64741 6269 0 0 3 0x14000 0x40000200 acpi0 acpi0 41433 392489 0 0 3 0x14000 0x40000200 idle1 29536 307690 0 0 3 0x14000 0x200 bored softnet1 181 328271 0 0 3 0x14000 0x200 bored softnet0 96104 442418 0 0 3 0x14000 0x200 smrbar systqmp 15751 275682 0 0 3 0x14000 0x200 bored systq 34526 347588 0 0 3 0x14000 0x200 tmoslp softclockmp 31552 161877 0 0 3 0x14000 0x40000200 tmoslp softclock 92933 291315 0 0 3 0x14000 0x40000200 idle0 1 355409 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{0}> show all locks Process 92549 (syz-executor) thread 0xffff80003b7b8a80 (334816) exclusive rrwlock inode r = 0 (0xfffff2806d751d70) #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+0x419 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 ufs_ihashins+0x4f ufs_ihash sys/ufs/ufs/ufs_ihash.c:-1 [inline] #4 ufs_ihashins+0x4f sys/ufs/ufs/ufs_ihash.c:150 #5 ffs_vget+0x187 sys/ufs/ffs/ffs_vfsops.c:1232 #6 ffs_inode_alloc+0x279 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_makeinode+0xcd sys/ufs/ufs/ufs_vnops.c:1759 #8 ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 #9 VOP_CREATE+0xfe sys/kern/vfs_vops.c:103 #10 vn_open+0x50d sys/kern/vfs_vnops.c:118 #11 doopenat+0x35b sys/kern/vfs_syscalls.c:1163 #12 sys_open+0x59 sys/kern/vfs_syscalls.c:1065 #13 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #13 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffff2806c145438) #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+0x419 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:576 #5 vfs_lookup+0x12b sys/kern/vfs_lookup.c:431 #6 namei+0x7c5 sys/kern/vfs_lookup.c:250 #7 vn_open+0x22e sys/kern/vfs_vnops.c:109 #8 doopenat+0x35b sys/kern/vfs_syscalls.c:1163 #9 sys_open+0x59 sys/kern/vfs_syscalls.c:1065 #10 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #10 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:791 #11 Xsyscall+0x128 Process 96104 (systqmp) thread 0xffff800045ffe7c8 (442418) shared rwlock systqmp r = 0 (0xffffffff83964578) #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+0x12a sys/kern/kern_task.c:442 #2 proc_trampoline+0x10 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11043 12015K 12034K 166960K 12138 0 pcb 17 12K 12K 166960K 17 0 rtable 217 6K 7K 166960K 358 0 pf 29 16K 16K 166960K 31 0 ifaddr 38 6K 7K 166960K 44 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 3 1K 9K 166960K 7 0 counters 68 36K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 31 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1287 81K 81K 166960K 1364 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 4 0K 0K 166960K 5 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 24 89K 121K 166960K 173 0 proc 65 115K 163K 166960K 503 0 subproc 72 4K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 8 0 in_multi 88 5K 6K 166960K 102 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 43 201K 201K 166960K 43 0 exec 0 0K 1K 166960K 371 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 232 168K 178K 166960K 3213 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 45 90K 112K 166960K 1287 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 3 0 NDP 24 1K 2K 166960K 27 0 temp 36 9114K 9120K 166960K 3505 0 kqueue 13 20K 22K 166960K 29 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> 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 40 0 37 1 0 1 1 0 8 0 rtentry 176 112 0 12 6 0 6 6 0 8 0 unpcb 144 54 0 39 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 23 0 19 1 0 1 1 0 8 0 arp 136 18 0 2 1 0 1 1 0 8 0 inpcb 328 100 0 91 2 0 2 2 0 8 1 nd6 152 25 0 3 1 0 1 1 0 8 0 kcovpl 48 9 0 1 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 465 0 44 30 0 30 30 0 8 0 art_table 40 466 0 44 5 0 5 5 0 8 0 art_node 32 112 0 12 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 0 1 1 0 8 1 semapl 72 3 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1596 0 129 92 0 92 92 0 8 0 ffsino 296 1596 0 129 113 0 113 113 0 8 0 nchpl 144 1815 0 115 64 0 64 64 0 8 1 vnodes 216 1686 0 0 94 0 94 94 0 8 0 namei 1024 6076 0 6075 2 0 2 2 0 8 1 percpumem 16 51 0 1 1 0 1 1 0 8 0 kstatmem 264 25 0 2 2 0 2 2 0 8 0 scxspl 216 6412 0 6411 4 2 2 3 1 8 1 plimitpl 152 40 0 16 1 0 1 1 0 8 0 sigapl 424 472 0 419 7 0 7 7 0 8 1 knotepl 120 98 0 0 3 0 3 3 0 8 0 kqueuepl 224 27 0 18 1 0 1 1 0 8 0 pipepl 344 126 0 99 3 0 3 3 0 8 0 fdescpl 528 456 0 420 3 0 3 3 0 8 0 filepl 160 1587 0 1382 10 0 10 10 0 8 0 lockfpl 104 10 0 8 1 0 1 1 0 8 0 lockfspl 48 6 0 4 1 0 1 1 0 8 0 sessionpl 144 25 0 9 1 0 1 1 0 8 0 pgrppl 48 34 0 10 1 0 1 1 0 8 0 ucredpl 104 128 0 110 1 0 1 1 0 8 0 zombiepl 144 422 0 419 1 0 1 1 0 8 0 processpl 1232 472 0 419 5 0 5 5 0 8 0 procpl 664 522 0 462 6 0 6 6 0 8 0 sosppl 176 1 0 1 1 0 1 1 0 8 1 sockpl 752 194 0 167 5 0 5 5 0 8 2 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 124 0 0 16 0 16 16 0 8 0 mcl2k 2048 16 0 0 2 0 2 2 0 8 0 mextrefs 64 9 0 0 1 0 1 1 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 176 0 0 11 0 11 11 0 8 0 bufpl 272 2321 0 102 148 0 148 148 0 8 0 anonpl 32 5051 0 0 41 0 41 41 0 247 0 amapchunkpl 152 8858 0 8363 23 0 23 23 0 158 2 amappl16 200 1554 0 1539 5 0 5 5 0 8 3 amappl15 192 4 0 4 1 0 1 1 0 8 1 amappl14 184 416 0 413 1 0 1 1 0 8 0 amappl13 176 114 0 104 1 0 1 1 0 8 0 amappl12 168 694 0 661 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 0 1 1 0 8 1 amappl10 152 60 0 50 1 0 1 1 0 8 0 amappl9 144 305 0 305 1 0 1 1 0 8 1 amappl8 136 96 0 94 1 0 1 1 0 8 0 amappl7 128 140 0 129 1 0 1 1 0 8 0 amappl6 120 153 0 150 1 0 1 1 0 8 0 amappl5 112 96 0 89 1 0 1 1 0 8 0 amappl4 104 287 0 272 1 0 1 1 0 8 0 amappl3 96 1541 0 1448 4 1 3 3 0 8 0 amappl2 88 572 0 500 2 0 2 2 0 8 0 amappl1 80 10437 0 9869 14 0 14 14 0 8 1 amappl 88 2510 0 2345 5 0 5 5 0 92 0 uvmvnodes 80 96 0 0 2 0 2 2 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 456 0 420 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 456 0 420 1 0 1 1 0 8 0 vmmpekpl 168 5611 0 5575 2 0 2 2 0 8 0 vmmpepl 168 38619 0 36689 94 0 94 94 0 357 7 vmsppl 488 455 0 420 7 1 6 6 0 8 0 rwobjpl 80 14249 0 13326 22 0 22 22 0 8 1 pdppl 4096 919 0 840 109 14 95 95 0 8 16 pvpl 32 11540 0 0 95 1 94 94 0 265 0 pmappl 256 455 0 420 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 425 0 17 12 0 12 12 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace in_ifdetach(ffff8000015f7000) at in_ifdetach+0x67 sys/netinet/in.c:1018 if_detach(ffff8000015f7000) at if_detach+0x2fe sys/net/if.c:1311 tun_clone_destroy(ffff8000015f7000) at tun_clone_destroy+0x2ce sys/net/if_tun.c:343 if_clone_destroy(ffff80003c3bf780) at if_clone_destroy+0x205 sys/net/if.c:1480 tun_dev_close(5d00,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80003c3bf840) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff2806e2d2b20,7,fffff280097fd6e8,ffff80003b7b94e0) at VOP_CLOSE+0x132 sys/kern/vfs_vops.c:156 vn_closefile(fffff2806d0b8400,ffff80003b7b94e0) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff2806d0b8400,ffff80003b7b94e0) at vn_closefile+0x12b sys/kern/vfs_vnops.c:621 fdrop(fffff2806d0b8400,ffff80003b7b94e0) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff2806d0b8400,ffff80003b7b94e0) at closef+0x192 sys/kern/kern_descrip.c:1265 fdfree(ffff80003b7b94e0) at fdfree+0x116 sys/kern/kern_descrip.c:1196 exit1(ffff80003b7b94e0,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003b7b94e0,ffff80003c3bfbb0,ffff80003c3bfb00) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003c3bfbb0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3bfbb0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73b433439e70, count: -15 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff80002999dff0) 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(ffffffff83ab6800) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83ab6800) at __mp_lock+0x192 sys/kern/kern_lock.c:173 syscall(ffff8000387a3240) at syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] syscall(ffff8000387a3240) at syscall+0xaf4 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73c8cb4cc930, count: -6