kernel: protection fault trap, code=0 Stopped at pfi_ifhead_RB_REMOVE+0x50: movq 0x10(%r12),%rbx ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic the kernel did not panic ddb{0}> trace pfi_ifhead_RB_REMOVE(ffffffff8291f0b0,ffff800000b6c500) at pfi_ifhead_RB_REMOVE+0x50 sys/net/pf_if.c:80 pfi_detach_ifgroup(ffff800000b4f880) at pfi_detach_ifgroup+0x11b pfi_kif_unref sys/net/pf_if.c:211 [inline] pfi_detach_ifgroup(ffff800000b4f880) at pfi_detach_ifgroup+0x11b sys/net/pf_if.c:304 if_delgroup(ffff800000ae5000,ffff800000b4f880) at if_delgroup+0x193 sys/net/if.c:2700 if_detach(ffff800000ae5000) at if_detach+0x1cb sys/net/if.c:1049 tun_clone_destroy(ffff800000ae5000) at tun_clone_destroy+0x1e1 sys/net/if_tun.c:325 if_clone_destroy(ffff800021768ce0) at if_clone_destroy+0x136 sys/net/if.c:1212 tun_dev_close(5d00,7) at tun_dev_close+0x140 sys/net/if_tun.c:479 spec_close(ffff800021768db0) at spec_close+0x311 sys/kern/spec_vnops.c:560 VOP_CLOSE(fffffd806e4a7328,7,fffffd807f7b7720,ffff8000216c67f0) at VOP_CLOSE+0xeb sys/kern/vfs_vops.c:177 vn_closefile(fffffd806913bac8,ffff8000216c67f0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806913bac8,ffff8000216c67f0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd806913bac8,ffff8000216c67f0) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd806913bac8,ffff8000216c67f0) at closef+0x11c sys/kern/kern_descrip.c:1263 fdfree(ffff8000216c67f0) at fdfree+0xf4 sys/kern/kern_descrip.c:1195 exit1(ffff8000216c67f0,0,19,1) at exit1+0x335 sys/kern/kern_exit.c:200 postsig(ffff8000216c67f0,19) at postsig+0x59c sigexit sys/kern/kern_sig.c:1494 [inline] postsig(ffff8000216c67f0,19) at postsig+0x59c sys/kern/kern_sig.c:1423 userret(ffff8000216c67f0) at userret+0x189 sys/kern/kern_sig.c:1914 Xsyscall() at Xsyscall+0x156 end of kernel end trace frame: 0x7f7ffffbf4c0, count: -17 ddb{0}> show registers rdi 0xffffffff8291f0b0 pfi_ifs rsi 0xffff800000b6c500 rbp 0xffff800021768b40 rbx 0xdeadbeefdeadbeef rdx 0 rcx 0xffff800000b4ff80 rax 0xffff800000b6c510 r8 0xf8 r9 0x8080808080808080 r10 0xc581cbd07725650b r11 0x3664cffdf1d8d330 r12 0xdeadbeefdeadbeef r13 0xffff800000afb520 r14 0xffff800000b6c500 r15 0xffffffff8291f0b0 pfi_ifs rip 0xffffffff8171dcd0 pfi_ifhead_RB_REMOVE+0x50 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff800021768ae0 ss 0x10 pfi_ifhead_RB_REMOVE+0x50: movq 0x10(%r12),%rbx ddb{0}> show proc PROC (syz-executor.0) pid=109597 stat=onproc flags process=a proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000216c7270,0xffff8000216c6020 process=0xffff80002128ea48 user=0xffff800021764000, vmspace=0xfffffd807d9c88b0 estcpu=36, cpticks=8, pctcpu=0.28 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 15767 416394 85452 0 3 0x2 biowait syz-executor.1 15726 285043 1 0 3 0x100083 ttyin getty 18857 522276 0 0 3 0x14200 bored sosplice 85452 75849 87840 0 3 0x82 thrsleep syz-fuzzer 85452 8320 87840 0 3 0x4000082 nanoslp syz-fuzzer 85452 428078 87840 0 7 0x4000002 syz-fuzzer 85452 309610 87840 0 3 0x4000082 thrsleep syz-fuzzer 85452 298303 87840 0 3 0x4000082 thrsleep syz-fuzzer 85452 397313 87840 0 3 0x4000082 thrsleep syz-fuzzer 85452 343015 87840 0 3 0x4000082 thrsleep syz-fuzzer 85452 383186 87840 0 3 0x4000082 thrsleep syz-fuzzer 87840 270348 45438 0 3 0x10008a sigsusp ksh 45438 366190 96601 0 3 0x92 select sshd 96601 12131 1 0 3 0x80 select sshd 74200 222438 99518 74 3 0x100092 bpf pflogd 99518 7343 1 0 3 0x80 netio pflogd 32974 146427 93978 73 3 0x100090 kqread syslogd 93978 101975 1 0 3 0x100082 netio syslogd 32694 342770 1 77 2 0x100090 dhclient 14200 28006 1 0 3 0x80 poll dhclient 80133 230362 0 0 3 0x14200 bored smr 36427 63366 0 0 3 0x14200 pgzero zerothread 60533 291365 0 0 3 0x14200 aiodoned aiodoned 7245 182389 0 0 3 0x14200 syncer update 20146 118442 0 0 3 0x14200 cleaner cleaner 42168 329423 0 0 3 0x14200 reaper reaper 38015 306285 0 0 3 0x14200 pgdaemon pagedaemon 80311 87315 0 0 3 0x14200 bored crynlk 3053 254594 0 0 3 0x14200 bored crypto 24581 299432 0 0 3 0x14200 bored viomb 41252 75996 0 0 3 0x40014200 acpi0 acpi0 29115 42648 0 0 3 0x40014200 idle1 61058 186944 0 0 3 0x14200 bored softnet 47391 118080 0 0 2 0x14200 systqmp 24804 506619 0 0 3 0x14200 bored systq 17562 510045 0 0 3 0x40014200 bored softclock 37927 250158 0 0 3 0x40014200 idle0 1 26651 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 15767 (syz-executor.1) thread 0xffff8000216c6010 (416394) exclusive rrwlock inode r = 0 (0xfffffd806a5ac3d8) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 rw_enter+0x443 sys/kern/kern_rwlock.c:312 #2 rrw_enter+0x88 sys/kern/kern_rwlock.c:463 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:614 #4 vn_lock+0x6c sys/kern/vfs_vnops.c:575 #5 vget+0x1c6 sys/kern/vfs_subr.c:671 #6 ufs_ihashget+0x121 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x6b sys/ufs/ffs/ffs_vfsops.c:1321 #8 ufs_lookup+0x151d sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 #10 vfs_lookup+0x708 sys/kern/vfs_lookup.c:568 #11 namei+0x5f7 sys/kern/vfs_lookup.c:249 #12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1848 #13 syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] #13 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd807c08eb48) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 rw_enter+0x443 sys/kern/kern_rwlock.c:312 #2 rrw_enter+0x88 sys/kern/kern_rwlock.c:463 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:614 #4 vn_lock+0x6c sys/kern/vfs_vnops.c:575 #5 vfs_lookup+0xe6 sys/kern/vfs_lookup.c:419 #6 namei+0x5f7 sys/kern/vfs_lookup.c:249 #7 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1848 #8 syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] #8 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 #9 Xsyscall+0x128 Process 85452 (syz-fuzzer) thread 0xffff8000ffff77b0 (428078) exclusive rwlock pipelk r = 0 (0xfffffd806fa243d0) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 pipe_read+0x160 sys/kern/sys_pipe.c:403 #2 dofilereadv+0x1a1 sys/kern/sys_generic.c:237 #3 sys_read+0x83 sys/kern/sys_generic.c:157 #4 syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] #4 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 #5 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9536 6445K 7216K 78643K 16171 0 pcb 13 8K 8K 78643K 243 0 rtable 86 11K 12K 78643K 943 0 ifaddr 77 15K 16K 78643K 324 0 counters 44 34K 34K 78643K 142 0 ioctlops 0 0K 4K 78643K 1632 0 iov 0 0K 24K 78643K 175 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 3157 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 26 0 VM map 2 1K 1K 78643K 2 0 sem 11 1K 1K 78643K 12 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 4 9K 25K 78643K 5386 0 sigio 0 0K 0K 78643K 46 0 proc 62 63K 95K 78643K 897 0 subproc 23 1K 2K 78643K 119 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 247 0 in_multi 18 1K 2K 78643K 249 0 ether_multi 1 0K 0K 78643K 72 0 mrt 0 0K 0K 78643K 34 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 2K 78643K 634 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 231 401K 402K 78643K 13230 0 UVM aobj 44 4K 4K 78643K 65 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 145 0 NDP 13 0K 0K 78643K 81 0 temp 139 3987K 4107K 78643K 117796 0 kqueue 3 4K 12K 78643K 247 0 SYN cache 2 10K 18K 78643K 3 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 16 0 12 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 120 209 0 207 1 0 1 1 0 8 0 rtentry 112 133 0 103 2 0 2 2 0 8 0 unpcb 120 745 0 727 1 0 1 1 0 8 0 syncache 296 31 0 31 7 7 0 1 0 8 0 tcpqe 32 29 0 29 7 7 0 1 0 8 0 tcpcb 736 845 0 840 16 15 1 6 0 8 0 inpcb 304 2025 0 2017 9 8 1 2 0 8 0 rttmr 72 11 0 11 2 2 0 1 0 8 0 nd6 48 28 0 27 1 0 1 1 0 8 0 pkpcb 40 21 0 21 2 2 0 1 0 8 0 kcovpl 48 7 0 6 1 0 1 1 0 8 0 ppxss 1128 12 0 12 3 2 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 pfrktable 1344 1 0 0 1 0 1 1 0 8 0 pfqueue 264 5 0 5 1 0 1 1 0 8 1 pfstitem 24 23 0 21 1 0 1 1 0 8 0 pfstkey 112 45 0 43 1 0 1 1 0 8 0 pfstate 320 34 0 32 2 1 1 2 0 8 0 pfrule 1360 41 0 30 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 570 0 393 13 1 12 13 0 8 0 art_table 32 571 0 393 2 0 2 2 0 8 0 art_node 16 132 0 95 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 11 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 10 0 1 1 0 1 1 0 8 0 shmpl 112 62 0 21 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 8173 0 6764 91 2 89 89 0 8 0 ffsino 272 8173 0 6764 96 1 95 95 0 8 0 nchpl 144 14591 0 13014 60 0 60 60 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 36734 0 36734 2 1 1 1 0 8 1 percpumem 16 82 0 49 1 0 1 1 0 8 0 vcpupl 1984 25 0 0 4 0 4 4 0 8 0 vmpool 560 25 0 0 2 0 2 2 0 8 0 scsiplug 72 4 0 4 1 1 0 1 0 8 0 scxspl 216 47304 0 47303 12 11 1 8 0 8 0 plimitpl 152 282 0 274 1 0 1 1 0 8 0 sigapl 424 5610 0 5578 8 4 4 7 0 8 0 futexpl 56 35883 0 35883 1 0 1 1 0 8 1 knotepl 112 404 0 386 1 0 1 1 0 8 0 kqueuepl 168 2327 0 2325 1 0 1 1 0 8 0 pipepl 336 275 0 265 10 9 1 2 0 8 0 fdescpl 496 5573 0 5558 3 0 3 3 0 8 0 filepl 152 18184 0 18093 6 1 5 5 0 8 1 lockfpl 104 567 0 566 1 0 1 1 0 8 0 lockfspl 48 223 0 222 1 0 1 1 0 8 0 sessionpl 144 24 0 13 1 0 1 1 0 8 0 pgrppl 48 24 0 13 1 0 1 1 0 8 0 ucredpl 96 2752 0 2743 1 0 1 1 0 8 0 zombiepl 144 5579 0 5578 2 1 1 1 0 8 0 processpl 1080 5610 0 5578 4 0 4 4 0 8 0 procpl 672 12125 0 12086 6 1 5 6 0 8 0 sosppl 168 156 0 156 7 7 0 1 0 8 0 sockpl 432 3014 0 2986 6 2 4 5 0 8 0 mcl64k 65536 15 0 0 2 0 2 2 0 8 0 mcl12k 12288 13 0 0 2 0 2 2 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 9 0 0 1 0 1 1 0 8 0 mcl2k 2048 278 0 0 17 0 17 17 0 8 0 mtagpl 96 267 0 0 5 0 5 5 0 8 0 mbufpl 256 851 0 0 42 0 42 42 0 8 0 bufpl 280 16344 0 10095 447 0 447 447 0 8 0 anonpl 24 442591 0 433575 130 51 79 92 0 186 18 amapchunkpl 152 20636 0 20366 15 3 12 12 0 158 0 amappl16 200 20536 0 20213 67 39 28 38 0 8 8 amappl15 192 909 0 908 1 0 1 1 0 8 0 amappl14 184 1253 0 1247 1 0 1 1 0 8 0 amappl13 176 81 0 77 1 0 1 1 0 8 0 amappl12 168 7 0 5 1 0 1 1 0 8 0 amappl11 160 83 0 66 1 0 1 1 0 8 0 amappl10 152 2962 0 2953 1 0 1 1 0 8 0 amappl9 144 240 0 240 1 1 0 1 0 8 0 amappl8 136 344 0 252 4 0 4 4 0 8 0 amappl7 128 534 0 525 1 0 1 1 0 8 0 amappl6 120 3038 0 3024 1 0 1 1 0 8 0 amappl5 112 5060 0 5042 1 0 1 1 0 8 0 amappl4 104 1526 0 1498 1 0 1 1 0 8 0 amappl3 96 255 0 247 1 0 1 1 0 8 0 amappl2 88 44813 0 44743 3 1 2 3 0 8 0 amappl1 80 162470 0 162008 26 14 12 21 0 8 0 amappl 88 12491 0 12409 2 0 2 2 0 92 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 64 64 0 21 1 0 1 1 0 8 0 uaddrrnd 24 5598 0 5558 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5598 0 5558 1 0 1 1 0 8 0 vmmpekpl 168 28323 0 28287 3 0 3 3 0 8 0 vmmpepl 168 701847 0 700304 140 53 87 92 0 357 7 vmsppl 368 5597 0 5558 4 0 4 4 0 8 0 rwobjpl 56 147140 0 146039 39 20 19 22 0 8 0 pdppl 4096 11203 0 11141 85 18 67 67 0 8 5 pvpl 32 2056177 0 2046686 244 130 114 117 0 265 24 pmappl 232 5597 0 5558 5 2 3 3 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 391 0 50 10 0 10 10 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace pfi_ifhead_RB_REMOVE(ffffffff8291f0b0,ffff800000b6c500) at pfi_ifhead_RB_REMOVE+0x50 sys/net/pf_if.c:80 pfi_detach_ifgroup(ffff800000b4f880) at pfi_detach_ifgroup+0x11b pfi_kif_unref sys/net/pf_if.c:211 [inline] pfi_detach_ifgroup(ffff800000b4f880) at pfi_detach_ifgroup+0x11b sys/net/pf_if.c:304 if_delgroup(ffff800000ae5000,ffff800000b4f880) at if_delgroup+0x193 sys/net/if.c:2700 if_detach(ffff800000ae5000) at if_detach+0x1cb sys/net/if.c:1049 tun_clone_destroy(ffff800000ae5000) at tun_clone_destroy+0x1e1 sys/net/if_tun.c:325 if_clone_destroy(ffff800021768ce0) at if_clone_destroy+0x136 sys/net/if.c:1212 tun_dev_close(5d00,7) at tun_dev_close+0x140 sys/net/if_tun.c:479 spec_close(ffff800021768db0) at spec_close+0x311 sys/kern/spec_vnops.c:560 VOP_CLOSE(fffffd806e4a7328,7,fffffd807f7b7720,ffff8000216c67f0) at VOP_CLOSE+0xeb sys/kern/vfs_vops.c:177 vn_closefile(fffffd806913bac8,ffff8000216c67f0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806913bac8,ffff8000216c67f0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd806913bac8,ffff8000216c67f0) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd806913bac8,ffff8000216c67f0) at closef+0x11c sys/kern/kern_descrip.c:1263 fdfree(ffff8000216c67f0) at fdfree+0xf4 sys/kern/kern_descrip.c:1195 exit1(ffff8000216c67f0,0,19,1) at exit1+0x335 sys/kern/kern_exit.c:200 postsig(ffff8000216c67f0,19) at postsig+0x59c sigexit sys/kern/kern_sig.c:1494 [inline] postsig(ffff8000216c67f0,19) at postsig+0x59c sys/kern/kern_sig.c:1423 userret(ffff8000216c67f0) at userret+0x189 sys/kern/kern_sig.c:1914 Xsyscall() at Xsyscall+0x156 end of kernel end trace frame: 0x7f7ffffbf4c0, count: -17 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff800020d68ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x17 kd_curproc sys/dev/kcov.c:559 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x17 sys/dev/kcov.c:143 __mp_lock(ffffffff828f1530) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff828f1530) at __mp_lock+0x133 sys/kern/kern_lock.c:147 pipeselwakeup(fffffd806fa24330) at pipeselwakeup+0x4e sys/kern/sys_pipe.c:366 pipe_read(fffffd807c1efbe0,ffff800021263ba8,0) at pipe_read+0x4b3 sys/kern/sys_pipe.c:468 dofilereadv(ffff8000ffff77b0,4,ffff800021263ba8,0,ffff800021263c90) at dofilereadv+0x1a1 sys/kern/sys_generic.c:237 sys_read(ffff8000ffff77b0,ffff800021263c40,ffff800021263c90) at sys_read+0x83 sys/kern/sys_generic.c:157 syscall(ffff800021263d10) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021263d10) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc000043e38, count: -11