kernel: protection fault trap, code=0 Stopped at pf_anchor_global_RB_REMOVE+0x58: movq 0(%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 pf_anchor_global_RB_REMOVE(ffffffff82b83bd8,ffff800000c4d000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000c4d490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfioctl(4900,cd60441a,ffff800000c00000,3,ffff8000260887f0) at pfioctl+0x8f7c sys/net/pf_ioctl.c:1713 VOP_IOCTL(fffffd806f88c8e8,cd60441a,ffff800000c00000,3,fffffd807f7d86c0,ffff8000260887f0) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8065d30990,cd60441a,ffff800000c00000,ffff8000260887f0) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000260887f0,ffff800026080cc8,ffff800026080d20) at sys_ioctl+0x4a2 syscall(ffff800026080d90) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800026080d90) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb770af25120, count: -8 ddb{0}> show registers rdi 0xffffffff82b83bd8 pf_anchors rsi 0xffff800000c4d000 rbp 0xffff800026080830 rbx 0xffffffff82b83bd8 pf_anchors rdx 0 rcx 0xfffffd8003577140 rax 0xffff8000260887f0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x90e70a640d4b7388 r11 0x251b0b475d75fb61 r12 0x3714ece10d4e9f3f r13 0xffffffff82b83be0 pf_main_anchor r14 0xffff800000c4d000 r15 0xdeaf007fdeafbead rip 0xffffffff82337c58 pf_anchor_global_RB_REMOVE+0x58 cs 0x8 rflags 0x10206 __ALIGN_SIZE+0xf206 rsp 0xffff8000260807e0 ss 0x10 pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{0}> show proc PROC (syz-executor.0) pid=317970 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff8000260c22a8,0xffff800026089a60 process=0xffff80002e350c98 user=0xffff80002607b000, vmspace=0xfffffd80613555d0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 34870 24568 65580 0 2 0 syz-executor.4 11867 138444 13870 0 2 0 syz-executor.0 *11867 317970 13870 0 7 0x4000000 syz-executor.0 47224 347228 65341 0 2 0 syz-executor.3 47224 379072 65341 0 3 0x4000080 fsleep syz-executor.3 70637 876 1423 0 2 0 syz-executor.7 70637 427305 1423 0 3 0x4000080 fsleep syz-executor.7 13870 204730 27044 0 3 0x82 nanoslp syz-executor.0 92964 110200 0 0 3 0x14200 acct acct 65580 395565 27044 0 2 0x2 syz-executor.4 1423 473766 27044 0 3 0x82 nanoslp syz-executor.7 35646 80046 27044 0 2 0x2 syz-executor.1 81772 136931 27044 0 3 0x82 nanoslp syz-executor.6 27544 255745 27044 0 3 0x82 nanoslp syz-executor.2 75383 195719 27044 0 3 0x82 nanoslp syz-executor.5 65341 412911 27044 0 3 0x82 nanoslp syz-executor.3 57275 463033 1 0 3 0x100083 ttyin getty 44826 33152 0 0 3 0x14280 nfsidl nfsio 26656 182012 0 0 3 0x14280 nfsidl nfsio 4014 330591 0 0 3 0x14280 nfsidl nfsio 84022 406646 0 0 3 0x14280 nfsidl nfsio 34876 210806 0 0 3 0x14280 nfsidl nfsio 44654 517765 0 0 3 0x14280 nfsidl nfsio 50361 255324 0 0 3 0x14280 nfsidl nfsio 35212 421316 0 0 3 0x14280 nfsidl nfsio 5348 174996 0 0 3 0x14280 nfsidl nfsio 88199 410738 0 0 3 0x14280 nfsidl nfsio 89576 349645 0 0 3 0x14280 nfsidl nfsio 60027 168526 0 0 3 0x14280 nfsidl nfsio 26031 166908 0 0 3 0x14280 nfsidl nfsio 14022 488195 0 0 3 0x14280 nfsidl nfsio 1358 438014 0 0 3 0x14280 nfsidl nfsio 65113 449171 0 0 3 0x14280 nfsidl nfsio 71300 115547 0 0 3 0x14280 nfsidl nfsio 7481 229094 0 0 3 0x14280 nfsidl nfsio 76973 284081 0 0 3 0x14280 nfsidl nfsio 80039 373824 0 0 3 0x14280 nfsidl nfsio 215 149461 0 0 3 0x14200 bored sosplice 27044 295748 921 0 3 0x82 thrsleep syz-fuzzer 27044 476074 921 0 3 0x4000082 nanoslp syz-fuzzer 27044 204381 921 0 3 0x4000082 thrsleep syz-fuzzer 27044 155140 921 0 3 0x4000082 thrsleep syz-fuzzer 27044 397251 921 0 3 0x4000082 nanoslp syz-fuzzer 27044 59011 921 0 3 0x4000082 thrsleep syz-fuzzer 27044 53527 921 0 3 0x4000082 thrsleep syz-fuzzer 27044 499571 921 0 3 0x4000082 kqread syz-fuzzer 27044 429175 921 0 3 0x4000082 thrsleep syz-fuzzer 27044 315331 921 0 3 0x4000082 thrsleep syz-fuzzer 921 238139 92671 0 3 0x10008a sigsusp ksh 92671 304116 48630 0 3 0x9a kqread sshd 48630 127794 1 0 3 0x88 kqread sshd 89119 300813 14958 74 3 0x1100092 bpf pflogd 14958 35651 1 0 3 0x80 netio pflogd 89515 19084 56356 73 3 0x1100090 kqread syslogd 56356 448981 1 0 3 0x100082 netio syslogd 80718 15152 1 0 3 0x100080 kqread resolvd 78584 507334 22429 77 3 0x100092 kqread dhcpleased 60177 318640 22429 77 3 0x100092 kqread dhcpleased 22429 221661 1 0 3 0x80 kqread dhcpleased 19353 204260 0 0 3 0x14200 bored smr 79480 473627 0 0 2 0x14200 zerothread 78726 391686 0 0 3 0x14200 aiodoned aiodoned 55281 244102 0 0 3 0x14200 syncer update 89757 482296 0 0 3 0x14200 cleaner cleaner 34507 187348 0 0 3 0x14200 reaper reaper 77972 311710 0 0 3 0x14200 pgdaemon pagedaemon 70288 447723 0 0 3 0x14200 bored viomb 50613 430709 0 0 3 0x40014200 acpi0 acpi0 40638 257884 0 0 7 0x40014200 idle1 1902 365938 0 0 3 0x14200 bored softnet 82161 416897 0 0 3 0x14200 bored systqmp 89462 58449 0 0 3 0x14200 bored systq 83694 126872 0 0 3 0x40014200 bored softclock 20160 499616 0 0 3 0x40014200 idle0 1 174333 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 11867 (syz-executor.0) thread 0xffff8000260887f0 (317970) exclusive rwlock pf_lock r = 0 (0xffffffff829005c0) #0 witness_lock+0x44d #1 pfioctl+0x5b38 sys/net/pf_ioctl.c:1601 #2 VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 #3 vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 #4 sys_ioctl+0x4a2 #5 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #5 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #6 Xsyscall+0x128 exclusive rwlock netlock r = 0 (0xffffffff82998ac0) #0 witness_lock+0x44d #1 pfioctl+0x3690 sys/net/pf_ioctl.c:1601 #2 VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 #3 vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 #4 sys_ioctl+0x4a2 #5 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #5 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82a6e588) #0 witness_lock+0x44d #1 vn_ioctl+0x41 sys/kern/vfs_vnops.c:514 #2 sys_ioctl+0x4a2 #3 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #3 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #4 Xsyscall+0x128 Process 35646 (syz-executor.1) thread 0xffff8000260c3a48 (80046) exclusive rrwlock inode r = 0 (0xfffffd80688d0f78) #0 witness_lock+0x44d #1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x8b sys/kern/kern_rwlock.c:461 #3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:534 #4 ufs_ihashins+0x42 sys/ufs/ufs/ufs_ihash.c:140 #5 ffs_vget+0x141 sys/ufs/ffs/ffs_vfsops.c:1347 #6 ffs_inode_alloc+0x1be sys/ufs/ffs/ffs_alloc.c:394 #7 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1162 #8 VOP_MKDIR+0xbf sys/kern/vfs_vops.c:404 #9 domkdirat+0x121 sys/kern/vfs_syscalls.c:3101 #10 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #10 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd807453a3c8) #0 witness_lock+0x44d #1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x8b sys/kern/kern_rwlock.c:461 #3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:534 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:579 #5 vfs_lookup+0xd1 sys/kern/vfs_lookup.c:413 #6 namei+0x36a sys/kern/vfs_lookup.c:245 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:3086 #8 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #8 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10249 6718K 7168K 78643K 47105 0 pcb 13 22K 27K 78643K 7499 0 rtable 269 25K 26K 78643K 5033 0 ifaddr 106 29K 32K 78643K 2543 0 sysctl 3 1K 1K 78643K 5 0 counters 54 35K 35K 78643K 574 0 ioctlops 1 4K 4K 78643K 5741 0 iov 0 0K 24K 78643K 2091 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1522 95K 96K 78643K 13864 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 187 0 VM map 2 1K 1K 78643K 2 0 sem 11 3K 5K 78643K 17 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 14 49K 93K 78643K 21700 0 sigio 0 0K 0K 78643K 1077 0 proc 75 87K 124K 78643K 3484 0 subproc 104 6K 10K 78643K 1184 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 789 0 in_multi 74 5K 6K 78643K 1544 0 ether_multi 1 0K 0K 78643K 208 0 mrt 1 0K 0K 78643K 69 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 247 1102K 1102K 78643K 247 0 exec 0 0K 3K 78643K 6016 0 pfkey data 0 0K 0K 78643K 8 0 tdb 3 0K 0K 78643K 3 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 666 1648K 1649K 78643K 264099 0 UVM aobj 8 6K 6K 78643K 8 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1337 0 NDP 13 0K 2K 78643K 475 0 temp 154 4747K 8825K 78643K 248355 0 kqueue 12 18K 26K 78643K 1150 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 1687 0 1684 29 28 1 3 0 8 0 rtentry 112 1181 0 1097 4 1 3 4 0 8 0 unpcb 136 14064 0 14049 142 136 6 10 0 8 5 syncache 296 61 0 61 17 17 0 1 0 8 0 tcpqe 32 189 0 189 9 9 0 1 0 8 0 tcpcb 736 7885 0 7880 259 252 7 25 0 8 6 arp 120 193 0 179 1 0 1 1 0 8 0 inpcb 304 33329 0 33319 287 277 10 19 0 8 8 rttmr 72 27 0 27 9 9 0 1 0 8 0 nd6 48 295 0 274 1 0 1 1 0 8 0 pkpcb 40 27 0 27 7 7 0 1 0 8 0 kcovpl 48 83 0 75 1 0 1 1 0 8 0 ppxss 1248 78 0 78 18 18 0 1 0 8 0 pfstscr 40 165 0 165 13 13 0 1 0 8 0 pffrag 232 70 0 66 11 10 1 1 0 482 0 pffrnode 88 70 0 66 11 10 1 1 0 8 0 pffrent 40 359 0 355 12 11 1 1 0 8 0 pfosfp 40 1516 0 1516 6 6 0 5 0 8 0 pfosfpen 112 1516 0 1516 24 24 0 21 0 8 0 pfrktable 1344 698 0 664 9 6 3 3 0 8 0 pftag 88 119 0 101 1 0 1 1 0 8 0 pfqueue 264 20 0 20 6 6 0 1 0 8 0 pfstitem 24 50 0 48 1 0 1 1 0 8 0 pfstkey 112 330 0 328 1 0 1 1 0 8 0 pfstate 320 181 0 179 3 2 1 2 0 8 0 pfrule 1360 1292 0 1115 20 4 16 16 0 8 0 art_heap8 4096 2 0 1 2 1 1 2 0 8 0 art_heap4 256 6100 0 5733 75 48 27 29 0 8 0 art_table 32 6102 0 5734 6 2 4 4 0 8 0 art_node 16 1166 0 1094 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 5 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 30801 0 29325 93 0 93 93 0 8 0 ffsino 272 30801 0 29325 99 0 99 99 0 8 0 nchpl 144 58044 0 56412 62 0 62 62 0 8 0 uvmvnodes 80 6450 0 0 132 0 132 132 0 8 0 vnodes 224 6450 0 0 380 0 380 380 0 8 0 namei 1024 208736 0 208735 6 5 1 2 0 8 0 percpumem 16 299 0 260 1 0 1 1 0 8 0 vcpupl 2048 222 0 0 28 0 28 28 0 8 0 vmpool 560 342 0 120 17 1 16 16 0 8 0 pfiaddrpl 120 264 0 166 3 0 3 3 0 8 0 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 163016 0 163016 25 24 1 8 0 8 1 plimitpl 152 2655 0 2640 1 0 1 1 0 8 0 sigapl 424 21882 0 21816 8 0 8 8 0 8 0 futexpl 64 236095 0 236093 4 3 1 1 0 8 0 knotepl 120 1070 0 0 8 1 7 8 0 8 0 kqueuepl 216 5397 0 5389 99 97 2 6 0 8 1 pipepl 336 4579 0 4551 130 126 4 11 0 8 1 fdescpl 496 21845 0 21818 5 1 4 5 0 8 0 filepl 152 156751 0 156505 270 254 16 22 0 8 6 lockfpl 104 7131 0 7129 17 16 1 2 0 8 0 lockfspl 48 2333 0 2331 1 0 1 1 0 8 0 sessionpl 144 102 0 85 1 0 1 1 0 8 0 pgrppl 48 139 0 122 1 0 1 1 0 8 0 ucredpl 96 20200 0 20183 1 0 1 1 0 8 0 zombiepl 144 21819 0 21816 3 2 1 1 0 8 0 processpl 1064 21882 0 21816 5 0 5 5 0 8 0 procpl 672 54005 0 53927 29 20 9 9 0 8 1 srpgc 96 116 0 116 30 29 1 1 0 8 1 sosppl 168 112 0 112 18 18 0 1 0 8 0 sockpl 480 49158 0 49130 843 831 12 42 0 8 8 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 9 0 0 2 0 2 2 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 535 0 0 41 3 38 38 0 8 0 mtagpl 96 1086 0 0 16 0 16 16 0 8 0 mbufpl 256 1871 0 0 82 0 82 82 0 8 0 bufpl 288 33993 0 27543 462 0 462 462 0 8 0 anonpl 24 5491464 0 5469557 586 425 161 239 0 186 2 amapchunkpl 152 603711 0 602766 207 159 48 69 0 158 7 amappl16 200 63447 0 62554 303 243 60 72 0 8 6 amappl15 192 5494 0 5489 1 0 1 1 0 8 0 amappl14 184 3012 0 3000 1 0 1 1 0 8 0 amappl13 176 4620 0 4615 1 0 1 1 0 8 0 amappl12 168 1990 0 1984 2 1 1 1 0 8 0 amappl11 160 3356 0 3342 1 0 1 1 0 8 0 amappl10 152 2144 0 2134 1 0 1 1 0 8 0 amappl9 144 2008 0 2003 1 0 1 1 0 8 0 amappl8 136 4655 0 4487 6 0 6 6 0 8 0 amappl7 128 2469 0 2454 1 0 1 1 0 8 0 amappl6 120 2019 0 1981 6 4 2 2 0 8 0 amappl5 112 16120 0 16100 1 0 1 1 0 8 0 amappl4 104 10159 0 10126 3 1 2 2 0 8 0 amappl3 96 5144 0 5128 1 0 1 1 0 8 0 amappl2 88 8391 0 8322 3 1 2 3 0 8 0 amappl1 80 383829 0 383270 25 11 14 19 0 8 0 amappl 88 261866 0 261503 11 1 10 10 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 72 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 22187 0 21937 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 22187 0 21937 2 0 2 2 0 8 0 vmmpekpl 168 145603 0 145515 5 0 5 5 0 8 0 vmmpepl 168 1985875 0 1982583 505 333 172 193 0 357 10 vmsppl 368 22186 0 21937 24 1 23 23 0 8 0 rwobjpl 56 466824 0 458254 175 50 125 125 0 8 3 pdppl 4096 44381 0 44096 1200 909 291 291 0 8 6 pvpl 32 9539162 0 9516868 889 665 224 354 0 265 6 pmappl 248 22186 0 21937 17 1 16 16 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 2534 0 1351 34 0 34 34 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace pf_anchor_global_RB_REMOVE(ffffffff82b83bd8,ffff800000c4d000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000c4d490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfioctl(4900,cd60441a,ffff800000c00000,3,ffff8000260887f0) at pfioctl+0x8f7c sys/net/pf_ioctl.c:1713 VOP_IOCTL(fffffd806f88c8e8,cd60441a,ffff800000c00000,3,fffffd807f7d86c0,ffff8000260887f0) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8065d30990,cd60441a,ffff800000c00000,ffff8000260887f0) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000260887f0,ffff800026080cc8,ffff800026080d20) at sys_ioctl+0x4a2 syscall(ffff800026080d90) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800026080d90) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb770af25120, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff800020ce8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020ce8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -5