kernel: protection fault trap, code=0 Stopped at pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic the kernel did not panic ddb{1}> trace pf_anchor_global_RB_REMOVE(ffffffff82a6bc58,ffff800000d60800) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000d60c90) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000ba6330,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000c00000,2,ffff8000ffff4000) at pfioctl+0x8f67 pf_addr_setup sys/net/pf_ioctl.c:894 [inline] pfioctl(4900,cd60441a,ffff800000c00000,2,ffff8000ffff4000) at pfioctl+0x8f67 sys/net/pf_ioctl.c:1659 VOP_IOCTL(fffffd806f6869c8,cd60441a,ffff800000c00000,2,fffffd807f7d7660,ffff8000ffff4000) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8067b53ee8,cd60441a,ffff800000c00000,ffff8000ffff4000) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000ffff4000,ffff80002e3bfab8,ffff80002e3bfb10) at sys_ioctl+0x4a2 syscall(ffff80002e3bfb80) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002e3bfb80) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23ab8c7fd40, count: -9 ddb{1}> show registers rdi 0xffff80002952d000 rsi 0x111a __ALIGN_SIZE+0x11a rbp 0xffff80002e3bf590 rbx 0xffffffff82a6bc58 pf_anchors rdx 0xffff80002952d000 rcx 0x1119 __ALIGN_SIZE+0x119 rax 0xffffffff81f0d85b pf_anchor_global_RB_REMOVE+0x2b r8 0x400 r9 0x8080808080808080 r10 0xb87f76bfc49b5552 r11 0x4f8980393241dd39 r12 0xcd21a0d31afa3575 r13 0xffffffff82a6bc60 pf_main_anchor r14 0xffff800000d60800 r15 0xdead007fdeadbeef rip 0xffffffff81f0d888 pf_anchor_global_RB_REMOVE+0x58 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff80002e3bf540 ss 0x10 pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{1}> show proc PROC (syz-executor.3) pid=521045 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff800022c6a550,0xffffffff829d5e80 process=0xffff800022c6edd0 user=0xffff80002e3ba000, vmspace=0xfffffd806efca178 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 81604 193632 42241 0 2 0 syz-executor.3 *81604 521045 42241 0 7 0x4000000 syz-executor.3 60850 331802 11042 0 3 0x82 piperd syz-executor.6 76684 437780 11042 0 3 0x82 piperd syz-executor.7 97558 522922 11042 0 2 0x2 syz-executor.2 32478 157206 1 0 3 0x100083 ttyin getty 72572 329549 11042 0 3 0x82 piperd syz-executor.0 32539 398950 11042 0 3 0x82 piperd syz-executor.1 8177 295559 0 0 3 0x14200 acct acct 21796 50291 11042 0 3 0x82 nanoslp syz-executor.4 42241 124378 11042 0 3 0x82 nanoslp syz-executor.3 64549 327337 11042 0 3 0x82 piperd syz-executor.5 15856 518140 0 0 3 0x14280 nfsidl nfsio 2663 473070 0 0 3 0x14280 nfsidl nfsio 79843 64686 0 0 3 0x14280 nfsidl nfsio 82019 405796 0 0 3 0x14280 nfsidl nfsio 1749 166672 0 0 3 0x14280 nfsidl nfsio 84323 292533 0 0 3 0x14280 nfsidl nfsio 84986 95023 0 0 3 0x14280 nfsidl nfsio 90019 224198 0 0 3 0x14280 nfsidl nfsio 70977 15913 0 0 3 0x14280 nfsidl nfsio 9275 369433 0 0 3 0x14280 nfsidl nfsio 9914 30875 0 0 3 0x14280 nfsidl nfsio 30930 246290 0 0 3 0x14280 nfsidl nfsio 4273 231672 0 0 3 0x14280 nfsidl nfsio 54653 432048 0 0 3 0x14280 nfsidl nfsio 76925 198403 0 0 3 0x14280 nfsidl nfsio 46088 54959 0 0 3 0x14280 nfsidl nfsio 91547 303178 0 0 3 0x14280 nfsidl nfsio 74040 257855 0 0 3 0x14280 nfsidl nfsio 46005 370165 0 0 3 0x14280 nfsidl nfsio 88443 349285 0 0 3 0x14280 nfsidl nfsio 569 30462 0 0 3 0x14200 bored sosplice 11042 345216 38968 0 3 0x82 thrsleep syz-fuzzer 11042 151398 38968 0 3 0x4000082 nanoslp syz-fuzzer 11042 56410 38968 0 3 0x4000082 thrsleep syz-fuzzer 11042 225311 38968 0 3 0x4000082 thrsleep syz-fuzzer 11042 425356 38968 0 7 0x4000002 syz-fuzzer 11042 365685 38968 0 3 0x4000082 nanoslp syz-fuzzer 11042 58086 38968 0 3 0x4000082 thrsleep syz-fuzzer 11042 445255 38968 0 3 0x4000082 thrsleep syz-fuzzer 11042 196182 38968 0 3 0x4000082 thrsleep syz-fuzzer 11042 15160 38968 0 3 0x4000082 thrsleep syz-fuzzer 38968 63210 78462 0 3 0x10008a sigsusp ksh 78462 427612 31857 0 2 0x9a sshd 31857 23108 1 0 3 0x88 kqread sshd 38030 99421 34940 74 3 0x1100092 bpf pflogd 34940 340502 1 0 3 0x80 netio pflogd 55599 93758 27493 73 3 0x1100090 kqread syslogd 27493 63906 1 0 3 0x100082 netio syslogd 68755 82169 1 0 3 0x100080 kqread resolvd 77675 339262 87564 77 3 0x100092 kqread dhcpleased 38762 85754 87564 77 3 0x100092 kqread dhcpleased 87564 516040 1 0 3 0x80 kqread dhcpleased 95606 278630 0 0 3 0x14200 bored smr 26834 487096 0 0 2 0x14200 zerothread 41880 410903 0 0 3 0x14200 aiodoned aiodoned 21642 224968 0 0 3 0x14200 syncer update 43668 11129 0 0 3 0x14200 cleaner cleaner 54806 31286 0 0 3 0x14200 reaper reaper 1134 379636 0 0 3 0x14200 pgdaemon pagedaemon 60719 49632 0 0 3 0x14200 bored viomb 97108 349908 0 0 3 0x40014200 acpi0 acpi0 88334 427970 0 0 3 0x40014200 idle1 54919 20933 0 0 3 0x14200 bored softnet 33881 379476 0 0 3 0x14200 bored systqmp 81262 359296 0 0 3 0x14200 bored systq 73544 403096 0 0 3 0x40014200 bored softclock 31040 155925 0 0 3 0x40014200 idle0 1 122323 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 81604 (syz-executor.3) thread 0xffff8000ffff4000 (521045) exclusive rwlock pf_lock r = 0 (0xffffffff82950f80) #0 witness_lock+0x44d #1 pfioctl+0x5e90 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 (0xffffffff829169f0) #0 witness_lock+0x44d #1 pfioctl+0x38f8 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 (0xffffffff82950fe0) #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 (0xffffffff829e6678) #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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10205 6507K 6975K 78643K 35551 0 pcb 13 22K 30K 78643K 1841 0 rtable 209 16K 18K 78643K 3558 0 ifaddr 94 22K 25K 78643K 1575 0 sysctl 2 0K 0K 78643K 2 0 counters 56 35K 36K 78643K 308 0 ioctlops 1 4K 6K 78643K 4767 0 iov 0 0K 16K 78643K 1497 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1543 96K 97K 78643K 9400 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 82 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 2002 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 11 37K 81K 78643K 13638 0 sigio 0 0K 0K 78643K 97 0 proc 75 91K 127K 78643K 1945 0 subproc 104 6K 7K 78643K 457 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 705 0 in_multi 87 5K 6K 78643K 614 0 ether_multi 1 0K 0K 78643K 82 0 mrt 1 0K 0K 78643K 63 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 163 731K 731K 78643K 163 0 exec 0 0K 2K 78643K 3081 0 pfkey data 0 0K 0K 78643K 12 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 549 1318K 1319K 78643K 83320 0 UVM aobj 131 8K 8K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 342 0 NDP 13 0K 1K 78643K 218 0 temp 147 4746K 5382K 78643K 125105 0 kqueue 12 18K 28K 78643K 1321 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> 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 594 0 591 6 3 3 3 0 8 2 rtentry 112 771 0 682 4 1 3 4 0 8 0 unpcb 136 7874 0 7859 74 69 5 8 0 8 4 syncache 296 51 0 51 16 16 0 1 0 8 0 tcpqe 32 125 6 125 10 10 0 1 0 8 0 tcpcb 736 3105 0 3089 104 101 3 14 0 8 0 arp 120 156 0 140 1 0 1 1 0 8 0 inpcb 312 20736 0 20727 182 175 7 20 0 8 5 nd6 48 119 0 102 1 0 1 1 0 8 0 pkpcb 40 42 0 42 7 7 0 1 0 8 0 kcovpl 48 34 0 26 1 0 1 1 0 8 0 ppxss 1248 68 0 68 14 13 1 1 0 8 1 pfstscr 40 34 0 34 7 6 1 1 0 8 1 pffrag 232 78 0 78 5 5 0 1 0 482 0 pffrnode 88 78 0 78 5 5 0 1 0 8 0 pffrent 40 180 0 180 8 7 1 1 0 8 1 pfosfp 40 1551 0 1120 5 0 5 5 0 8 0 pfosfpen 112 1551 0 754 23 0 23 23 0 8 0 pfrktable 1344 659 29 656 13 12 1 1 0 8 0 pftag 88 38 0 32 1 0 1 1 0 8 0 pfqueue 264 6 0 6 2 2 0 1 0 8 0 pfstitem 24 51 0 47 1 0 1 1 0 8 0 pfstkey 112 112 0 108 2 1 1 2 0 8 0 pfstate 336 79 0 76 3 2 1 3 0 8 0 pfrule 1360 629 0 619 5 4 1 3 0 8 0 rttmrq 48 6 0 0 1 0 1 1 0 8 0 rttmr 72 14 0 14 5 5 0 1 0 8 0 art_heap8 4096 3 0 2 3 2 1 3 0 8 0 art_heap4 256 2942 0 2541 43 16 27 30 0 8 1 art_table 32 2945 0 2543 4 0 4 4 0 8 0 art_node 16 763 0 684 1 0 1 1 0 8 0 sysvmsgpl 40 39 0 13 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 2000 0 1990 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 20285 0 18820 92 0 92 92 0 8 0 ffsino 272 20285 0 18820 98 0 98 98 0 8 0 nchpl 144 38465 0 36824 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 134161 0 134161 6 5 1 2 0 8 1 percpumem 16 166 0 126 1 0 1 1 0 8 0 vcpupl 2048 195 0 0 25 0 25 25 0 8 0 vmpool 560 392 0 197 15 0 15 15 0 8 1 pfiaddrpl 120 200 0 199 12 11 1 1 0 8 0 kstatmem 264 278 0 252 4 1 3 3 0 8 0 scsiplug 72 6 0 6 2 2 0 1 0 8 0 scxspl 216 108060 0 108060 32 29 3 8 0 8 3 plimitpl 152 1468 0 1453 1 0 1 1 0 8 0 sigapl 424 13922 0 13861 8 0 8 8 0 8 0 futexpl 64 131306 0 131306 3 2 1 1 0 8 1 knotepl 120 682 0 0 11 0 11 11 0 8 0 kqueuepl 216 2942 0 2933 34 33 1 5 0 8 0 pipepl 336 2404 0 2376 75 67 8 9 0 8 5 fdescpl 496 13881 0 13857 6 2 4 5 0 8 0 filepl 152 95200 0 94960 156 137 19 22 0 8 8 lockfpl 104 3008 0 3006 5 4 1 2 0 8 0 lockfspl 48 970 0 968 1 0 1 1 0 8 0 sessionpl 144 51 0 34 1 0 1 1 0 8 0 pgrppl 48 68 0 51 1 0 1 1 0 8 0 ucredpl 96 9817 0 9805 1 0 1 1 0 8 0 zombiepl 144 13862 0 13861 5 4 1 1 0 8 0 processpl 1064 13922 0 13861 5 0 5 5 0 8 0 procpl 672 40701 0 40630 28 20 8 9 0 8 0 srpgc 96 35 0 35 12 11 1 1 0 8 1 sosppl 168 99 0 99 16 16 0 1 0 8 0 sockpl 480 29296 0 29269 468 455 13 34 0 8 8 mcl64k 65536 50 0 0 5 2 3 3 0 8 0 mcl16k 16384 33 0 0 4 1 3 3 0 8 0 mcl12k 12288 49 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 30 0 0 3 0 3 3 0 8 0 mcl4k 4096 33 0 0 3 0 3 3 0 8 0 mcl2k2 2112 10 0 0 1 0 1 1 0 8 0 mcl2k 2048 246 0 0 19 2 17 19 0 8 0 mtagpl 96 954 0 0 21 0 21 21 0 8 0 mbufpl 256 2915 0 0 156 0 156 156 0 8 0 bufpl 288 22839 0 16509 453 0 453 453 0 8 0 anonpl 24 2686560 0 2670569 249 129 120 141 0 186 0 amapchunkpl 152 238576 0 237897 62 27 35 42 0 158 0 amappl16 200 35665 0 35056 111 77 34 45 0 8 0 amappl15 192 3642 0 3639 1 0 1 1 0 8 0 amappl14 184 2331 0 2323 1 0 1 1 0 8 0 amappl13 176 902 0 900 1 0 1 1 0 8 0 amappl12 168 963 0 960 2 1 1 1 0 8 0 amappl11 160 1237 0 1215 4 2 2 2 0 8 0 amappl10 152 3243 0 3236 1 0 1 1 0 8 0 amappl9 144 1419 0 1416 1 0 1 1 0 8 0 amappl8 136 4047 0 3911 5 0 5 5 0 8 0 amappl7 128 3005 0 2987 1 0 1 1 0 8 0 amappl6 120 1300 0 1270 2 1 1 2 0 8 0 amappl5 112 12549 0 12535 1 0 1 1 0 8 0 amappl4 104 5982 0 5941 9 7 2 2 0 8 0 amappl3 96 43053 0 43015 2 0 2 2 0 8 0 amappl2 88 16520 0 16454 3 1 2 3 0 8 0 amappl1 80 333766 0 333198 31 15 16 20 0 8 0 amappl 88 81957 0 81701 8 1 7 7 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 14273 0 14054 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 14273 0 14054 2 0 2 2 0 8 0 vmmpekpl 168 107398 0 107313 4 0 4 4 0 8 0 vmmpepl 168 1348786 0 1345943 278 121 157 166 0 357 2 vmsppl 368 14272 0 14054 21 0 21 21 0 8 0 rwobjpl 56 338348 0 330533 133 20 113 115 0 8 0 pdppl 4096 28553 0 28303 699 435 264 264 0 8 14 pvpl 32 5251005 0 5230777 461 265 196 248 0 265 2 pmappl 248 14272 0 14054 15 0 15 15 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 2005 0 814 35 0 35 35 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{0}> trace x86_ipi_db(ffffffff829bfff0) 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0xb sys/dev/kcov.c:144 syscall(ffff80002122c210) at syscall+0x5c2 mi_syscall_return sys/sys/syscall_mi.h:130 [inline] syscall(ffff80002122c210) at syscall+0x5c2 sys/arch/amd64/amd64/trap.c:607 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f2660430, count: -6 ddb{0}> machine ddbcpu 1 Stopped at pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{1}> trace pf_anchor_global_RB_REMOVE(ffffffff82a6bc58,ffff800000d60800) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000d60c90) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000ba6330,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000c00000,2,ffff8000ffff4000) at pfioctl+0x8f67 pf_addr_setup sys/net/pf_ioctl.c:894 [inline] pfioctl(4900,cd60441a,ffff800000c00000,2,ffff8000ffff4000) at pfioctl+0x8f67 sys/net/pf_ioctl.c:1659 VOP_IOCTL(fffffd806f6869c8,cd60441a,ffff800000c00000,2,fffffd807f7d7660,ffff8000ffff4000) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8067b53ee8,cd60441a,ffff800000c00000,ffff8000ffff4000) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000ffff4000,ffff80002e3bfab8,ffff80002e3bfb10) at sys_ioctl+0x4a2 syscall(ffff80002e3bfb80) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002e3bfb80) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23ab8c7fd40, count: -9