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(ffffffff829d8728,ffff80000123f000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff80000123f490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff8000012497c0,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000c00000,2,ffff800024650fc8) at pfioctl+0x8de7 pf_addr_setup sys/net/pf_ioctl.c:894 [inline] pfioctl(4900,cd60441a,ffff800000c00000,2,ffff800024650fc8) at pfioctl+0x8de7 sys/net/pf_ioctl.c:1656 VOP_IOCTL(fffffd806f682b88,cd60441a,ffff800000c00000,2,fffffd807f7d8960,ffff800024650fc8) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd806b7c9c88,cd60441a,ffff800000c00000,ffff800024650fc8) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800024650fc8,ffff800026d202c8,ffff800026d20320) at sys_ioctl+0x4a2 syscall(ffff800026d20390) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800026d20390) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd3559812340, count: -9 ddb{0}> show registers rdi 0xffff800022045000 rsi 0x113a __ALIGN_SIZE+0x13a rbp 0xffff800026d1fda0 rbx 0xffffffff829d8728 pf_anchors rdx 0xffff800022045000 rcx 0x1139 __ALIGN_SIZE+0x139 rax 0xffffffff81475c5b pf_anchor_global_RB_REMOVE+0x2b r8 0x400 r9 0x8080808080808080 r10 0x3d0ea752e99d3bf4 r11 0x1961a07d00e05c14 r12 0xf8a25f09275ce0e6 r13 0xffffffff829d8730 pf_main_anchor r14 0xffff80000123f000 r15 0xdeaf007fdeaf4152 rip 0xffffffff81475c88 pf_anchor_global_RB_REMOVE+0x58 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff800026d1fd50 ss 0x10 pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{0}> show proc PROC (syz-executor.0) pid=104046 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff8000246507e8,0xffffffff82b38b58 process=0xffff800024664c98 user=0xffff800026d1b000, vmspace=0xfffffd807effe000 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 49048 426379 37426 0 2 0 syz-executor.0 *49048 104046 37426 0 7 0x4000000 syz-executor.0 67451 178541 21795 0 2 0 syz-executor.5 61362 523412 54532 0 2 0 syz-executor.6 28322 367100 20508 0 2 0 syz-executor.1 28322 199244 20508 0 3 0x4000080 fsleep syz-executor.1 88809 435875 6444 0 2 0 syz-executor.2 91958 228289 34060 0 2 0 syz-executor.7 91958 238365 34060 0 3 0x4000080 fsleep syz-executor.7 3653 231401 91812 0 3 0x80 nanoslp syz-executor.4 3653 379328 91812 0 3 0x4000080 netcon2 syz-executor.4 54532 489677 98469 0 2 0x482 syz-executor.6 80759 346712 0 0 3 0x14200 acct acct 21795 12987 98469 0 2 0x482 syz-executor.5 76403 93191 98469 0 2 0x2 syz-executor.3 34060 225783 98469 0 7 0x482 syz-executor.7 37426 37527 98469 0 2 0x482 syz-executor.0 13858 169932 1 0 3 0x100083 ttyin getty 20508 449202 98469 0 3 0x82 nanoslp syz-executor.1 6444 361721 98469 0 3 0x82 nanoslp syz-executor.2 91812 480590 98469 0 2 0x482 syz-executor.4 33602 73718 0 0 3 0x14280 nfsidl nfsio 65076 45636 0 0 3 0x14280 nfsidl nfsio 55684 381941 0 0 3 0x14280 nfsidl nfsio 71299 97611 0 0 3 0x14280 nfsidl nfsio 85602 45593 0 0 3 0x14280 nfsidl nfsio 28431 395544 0 0 3 0x14280 nfsidl nfsio 27864 453586 0 0 3 0x14200 bored sosplice 98469 438907 21785 0 3 0x82 thrsleep syz-fuzzer 98469 233652 21785 0 3 0x4000082 nanoslp syz-fuzzer 98469 240427 21785 0 3 0x4000082 thrsleep syz-fuzzer 98469 86638 21785 0 3 0x4000082 kqread syz-fuzzer 98469 121286 21785 0 3 0x4000082 thrsleep syz-fuzzer 98469 223061 21785 0 2 0x4000482 syz-fuzzer 98469 112280 21785 0 3 0x4000082 thrsleep syz-fuzzer 98469 29107 21785 0 3 0x4000082 thrsleep syz-fuzzer 98469 166372 21785 0 3 0x4000082 thrsleep syz-fuzzer 98469 359918 21785 0 3 0x4000082 thrsleep syz-fuzzer 21785 290152 82440 0 3 0x10008a sigsusp ksh 82440 491562 84815 0 3 0x9a kqread sshd 84815 268755 1 0 3 0x88 kqread sshd 90273 218809 17642 74 3 0x1100092 bpf pflogd 17642 113364 1 0 3 0x80 netio pflogd 64052 386195 84762 73 2 0x1100090 syslogd 84762 507875 1 0 3 0x100082 netio syslogd 78016 165734 1 0 3 0x100080 kqread resolvd 87235 304507 34606 77 3 0x100092 kqread dhcpleased 13411 471658 34606 77 3 0x100092 kqread dhcpleased 34606 409871 1 0 3 0x80 kqread dhcpleased 25385 72817 0 0 3 0x14200 bored smr 95200 361557 0 0 2 0x14200 zerothread 14558 468740 0 0 3 0x14200 aiodoned aiodoned 12925 412992 0 0 3 0x14200 syncer update 28384 491644 0 0 3 0x14200 cleaner cleaner 91264 138963 0 0 3 0x14200 reaper reaper 39630 475 0 0 3 0x14200 pgdaemon pagedaemon 50705 352993 0 0 3 0x14200 bored viomb 15863 235030 0 0 3 0x40014200 acpi0 acpi0 47227 43084 0 0 3 0x40014200 idle1 24592 230269 0 0 3 0x14200 bored softnet 63577 165896 0 0 3 0x14200 bored systqmp 55250 280073 0 0 3 0x14200 bored systq 35291 390144 0 0 2 0x40014200 softclock 766 281815 0 0 3 0x40014200 idle0 1 304014 0 0 3 0x80082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 49048 (syz-executor.0) thread 0xffff800024650fc8 (104046) exclusive rwlock pf_lock r = 0 (0xffffffff82969ae0) #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 (0xffffffff829045b0) #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 (0xffffffff82969b40) #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 (0xffffffff829ca490) #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 10201 6512K 7268K 78643K 34523 0 pcb 13 20K 23K 78643K 2971 0 rtable 213 8K 9K 78643K 4177 0 ifaddr 96 23K 25K 78643K 2314 0 sysctl 3 1K 1K 78643K 11 0 counters 56 35K 36K 78643K 376 0 ioctlops 1 4K 8K 78643K 22085 0 iov 0 0K 60K 78643K 1270 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1390 87K 87K 78643K 9028 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 305 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 672 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 17 61K 85K 78643K 29830 0 sigio 0 0K 0K 78643K 162 0 proc 75 87K 136K 78643K 2486 0 subproc 104 6K 6K 78643K 741 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 791 0 in_multi 87 5K 7K 78643K 1142 0 ether_multi 1 0K 0K 78643K 178 0 mrt 1 0K 0K 78643K 112 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 127 572K 572K 78643K 127 0 exec 0 0K 2K 78643K 2781 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 424 97K 106K 78643K 165817 0 UVM aobj 131 8K 8K 78643K 145 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1256 0 NDP 13 0K 2K 78643K 302 0 temp 649 5746K 5810K 78643K 184291 0 kqueue 12 18K 28K 78643K 972 0 SYN cache 2 4688K 4696K 78643K 4 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 575 0 572 3 2 1 3 0 8 0 rtentry 112 796 0 706 4 1 3 4 0 8 0 unpcb 136 6325 0 6309 52 51 1 6 0 8 0 syncache 296 71 0 71 14 14 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 44 0 44 10 10 0 1 0 8 0 tcpcb 736 16265 0 16259 260 259 1 39 0 8 0 arp 120 116 0 102 1 0 1 1 0 8 0 inpcb 312 29941 0 29933 161 160 1 19 0 8 0 rttmr 72 37 0 37 9 9 0 1 0 8 0 nd6 48 199 0 176 1 0 1 1 0 8 0 pkpcb 40 77 0 77 12 12 0 1 0 8 0 kcovpl 48 56 0 48 1 0 1 1 0 8 0 ppxss 1248 47 0 47 6 6 0 1 0 8 0 pfstscr 40 5009 0 5002 5 4 1 1 0 8 0 pffrag 232 394 0 394 7 7 0 1 0 482 0 pffrnode 88 394 0 394 7 7 0 1 0 8 0 pffrent 40 835 0 835 9 9 0 1 0 8 0 pfosfp 40 1434 0 1008 5 0 5 5 0 8 0 pfosfpen 112 1434 0 714 21 0 21 21 0 8 0 pfrktable 1344 878 614 875 9 8 1 1 0 8 0 pftag 88 50 0 31 1 0 1 1 0 8 0 pfqueue 264 43 0 43 3 3 0 1 0 8 0 pfstitem 24 3238 0 3225 1 0 1 1 0 8 0 pfstkey 112 8278 0 8267 2 1 1 2 0 8 0 pfstate 320 4840 0 4831 3 2 1 3 0 8 0 pfrule 1360 10369 0 10350 26 24 2 20 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3445 0 3034 43 16 27 29 0 8 0 art_table 32 3446 0 3034 4 0 4 4 0 8 0 art_node 16 788 0 710 1 0 1 1 0 8 0 sysvmsgpl 40 60 0 40 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 670 0 660 1 0 1 1 0 8 0 shmpl 112 142 0 14 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 35615 0 34139 93 0 93 93 0 8 0 ffsino 272 35615 0 34139 99 0 99 99 0 8 0 nchpl 144 69608 0 67963 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 274083 0 274083 9 8 1 3 0 8 1 percpumem 16 200 0 160 1 0 1 1 0 8 0 pfiaddrpl 120 172 0 171 10 9 1 2 0 8 0 scsiplug 72 11 0 11 4 4 0 1 0 8 0 scxspl 216 221483 0 221483 24 23 1 8 0 8 1 plimitpl 152 675 0 660 1 0 1 1 0 8 0 sigapl 424 30070 0 30018 8 1 7 8 0 8 0 futexpl 64 239347 0 239345 3 2 1 1 0 8 0 knotepl 120 1059 0 0 19 2 17 19 0 8 0 kqueuepl 216 2517 0 2508 40 39 1 8 0 8 0 pipepl 336 2126 0 2098 43 40 3 8 0 8 0 fdescpl 496 30026 0 29996 6 2 4 5 0 8 0 filepl 152 186911 0 186667 125 113 12 20 0 8 2 lockfpl 104 14330 0 14328 3 2 1 2 0 8 0 lockfspl 48 3940 0 3938 1 0 1 1 0 8 0 sessionpl 144 75 0 58 1 0 1 1 0 8 0 pgrppl 48 206 0 189 1 0 1 1 0 8 0 ucredpl 96 47316 0 47304 1 0 1 1 0 8 0 zombiepl 144 30018 0 30018 2 1 1 1 0 8 1 processpl 1064 30070 0 30018 5 0 5 5 0 8 0 procpl 672 78743 0 78678 29 22 7 8 0 8 0 srpgc 96 70 0 70 8 7 1 1 0 8 1 sosppl 168 157 0 157 18 18 0 1 0 8 0 sockpl 480 36928 0 36899 386 381 5 33 0 8 0 mcl64k 65536 43 0 0 4 1 3 3 0 8 0 mcl16k 16384 30 0 0 4 2 2 3 0 8 0 mcl12k 12288 49 0 0 2 0 2 2 0 8 0 mcl9k 9216 33 0 0 3 1 2 2 0 8 0 mcl8k 8192 41 0 0 6 3 3 3 0 8 0 mcl4k 4096 41 0 0 5 2 3 3 0 8 0 mcl2k2 2112 14 0 0 1 0 1 1 0 8 0 mcl2k 2048 645 0 0 17 1 16 17 0 8 0 mtagpl 96 739 0 0 13 0 13 13 0 8 0 mbufpl 256 1203 0 0 50 1 49 50 0 8 0 bufpl 288 40789 0 34453 453 0 453 453 0 8 0 anonpl 24 5274029 0 5262476 319 203 116 155 0 186 36 amapchunkpl 152 477106 0 476566 129 105 24 54 0 158 0 amappl16 200 64817 0 64484 94 76 18 28 0 8 0 amappl15 192 6171 0 6169 1 0 1 1 0 8 0 amappl14 184 10230 0 10219 1 0 1 1 0 8 0 amappl13 176 2840 0 2838 1 0 1 1 0 8 0 amappl12 168 3375 0 3369 1 0 1 1 0 8 0 amappl11 160 6512 0 6489 3 1 2 2 0 8 0 amappl10 152 109 0 96 1 0 1 1 0 8 0 amappl9 144 1603 0 1600 1 0 1 1 0 8 0 amappl8 136 5812 0 5551 11 1 10 10 0 8 0 amappl7 128 3947 0 3930 1 0 1 1 0 8 0 amappl6 120 1698 0 1662 16 14 2 2 0 8 0 amappl5 112 18118 0 18100 1 0 1 1 0 8 0 amappl4 104 14137 0 14092 3 1 2 2 0 8 0 amappl3 96 91878 0 91827 2 0 2 2 0 8 0 amappl2 88 37128 0 37051 3 1 2 3 0 8 0 amappl1 80 704481 0 703819 27 12 15 20 0 8 0 amappl 88 164195 0 164010 6 1 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 144 0 14 3 0 3 3 0 8 0 uaddrrnd 24 30026 0 29996 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 30026 0 29996 1 0 1 1 0 8 0 vmmpekpl 168 199050 0 198993 4 0 4 4 0 8 0 vmmpepl 168 2844354 0 2841693 250 119 131 131 0 357 8 vmsppl 368 30025 0 29996 4 1 3 4 0 8 0 rwobjpl 56 669784 0 662181 128 19 109 109 0 8 0 pdppl 4096 60059 0 59992 515 446 69 79 0 8 2 pvpl 32 11160311 0 11143775 669 436 233 282 0 265 89 pmappl 248 30025 0 29996 3 0 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1799 0 966 26 0 26 26 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace pf_anchor_global_RB_REMOVE(ffffffff829d8728,ffff80000123f000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff80000123f490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff8000012497c0,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000c00000,2,ffff800024650fc8) at pfioctl+0x8de7 pf_addr_setup sys/net/pf_ioctl.c:894 [inline] pfioctl(4900,cd60441a,ffff800000c00000,2,ffff800024650fc8) at pfioctl+0x8de7 sys/net/pf_ioctl.c:1656 VOP_IOCTL(fffffd806f682b88,cd60441a,ffff800000c00000,2,fffffd807f7d8960,ffff800024650fc8) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd806b7c9c88,cd60441a,ffff800000c00000,ffff800024650fc8) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800024650fc8,ffff800026d202c8,ffff800026d20320) at sys_ioctl+0x4a2 syscall(ffff800026d20390) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800026d20390) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd3559812340, 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 __mp_lock(ffffffff829ca288) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff829ca288) at __mp_lock+0x122 sys/kern/kern_lock.c:147 __mp_acquire_count(ffffffff829ca288,1) at __mp_acquire_count+0x48 sys/kern/kern_lock.c:227 mi_switch() at mi_switch+0x3d3 sys/kern/sched_bsd.c:416 sleep_finish(ffff80002c9263b0,1) at sleep_finish+0x198 sys/kern/kern_synch.c:437 tsleep(ffffffff82b86d88,120,ffffffff82571bbb,2) at tsleep+0x12c sys/kern/kern_synch.c:158 sys_nanosleep(ffff800024652a88,ffff80002c9264d0,ffff80002c926530) at sys_nanosleep+0x1f5 sys/kern/kern_time.c:299 syscall(ffff80002c9265a0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002c9265a0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcb4e0, count: -11