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(ffffffff82a407c0,ffff800000c56000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000c56490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000e04828,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff8000ffff2008) at pfioctl+0x8e11 pf_addr_setup sys/net/pf_ioctl.c:893 [inline] pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff8000ffff2008) at pfioctl+0x8e11 sys/net/pf_ioctl.c:1652 VOP_IOCTL(fffffd806f7b0c68,cd60441a,ffff800000bf5000,3,fffffd807f7d8420,ffff8000ffff2008) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd800877fc98,cd60441a,ffff800000bf5000,ffff8000ffff2008) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000ffff2008,ffff800024668c98,ffff800024668cf0) at sys_ioctl+0x4a2 syscall(ffff800024668d60) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800024668d60) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf82cb1fefb0, count: -9 ddb{0}> show registers rdi 0xffffffff82a407c0 pf_anchors rsi 0xffff800000c56000 rbp 0xffff800024668770 rbx 0xffffffff82a407c0 pf_anchors rdx 0 rcx 0xfffffd800370fb00 rax 0xffff8000ffff2008 r8 0x400 r9 0x8080808080808080 r10 0x8e90913b8ca2a9ff r11 0x945740bfe0066d1e r12 0x9516adc5472196c4 r13 0xffffffff82a407c8 pf_main_anchor r14 0xffff800000c56000 r15 0xdead007fdead4110 rip 0xffffffff812c6648 pf_anchor_global_RB_REMOVE+0x58 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff800024668720 ss 0x10 pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{0}> show proc PROC (syz-executor.1) pid=270701 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3a48,0xffff80002122b7b0 process=0xffff800022a9f200 user=0xffff800024663000, vmspace=0xfffffd8077bd48c0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 42461 173662 10168 0 3 0x80 nanoslp syz-executor.4 42461 61829 10168 0 3 0x4000080 fsleep syz-executor.4 44304 285077 48090 0 2 0 syz-executor.1 *44304 270701 48090 0 7 0x4000000 syz-executor.1 2247 452633 38292 0 2 0x480 syz-executor.0 2247 439178 38292 0 3 0x4000080 fsleep syz-executor.0 95368 60736 79411 0 2 0x482 syz-executor.7 78310 209908 79411 0 2 0x482 syz-executor.3 89116 390587 79411 0 2 0x2 syz-executor.5 48090 224493 79411 0 2 0x482 syz-executor.1 35370 112761 79411 0 2 0x482 syz-executor.2 50305 131497 79411 0 3 0x82 nanoslp syz-executor.6 10168 333229 79411 0 3 0x82 nanoslp syz-executor.4 38292 58053 79411 0 2 0x482 syz-executor.0 30315 138706 0 0 3 0x14200 acct acct 87179 413849 0 0 3 0x14200 bored sosplice 79411 100515 66817 0 3 0x82 nanoslp syz-fuzzer 79411 269432 66817 0 3 0x4000082 nanoslp syz-fuzzer 79411 65639 66817 0 3 0x4000082 thrsleep syz-fuzzer 79411 326484 66817 0 3 0x4000082 thrsleep syz-fuzzer 79411 80970 66817 0 3 0x4000082 kqread syz-fuzzer 79411 197330 66817 0 3 0x4000082 thrsleep syz-fuzzer 79411 386400 66817 0 3 0x4000082 thrsleep syz-fuzzer 79411 349850 66817 0 3 0x4000082 thrsleep syz-fuzzer 79411 523613 66817 0 3 0x4000082 thrsleep syz-fuzzer 66817 242286 26558 0 3 0x10008a sigsusp ksh 26558 40899 19785 0 3 0x9a kqread sshd 21373 198370 1 0 3 0x100083 ttyin getty 19785 38099 1 0 3 0x88 kqread sshd 78812 61931 89795 74 3 0x1100092 bpf pflogd 89795 320732 1 0 3 0x80 netio pflogd 91524 184490 6936 73 3 0x1100090 kqread syslogd 6936 405982 1 0 3 0x100082 netio syslogd 22875 43832 1 0 3 0x100080 kqread resolvd 2982 79429 3763 77 3 0x100092 kqread dhcpleased 86876 367539 3763 77 3 0x100092 kqread dhcpleased 3763 50533 1 0 3 0x80 kqread dhcpleased 15774 33757 0 0 3 0x14200 bored smr 98582 249814 0 0 2 0x14200 zerothread 91025 28716 0 0 3 0x14200 aiodoned aiodoned 77339 460112 0 0 3 0x14200 syncer update 61131 115009 0 0 3 0x14200 cleaner cleaner 21202 245817 0 0 3 0x14200 reaper reaper 97395 348110 0 0 3 0x14200 pgdaemon pagedaemon 95600 360926 0 0 3 0x14200 bored viomb 25883 4913 0 0 3 0x40014200 acpi0 acpi0 42791 290809 0 0 7 0x40014200 idle1 21232 26203 0 0 3 0x14200 bored softnet 20184 420947 0 0 3 0x14200 bored systqmp 90916 71554 0 0 3 0x14200 bored systq 73458 47899 0 0 3 0x40014200 bored softclock 36022 178780 0 0 3 0x40014200 idle0 1 106051 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 44304 (syz-executor.1) thread 0xffff8000ffff2008 (270701) exclusive rwlock pf_lock r = 0 (0xffffffff82900440) #0 witness_lock+0x44d #1 pfioctl+0x5be8 sys/net/pf_ioctl.c:1607 #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 (0xffffffff8299e650) #0 witness_lock+0x44d #1 pfioctl+0x3708 sys/net/pf_ioctl.c:1607 #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 pfioctl_rw r = 0 (0xffffffff829004a0) #0 witness_lock+0x44d #1 pfioctl+0x15e sys/net/pf_ioctl.c:1147 #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 (0xffffffff82b8b778) #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 89116 (syz-executor.5) thread 0xffff8000ffff2fc8 (390587) exclusive rrwlock inode r = 0 (0xfffffd806ecd5e78) #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 (0xfffffd8076defe78) #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 10216 6527K 14890K 78643K 34589 0 pcb 13 18K 22K 78643K 7574 0 rtable 227 16K 18K 78643K 3212 0 ifaddr 90 22K 22K 78643K 1578 0 sysctl 3 1K 1K 78643K 5 0 counters 56 35K 35K 78643K 288 0 ioctlops 1 4K 4K 78643K 3676 0 iov 0 0K 28K 78643K 1373 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1407 88K 88K 78643K 8621 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 137 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 1919 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 13 45K 93K 78643K 9787 0 sigio 0 0K 0K 78643K 110 0 proc 70 87K 124K 78643K 2308 0 subproc 104 6K 6K 78643K 706 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 357 0 in_multi 91 6K 6K 78643K 836 0 ether_multi 1 0K 0K 78643K 57 0 mrt 1 0K 0K 78643K 27 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 235 1049K 1049K 78643K 235 0 exec 0 0K 2K 78643K 2764 0 pfkey data 0 0K 0K 78643K 7 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 531 875K 890K 78643K 122944 0 UVM aobj 131 8K 8K 78643K 137 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 1 0K 0K 78643K 1154 0 NDP 12 0K 2K 78643K 249 0 temp 150 4751K 4975K 78643K 162303 0 kqueue 12 18K 26K 78643K 587 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 812 0 809 12 11 1 5 0 8 0 rtentry 112 754 0 656 4 1 3 4 0 8 0 unpcb 136 7513 0 7498 94 92 2 9 0 8 1 syncache 296 48 0 48 11 11 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 6 0 6 3 3 0 1 0 8 0 tcpcb 736 3760 0 3746 94 84 10 14 0 8 8 arp 120 122 0 104 1 0 1 1 0 8 0 inpcb 312 16330 0 16318 135 128 7 17 0 8 5 rttmr 72 44 0 44 3 3 0 1 0 8 0 nd6 48 183 0 163 1 0 1 1 0 8 0 pkpcb 40 11 0 11 2 2 0 1 0 8 0 kcovpl 48 54 0 46 1 0 1 1 0 8 0 ppxss 1248 38 0 38 9 9 0 1 0 8 0 pfstscr 40 6 0 6 2 2 0 1 0 8 0 pffrag 232 23 0 21 5 4 1 1 0 482 0 pffrnode 88 21 0 19 5 4 1 1 0 8 0 pffrent 40 457 0 455 5 4 1 1 0 8 0 pfosfp 40 1433 0 1009 5 0 5 5 0 8 0 pfosfpen 112 1433 0 714 21 0 21 21 0 8 0 pfrktable 1344 426 35 423 8 7 1 2 0 8 0 pftag 88 2 0 1 1 0 1 1 0 8 0 pfqueue 264 3 0 3 1 1 0 1 0 8 0 pfstitem 24 44 0 42 1 0 1 1 0 8 0 pfstkey 112 52 0 50 2 1 1 2 0 8 0 pfstate 320 48 0 46 4 3 1 4 0 8 0 pfsrctr 152 44 0 44 3 3 0 1 0 8 0 pfrule 1360 627 0 582 11 7 4 4 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3057 0 2639 41 14 27 30 0 8 0 art_table 32 3058 0 2639 4 0 4 4 0 8 0 art_node 16 729 0 643 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 1917 0 1907 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 13724 0 12253 93 0 93 93 0 8 0 ffsino 272 13724 0 12253 99 0 99 99 0 8 0 nchpl 144 26220 0 24596 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 95464 0 95463 5 4 1 2 0 8 0 percpumem 16 156 0 116 1 0 1 1 0 8 0 vcpupl 2048 158 0 0 20 0 20 20 0 8 0 vmpool 560 221 0 63 12 0 12 12 0 8 0 pfiaddrpl 120 133 0 132 7 6 1 1 0 8 0 scsiplug 72 8 0 8 2 2 0 1 0 8 0 scxspl 216 73225 0 73225 23 22 1 8 0 8 1 plimitpl 152 997 0 982 1 0 1 1 0 8 0 sigapl 424 10016 0 9970 8 1 7 8 0 8 0 futexpl 64 93571 0 93569 1 0 1 1 0 8 0 knotepl 120 609 0 0 11 0 11 11 0 8 0 kqueuepl 216 3170 0 3162 60 57 3 6 0 8 2 pipepl 336 2197 0 2169 48 45 3 10 0 8 0 fdescpl 496 9980 0 9954 5 1 4 5 0 8 0 filepl 152 73048 0 72804 125 110 15 24 0 8 5 lockfpl 104 3415 0 3413 12 11 1 3 0 8 0 lockfspl 48 827 0 825 1 0 1 1 0 8 0 sessionpl 144 70 0 53 1 0 1 1 0 8 0 pgrppl 48 949 0 932 1 0 1 1 0 8 0 ucredpl 96 6945 0 6931 1 0 1 1 0 8 0 zombiepl 144 9974 0 9970 3 2 1 1 0 8 0 processpl 1064 10016 0 9970 5 0 5 5 0 8 0 procpl 672 27346 0 27289 25 19 6 8 0 8 0 srpgc 96 76 0 76 12 12 0 1 0 8 0 sosppl 168 25 0 25 5 4 1 1 0 8 1 sockpl 480 24768 0 24738 469 456 13 34 0 8 8 mcl64k 65536 28 0 0 3 0 3 3 0 8 0 mcl16k 16384 15 0 0 2 0 2 2 0 8 0 mcl12k 12288 24 0 0 2 0 2 2 0 8 0 mcl9k 9216 11 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 230 0 0 18 3 15 18 0 8 0 mtagpl 96 894 0 0 18 0 18 18 0 8 0 mbufpl 256 1104 0 0 59 1 58 58 0 8 0 bufpl 288 18150 0 11814 453 0 453 453 0 8 0 anonpl 24 2745238 0 2727231 222 83 139 148 0 186 0 amapchunkpl 152 298061 0 297169 97 55 42 51 0 158 3 amappl16 200 24111 0 23481 118 82 36 46 0 8 0 amappl15 192 1753 0 1746 1 0 1 1 0 8 0 amappl14 184 1182 0 1171 1 0 1 1 0 8 0 amappl13 176 1795 0 1794 1 0 1 1 0 8 0 amappl12 168 473 0 468 1 0 1 1 0 8 0 amappl11 160 2452 0 2436 3 2 1 2 0 8 0 amappl10 152 981 0 970 1 0 1 1 0 8 0 amappl9 144 1748 0 1741 1 0 1 1 0 8 0 amappl8 136 2269 0 2147 5 0 5 5 0 8 0 amappl7 128 891 0 879 1 0 1 1 0 8 0 amappl6 120 1600 0 1578 2 1 1 2 0 8 0 amappl5 112 7940 0 7924 1 0 1 1 0 8 0 amappl4 104 6356 0 6322 2 0 2 2 0 8 0 amappl3 96 1850 0 1834 1 0 1 1 0 8 0 amappl2 88 2988 0 2941 3 1 2 3 0 8 0 amappl1 80 184341 0 183803 19 5 14 19 0 8 0 amappl 88 121420 0 121118 10 1 9 9 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 136 0 6 3 0 3 3 0 8 0 uaddrrnd 24 10201 0 10017 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 10201 0 10017 2 0 2 2 0 8 0 vmmpekpl 168 75885 0 75810 4 0 4 4 0 8 0 vmmpepl 168 920995 0 918334 317 173 144 173 0 357 2 vmsppl 368 10200 0 10017 19 1 18 18 0 8 0 rwobjpl 56 222944 0 215167 121 8 113 114 0 8 0 pdppl 4096 20409 0 20192 654 427 227 229 0 8 10 pvpl 32 4652119 0 4631549 421 215 206 247 0 265 0 pmappl 248 10200 0 10017 13 1 12 12 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1767 0 716 31 0 31 31 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace pf_anchor_global_RB_REMOVE(ffffffff82a407c0,ffff800000c56000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000c56490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000e04828,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff8000ffff2008) at pfioctl+0x8e11 pf_addr_setup sys/net/pf_ioctl.c:893 [inline] pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff8000ffff2008) at pfioctl+0x8e11 sys/net/pf_ioctl.c:1652 VOP_IOCTL(fffffd806f7b0c68,cd60441a,ffff800000bf5000,3,fffffd807f7d8420,ffff8000ffff2008) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd800877fc98,cd60441a,ffff800000bf5000,ffff8000ffff2008) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000ffff2008,ffff800024668c98,ffff800024668cf0) at sys_ioctl+0x4a2 syscall(ffff800024668d60) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800024668d60) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf82cb1fefb0, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp