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(ffffffff829ddc20,ffff800000c62800) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000c62c90) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000cb6808,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000ba1000,3,ffff80002e35e2a0) at pfioctl+0x8d37 pf_addr_setup sys/net/pf_ioctl.c:894 [inline] pfioctl(4900,cd60441a,ffff800000ba1000,3,ffff80002e35e2a0) at pfioctl+0x8d37 sys/net/pf_ioctl.c:1653 VOP_IOCTL(fffffd806f689c68,cd60441a,ffff800000ba1000,3,fffffd807f7d76c0,ffff80002e35e2a0) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd807e647d30,cd60441a,ffff800000ba1000,ffff80002e35e2a0) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff80002e35e2a0,ffff80002468d648,ffff80002468d6a0) at sys_ioctl+0x4a2 syscall(ffff80002468d710) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002468d710) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2dc11ed7710, count: -9 ddb{0}> show registers rdi 0xffff800021827000 rsi 0x1b45 __ALIGN_SIZE+0xb45 rbp 0xffff80002468d120 rbx 0xffffffff829ddc20 pf_anchors rdx 0xffff800021827000 rcx 0x1b44 __ALIGN_SIZE+0xb44 rax 0xffffffff810e747b pf_anchor_global_RB_REMOVE+0x2b r8 0x400 r9 0x8080808080808080 r10 0xd606e335e73ce7a8 r11 0x66cb194c0e3fd9a4 r12 0xe4f5a5ca4a2026f8 r13 0xffffffff829ddc28 pf_main_anchor r14 0xffff800000c62800 r15 0xdead007fdead4110 rip 0xffffffff810e74a8 pf_anchor_global_RB_REMOVE+0x58 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff80002468d0d0 ss 0x10 pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{0}> show proc PROC (syz-executor.0) pid=127708 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff80002e35f500,0xffff80002e35e550 process=0xffff8000ffff10b8 user=0xffff800024688000, vmspace=0xfffffd805d034b80 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 30481 511398 75431 0 2 0 syz-executor.6 30481 427926 75431 0 3 0x4000080 fsleep syz-executor.6 41762 121440 92982 0 2 0 syz-executor.7 45734 209958 11015 0 2 0 syz-executor.0 *45734 127708 11015 0 7 0x4000000 syz-executor.0 4713 118102 24196 0 2 0 syz-executor.2 4713 306109 24196 0 3 0x4000080 ttyretype syz-executor.2 7414 499417 4164 0 2 0 syz-executor.1 7414 34078 4164 0 3 0x4000080 fsleep syz-executor.1 571 314011 25 0 2 0 syz-executor.4 571 507158 25 0 3 0x4000080 fsleep syz-executor.4 74208 29370 1145 0 2 0 syz-executor.3 74208 370896 1145 0 3 0x4000080 fsleep syz-executor.3 21858 145824 60922 0 2 0 syz-executor.5 21858 96139 60922 0 3 0x4000080 fsleep syz-executor.5 1145 54803 20781 0 3 0x82 nanoslp syz-executor.3 11015 207196 20781 0 3 0x82 nanoslp syz-executor.0 25 485198 20781 0 3 0x82 nanoslp syz-executor.4 24196 189776 20781 0 3 0x82 nanoslp syz-executor.2 4886 52758 0 0 3 0x14280 nfsidl nfsio 50653 36989 0 0 3 0x14280 nfsidl nfsio 57237 198986 0 0 3 0x14280 nfsidl nfsio 45084 467801 0 0 3 0x14280 nfsidl nfsio 1430 292410 0 0 3 0x14280 nfsidl nfsio 33488 426444 0 0 3 0x14280 nfsidl nfsio 88226 181120 0 0 3 0x14280 nfsidl nfsio 83977 511900 0 0 3 0x14280 nfsidl nfsio 48412 13493 0 0 3 0x14280 nfsidl nfsio 9357 15782 0 0 3 0x14280 nfsidl nfsio 64207 64092 0 0 3 0x14280 nfsidl nfsio 55530 12522 0 0 3 0x14280 nfsidl nfsio 74806 153865 0 0 3 0x14280 nfsidl nfsio 60771 220906 0 0 3 0x14280 nfsidl nfsio 70778 391939 0 0 3 0x14280 nfsidl nfsio 95837 92523 0 0 3 0x14280 nfsidl nfsio 39356 86475 0 0 3 0x14280 nfsidl nfsio 45869 127062 0 0 3 0x14280 nfsidl nfsio 71555 100719 0 0 3 0x14280 nfsidl nfsio 65474 335339 0 0 3 0x14280 nfsidl nfsio 12291 459282 0 0 3 0x14200 bored sosplice 75431 60293 20781 0 3 0x82 nanoslp syz-executor.6 92982 270196 20781 0 3 0x82 nanoslp syz-executor.7 60922 75070 20781 0 3 0x82 nanoslp syz-executor.5 4164 232899 20781 0 3 0x82 nanoslp syz-executor.1 20781 55396 77035 0 3 0x82 thrsleep syz-fuzzer 20781 17115 77035 0 3 0x4000082 thrsleep syz-fuzzer 20781 411163 77035 0 3 0x4000082 thrsleep syz-fuzzer 20781 186373 77035 0 3 0x4000082 thrsleep syz-fuzzer 20781 148007 77035 0 3 0x4000082 thrsleep syz-fuzzer 20781 248191 77035 0 3 0x4000082 kqread syz-fuzzer 20781 241870 77035 0 3 0x4000082 thrsleep syz-fuzzer 20781 402773 77035 0 3 0x4000082 thrsleep syz-fuzzer 77035 199847 10516 0 3 0x10008a sigsusp ksh 10516 328282 93188 0 3 0x9a kqread sshd 91784 182292 1 0 3 0x100083 ttyin getty 93188 111930 1 0 3 0x88 kqread sshd 55450 254988 98534 74 3 0x1100092 bpf pflogd 98534 432646 1 0 3 0x80 netio pflogd 68914 298439 31467 73 3 0x1100090 kqread syslogd 31467 509974 1 0 3 0x100082 netio syslogd 20882 39693 1 0 3 0x100080 kqread resolvd 10072 281238 48728 77 3 0x100092 kqread dhcpleased 71008 519942 48728 77 3 0x100092 kqread dhcpleased 48728 321507 1 0 3 0x80 kqread dhcpleased 71425 481166 0 0 3 0x14200 bored smr 29335 499335 0 0 2 0x14200 zerothread 79266 290075 0 0 3 0x14200 aiodoned aiodoned 92965 270613 0 0 3 0x14200 syncer update 48496 385940 0 0 3 0x14200 cleaner cleaner 29436 186955 0 0 3 0x14200 reaper reaper 99657 372650 0 0 3 0x14200 pgdaemon pagedaemon 14199 207517 0 0 3 0x14200 bored viomb 74935 487439 0 0 3 0x40014200 acpi0 acpi0 8347 218066 0 0 7 0x40014200 idle1 38598 256780 0 0 3 0x14200 bored softnet 53295 446046 0 0 3 0x14200 bored systqmp 21303 123878 0 0 3 0x14200 bored systq 41449 43232 0 0 3 0x40014200 bored softclock 47526 22985 0 0 3 0x40014200 idle0 1 402735 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 45734 (syz-executor.0) thread 0xffff80002e35e2a0 (127708) exclusive rwlock pf_lock r = 0 (0xffffffff82905630) #0 witness_lock+0x44d #1 pfioctl+0x5dc5 sys/net/pf_ioctl.c:1608 #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 (0xffffffff8290b840) #0 witness_lock+0x44d #1 pfioctl+0x38c8 sys/net/pf_ioctl.c:1608 #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 (0xffffffff82905690) #0 witness_lock+0x44d #1 pfioctl+0x15e sys/net/pf_ioctl.c:1148 #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 (0xffffffff829e1720) #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 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10196 6552K 6991K 78643K 15814 0 pcb 13 14K 16K 78643K 597 0 rtable 192 7K 8K 78643K 2976 0 ifaddr 79 17K 18K 78643K 256 0 sysctl 2 0K 0K 78643K 2 0 counters 52 35K 36K 78643K 98 0 ioctlops 1 4K 4K 78643K 2202 0 iov 0 0K 32K 78643K 179 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1332 83K 84K 78643K 2724 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 26 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 513 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 18 65K 73K 78643K 3123 0 sigio 0 0K 0K 78643K 218 0 proc 72 91K 128K 78643K 820 0 subproc 104 6K 6K 78643K 169 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 100 0 in_multi 78 5K 6K 78643K 265 0 ether_multi 1 0K 0K 78643K 27 0 mrt 3 0K 0K 78643K 18 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 169 758K 758K 78643K 169 0 exec 0 0K 2K 78643K 915 0 pfkey data 0 0K 0K 78643K 3 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 325 353K 357K 78643K 18775 0 UVM aobj 103 3K 3K 78643K 133 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 118 0 NDP 10 0K 1K 78643K 69 0 temp 133 4754K 4826K 78643K 40750 0 kqueue 12 18K 24K 78643K 182 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 2854 0 2851 19 18 1 6 0 8 0 rtentry 112 218 0 133 4 0 4 4 0 8 0 unpcb 136 4065 0 4050 29 28 1 7 0 8 0 syncache 296 10 0 10 3 3 0 1 0 8 0 tcpqe 32 83 0 83 2 2 0 1 0 8 0 tcpcb 736 622 0 615 22 20 2 10 0 8 1 arp 120 32 0 18 1 0 1 1 0 8 0 inpcb 312 3364 0 3357 40 38 2 9 0 8 1 nd6 48 50 0 31 1 0 1 1 0 8 0 pkpcb 40 154 0 154 5 5 0 1 0 8 0 kcovpl 48 13 0 5 1 0 1 1 0 8 0 ppxss 1248 9 0 9 1 1 0 1 0 8 0 pfstscr 40 17 0 16 4 3 1 1 0 8 0 pffrag 232 7 0 6 1 0 1 1 0 482 0 pffrnode 88 7 0 6 1 0 1 1 0 8 0 pffrent 40 15 0 14 1 0 1 1 0 8 0 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 16 9 13 1 0 1 1 0 8 0 pftag 88 3 0 0 1 0 1 1 0 8 0 pfstitem 24 69 0 61 1 0 1 1 0 8 0 pfstkey 112 230 0 222 1 0 1 1 0 8 0 pfstate 336 148 0 141 3 1 2 3 0 8 0 pfrule 1360 173 0 160 4 2 2 2 0 8 0 rttmrq 48 18 0 14 1 0 1 1 0 8 0 rttmr 72 6 0 6 2 2 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 825 0 463 32 3 29 29 0 8 5 art_table 32 826 0 463 4 0 4 4 0 8 0 art_node 16 217 0 144 1 0 1 1 0 8 0 sysvmsgpl 40 48 0 25 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 511 0 501 1 0 1 1 0 8 0 shmpl 112 130 0 30 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 5338 0 3900 91 0 91 91 0 8 0 ffsino 272 5338 0 3900 97 0 97 97 0 8 0 nchpl 144 9600 0 7954 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 32877 0 32877 3 2 1 2 0 8 1 percpumem 16 61 0 23 1 0 1 1 0 8 0 vcpupl 2048 51 0 0 7 0 7 7 0 8 0 vmpool 560 86 0 35 5 1 4 4 0 8 0 pfiaddrpl 120 5 0 4 2 1 1 1 0 8 0 kstatmem 264 66 0 46 2 0 2 2 0 8 0 scsiplug 72 5 0 5 2 2 0 1 0 8 0 scxspl 216 27581 0 27581 13 12 1 8 0 8 1 plimitpl 152 334 0 318 1 0 1 1 0 8 0 sigapl 424 3439 0 3373 8 0 8 8 0 8 0 futexpl 64 32844 0 32839 1 0 1 1 0 8 0 knotepl 120 297 0 0 7 0 7 7 0 8 0 kqueuepl 216 539 0 531 5 2 3 3 0 8 2 pipepl 336 978 0 950 28 25 3 13 0 8 0 fdescpl 496 3403 0 3372 5 0 5 5 0 8 0 filepl 152 25470 0 25227 58 47 11 28 0 8 1 lockfpl 104 827 0 825 3 2 1 2 0 8 0 lockfspl 48 242 0 240 1 0 1 1 0 8 0 sessionpl 144 29 0 12 1 0 1 1 0 8 0 pgrppl 48 31 0 14 1 0 1 1 0 8 0 ucredpl 96 2435 0 2423 1 0 1 1 0 8 0 zombiepl 144 3373 0 3373 2 1 1 1 0 8 1 processpl 1064 3439 0 3373 5 0 5 5 0 8 0 procpl 672 8217 0 8137 13 5 8 8 0 8 0 srpgc 96 10 0 10 4 3 1 1 0 8 1 sosppl 168 18 0 18 5 5 0 1 0 8 0 sockpl 480 10444 0 10419 264 257 7 30 0 8 3 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 162 0 0 19 0 19 19 0 8 0 mtagpl 96 478 0 0 12 0 12 12 0 8 0 mbufpl 256 11345 0 0 708 0 708 708 0 8 0 bufpl 288 8184 0 1856 453 0 453 453 0 8 0 anonpl 24 623256 0 606468 166 33 133 139 0 186 14 amapchunkpl 152 52654 0 51945 37 7 30 31 0 158 0 amappl16 200 8449 0 7817 60 21 39 46 0 8 5 amappl15 192 469 0 465 1 0 1 1 0 8 0 amappl14 184 298 0 295 1 0 1 1 0 8 0 amappl13 176 112 0 111 1 0 1 1 0 8 0 amappl12 168 15 0 12 1 0 1 1 0 8 0 amappl11 160 981 0 955 2 0 2 2 0 8 0 amappl10 152 779 0 769 1 0 1 1 0 8 0 amappl9 144 1100 0 1092 1 0 1 1 0 8 0 amappl8 136 720 0 649 3 0 3 3 0 8 0 amappl7 128 154 0 139 1 0 1 1 0 8 0 amappl6 120 856 0 835 2 1 1 2 0 8 0 amappl5 112 3430 0 3407 1 0 1 1 0 8 0 amappl4 104 2417 0 2384 2 0 2 2 0 8 0 amappl3 96 9192 0 9138 2 0 2 2 0 8 0 amappl2 88 3812 0 3750 3 1 2 3 0 8 0 amappl1 80 82350 0 81652 20 5 15 20 0 8 0 amappl 88 18139 0 17935 5 0 5 5 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 132 0 30 2 0 2 2 0 8 0 uaddrrnd 24 3489 0 3407 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3489 0 3407 1 0 1 1 0 8 0 vmmpekpl 168 28205 0 28138 4 0 4 4 0 8 0 vmmpepl 168 328779 0 325807 192 41 151 155 0 357 21 vmsppl 368 3488 0 3407 8 0 8 8 0 8 0 rwobjpl 56 85621 0 77877 113 2 111 113 0 8 1 pdppl 4096 6985 0 6865 230 110 120 120 0 8 0 pvpl 32 1302232 0 1281017 296 83 213 244 0 265 23 pmappl 248 3488 0 3407 7 1 6 6 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1756 0 203 45 0 45 45 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace pf_anchor_global_RB_REMOVE(ffffffff829ddc20,ffff800000c62800) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000c62c90) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000cb6808,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000ba1000,3,ffff80002e35e2a0) at pfioctl+0x8d37 pf_addr_setup sys/net/pf_ioctl.c:894 [inline] pfioctl(4900,cd60441a,ffff800000ba1000,3,ffff80002e35e2a0) at pfioctl+0x8d37 sys/net/pf_ioctl.c:1653 VOP_IOCTL(fffffd806f689c68,cd60441a,ffff800000ba1000,3,fffffd807f7d76c0,ffff80002e35e2a0) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd807e647d30,cd60441a,ffff800000ba1000,ffff80002e35e2a0) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff80002e35e2a0,ffff80002468d648,ffff80002468d6a0) at sys_ioctl+0x4a2 syscall(ffff80002468d710) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002468d710) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2dc11ed7710, count: -9 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