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(ffffffff82a31e08,ffff800000e54000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000e54490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000de5de0,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd604404,ffff800000be2000,3,ffff800024684fc8) at pfioctl+0x9435 pf_addr_setup sys/net/pf_ioctl.c:892 [inline] pfioctl(4900,cd604404,ffff800000be2000,3,ffff800024684fc8) at pfioctl+0x9435 sys/net/pf_ioctl.c:1423 VOP_IOCTL(fffffd806f73faa8,cd604404,ffff800000be2000,3,fffffd807f7d8840,ffff800024684fc8) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd80748cc720,cd604404,ffff800000be2000,ffff800024684fc8) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800024684fc8,ffff80002a910ca8,ffff80002a910d00) at sys_ioctl+0x4a2 syscall(ffff80002a910d70) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002a910d70) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa35959dc320, count: -9 ddb{0}> show registers rdi 0xffff80002a0f9000 rsi 0x17b4 __ALIGN_SIZE+0x7b4 rbp 0xffff80002a910790 rbx 0xffffffff82a31e08 pf_anchors rdx 0xffff80002a0f9000 rcx 0x17b3 __ALIGN_SIZE+0x7b3 rax 0xffffffff81c1ba9b pf_anchor_global_RB_REMOVE+0x2b r8 0x400 r9 0x8080808080808080 r10 0x83da05743614d85f r11 0x83e9ef3ac6e2495a r12 0x1056336fb9a5a567 r13 0xffffffff82a31e10 pf_main_anchor r14 0xffff800000e54000 r15 0xdead007fdeadbeef rip 0xffffffff81c1bac8 pf_anchor_global_RB_REMOVE+0x58 cs 0x8 rflags 0x10202 __ALIGN_SIZE+0xf202 rsp 0xffff80002a910740 ss 0x10 pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{0}> show proc PROC (syz-executor.5) pid=2452 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800024685a48,0xffff8000246847f8 process=0xffff8000ffff10b8 user=0xffff80002a90b000, vmspace=0xfffffd8063e5fe70 estcpu=36, cpticks=24, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 77565 29508 5401 0 2 0 syz-executor.7 77565 370792 5401 0 2 0x4000000 syz-executor.7 30231 402427 46386 0 2 0 syz-executor.1 30231 111235 46386 0 3 0x4000080 fsleep syz-executor.1 40397 351648 20438 0 2 0 syz-executor.5 *40397 2452 20438 0 7 0x4000000 syz-executor.5 98366 454841 71203 0 2 0 syz-executor.3 98366 257098 71203 0 3 0x4000080 fsleep syz-executor.3 54279 215781 16427 0 2 0x480 syz-executor.6 54279 125340 16427 0 3 0x4000080 fsleep syz-executor.6 54279 244499 16427 0 3 0x4000080 netio syz-executor.6 54279 460520 16427 0 3 0x4000080 fsleep syz-executor.6 24898 374402 37766 0 2 0x480 syz-executor.4 24898 143986 37766 0 3 0x4000080 ttyout syz-executor.4 24898 347886 37766 0 3 0x4000080 fsleep syz-executor.4 5401 391539 63075 0 2 0x482 syz-executor.7 50255 500588 63075 0 3 0x82 piperd syz-executor.0 71203 439717 63075 0 2 0x482 syz-executor.3 37766 435917 63075 0 2 0x482 syz-executor.4 1467 378221 63075 0 3 0x82 piperd syz-executor.2 16427 393414 63075 0 7 0x482 syz-executor.6 46386 122436 63075 0 3 0x82 nanoslp syz-executor.1 20438 472641 63075 0 2 0x482 syz-executor.5 16847 440411 0 0 3 0x14200 acct acct 68059 358156 0 0 3 0x14280 nfsidl nfsio 39183 10203 0 0 3 0x14280 nfsidl nfsio 14229 42919 0 0 3 0x14280 nfsidl nfsio 44713 312165 0 0 3 0x14280 nfsidl nfsio 73141 436045 0 0 3 0x14280 nfsidl nfsio 2189 135922 0 0 3 0x14280 nfsidl nfsio 82985 237538 0 0 3 0x14280 nfsidl nfsio 43290 326840 0 0 3 0x14280 nfsidl nfsio 99123 313236 0 0 3 0x14280 nfsidl nfsio 56272 497377 0 0 3 0x14280 nfsidl nfsio 11939 441258 0 0 3 0x14280 nfsidl nfsio 24670 258139 0 0 3 0x14280 nfsidl nfsio 62950 447209 0 0 3 0x14280 nfsidl nfsio 4251 109047 0 0 3 0x14280 nfsidl nfsio 96685 272480 0 0 3 0x14280 nfsidl nfsio 72768 314334 0 0 3 0x14280 nfsidl nfsio 35833 379000 0 0 3 0x14280 nfsidl nfsio 5557 75503 0 0 3 0x14280 nfsidl nfsio 90903 317779 0 0 3 0x14280 nfsidl nfsio 82937 351562 0 0 3 0x14280 nfsidl nfsio 56279 456908 1 0 3 0x100083 ttyin getty 83754 346626 0 0 3 0x14200 bored sosplice 63075 269993 53932 0 3 0x82 kqread syz-fuzzer 63075 198093 53932 0 3 0x4000082 nanoslp syz-fuzzer 63075 497272 53932 0 3 0x4000082 thrsleep syz-fuzzer 63075 253473 53932 0 3 0x4000082 thrsleep syz-fuzzer 63075 233999 53932 0 3 0x4000082 thrsleep syz-fuzzer 63075 76701 53932 0 3 0x4000082 thrsleep syz-fuzzer 63075 296599 53932 0 3 0x4000082 thrsleep syz-fuzzer 63075 214203 53932 0 3 0x4000082 thrsleep syz-fuzzer 63075 507183 53932 0 3 0x4000082 thrsleep syz-fuzzer 53932 387895 8053 0 3 0x10008a sigsusp ksh 8053 50431 35153 0 3 0x9a kqread sshd 35153 217262 1 0 3 0x88 kqread sshd 83173 55003 7146 74 3 0x1100092 bpf pflogd 7146 226685 1 0 3 0x80 netio pflogd 59772 70832 6470 73 3 0x1100090 kqread syslogd 6470 38899 1 0 3 0x100082 netio syslogd 98166 136807 1 0 3 0x100080 kqread resolvd 41628 210713 17611 77 3 0x100092 kqread dhcpleased 81937 321381 17611 77 3 0x100092 kqread dhcpleased 17611 56354 1 0 3 0x80 kqread dhcpleased 80886 448563 0 0 3 0x14200 bored smr 12315 9333 0 0 2 0x14200 zerothread 4145 6859 0 0 3 0x14200 aiodoned aiodoned 19650 380570 0 0 3 0x14200 syncer update 44578 490005 0 0 3 0x14200 cleaner cleaner 46680 421964 0 0 3 0x14200 reaper reaper 53603 31202 0 0 3 0x14200 pgdaemon pagedaemon 36129 287947 0 0 3 0x14200 bored viomb 58498 106639 0 0 3 0x40014200 acpi0 acpi0 55444 470180 0 0 3 0x40014200 idle1 28379 290650 0 0 3 0x14200 bored softnet 23173 266131 0 0 3 0x14200 bored systqmp 83045 243923 0 0 3 0x14200 bored systq 12412 455568 0 0 2 0x40014200 softclock 7624 513690 0 0 3 0x40014200 idle0 1 163480 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 40397 (syz-executor.5) thread 0xffff800024684fc8 (2452) exclusive rwlock pf_lock r = 0 (0xffffffff8298a540) #0 witness_lock+0x44d #1 pfioctl+0x878a sys/net/pf_ioctl.c:1374 #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 (0xffffffff82994730) #0 witness_lock+0x44d #1 pfioctl+0x871b sys/net/pf_ioctl.c:1374 #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 (0xffffffff829e4f28) #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 10235 6511K 7355K 78643K 39452 0 pcb 13 18K 23K 78643K 2567 0 rtable 210 16K 33K 78643K 3606 0 ifaddr 99 22K 27K 78643K 2365 0 sysctl 3 1K 5K 78643K 9 0 counters 58 35K 36K 78643K 510 0 ioctlops 1 4K 8K 78643K 6601 0 iov 0 0K 32K 78643K 1463 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1520 95K 95K 78643K 16546 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 148 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 2249 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 16 57K 85K 78643K 18856 0 sigio 0 0K 0K 78643K 79 0 proc 71 87K 136K 78643K 2839 0 subproc 104 6K 6K 78643K 788 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 1208 0 in_multi 72 5K 6K 78643K 1095 0 ether_multi 1 0K 0K 78643K 183 0 mrt 2 0K 0K 78643K 74 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 319 1420K 1420K 78643K 319 0 exec 0 0K 2K 78643K 4424 0 pfkey data 0 0K 0K 78643K 36 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 537 732K 734K 78643K 244457 0 UVM aobj 131 8K 8K 78643K 136 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 667 0 NDP 15 0K 1K 78643K 376 0 temp 179 4769K 4861K 78643K 157756 0 kqueue 13 18K 28K 78643K 952 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 1399 0 1396 24 23 1 5 0 8 0 rtentry 112 919 0 833 4 0 4 4 0 8 0 unpcb 136 17648 0 17627 172 166 6 9 0 8 5 syncache 296 18 0 18 5 5 0 1 0 8 0 tcpqe 32 6 0 6 3 3 0 1 0 8 0 tcpcb 736 12495 0 12485 327 322 5 19 0 8 4 arp 120 152 0 134 1 0 1 1 0 8 0 inpcb 304 22150 0 22143 312 308 4 16 0 8 3 rttmr 72 17 0 17 5 5 0 1 0 8 0 nd6 48 213 0 195 1 0 1 1 0 8 0 pkpcb 40 51 0 51 8 8 0 1 0 8 0 kcovpl 48 60 0 52 1 0 1 1 0 8 0 ppxss 1248 106 0 106 17 17 0 1 0 8 0 pfstscr 40 105 0 105 13 13 0 1 0 8 0 pffrag 232 144 0 143 9 8 1 1 0 482 0 pffrnode 88 144 0 143 9 8 1 1 0 8 0 pffrent 40 1001 0 1000 10 9 1 1 0 8 0 pfosfp 40 1441 0 1441 5 5 0 5 0 8 0 pfosfpen 112 1441 0 1441 21 18 3 21 0 8 3 pfrktable 1344 365 19 362 11 10 1 3 0 8 0 pftag 88 18 0 6 1 0 1 1 0 8 0 pfqueue 264 15 0 15 4 4 0 1 0 8 0 pfstitem 24 45 0 43 1 0 1 1 0 8 0 pfstkey 112 174 0 172 1 0 1 1 0 8 0 pfstate 320 98 0 96 2 1 1 2 0 8 0 pfrule 1360 1602 0 1585 28 25 3 25 0 8 0 art_heap8 4096 4 0 2 4 2 2 3 0 8 0 art_heap4 256 3764 0 3405 51 27 24 30 0 8 0 art_table 32 3768 0 3407 4 0 4 4 0 8 0 art_node 16 916 0 838 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 4 1 0 1 1 0 8 0 semapl 112 2240 0 2230 1 0 1 1 0 8 0 shmpl 112 133 0 5 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 30548 0 29051 94 0 94 94 0 8 0 ffsino 272 30548 0 29051 101 0 101 101 0 8 0 nchpl 144 55533 0 53906 63 0 63 63 0 8 0 uvmvnodes 80 6643 0 0 136 0 136 136 0 8 0 vnodes 224 6643 0 0 391 0 391 391 0 8 0 namei 1024 217883 0 217883 3 2 1 2 0 8 1 percpumem 16 267 0 226 1 0 1 1 0 8 0 vcpupl 2048 150 0 0 19 0 19 19 0 8 0 vmpool 560 252 0 102 14 3 11 11 0 8 0 pfiaddrpl 120 231 0 230 6 5 1 2 0 8 0 scsiplug 72 6 0 6 2 2 0 1 0 8 0 scxspl 216 153049 0 153049 32 31 1 8 0 8 1 plimitpl 152 1871 0 1856 1 0 1 1 0 8 0 sigapl 424 19077 0 19012 9 1 8 9 0 8 0 futexpl 64 164554 0 164549 1 0 1 1 0 8 0 knotepl 120 1345 0 0 17 5 12 17 0 8 0 kqueuepl 216 4079 0 4070 95 94 1 7 0 8 0 pipepl 336 3475 0 3446 96 93 3 11 0 8 0 fdescpl 496 19040 0 19011 5 0 5 5 0 8 0 filepl 152 156599 0 156332 263 248 15 23 0 8 4 lockfpl 104 7013 0 7011 21 20 1 2 0 8 0 lockfspl 48 1750 0 1748 1 0 1 1 0 8 0 sessionpl 144 78 0 61 1 0 1 1 0 8 0 pgrppl 48 293 0 276 1 0 1 1 0 8 0 ucredpl 96 45010 0 44996 1 0 1 1 0 8 0 zombiepl 144 19012 0 19012 1 0 1 1 0 8 1 processpl 1064 19077 0 19012 5 0 5 5 0 8 0 procpl 672 57835 0 57753 46 37 9 9 0 8 1 srpgc 96 61 0 61 14 13 1 1 0 8 1 sosppl 168 132 0 132 28 28 0 1 0 8 0 sockpl 480 41275 0 41244 967 955 12 34 0 8 7 mcl64k 65536 33 0 0 3 0 3 3 0 8 0 mcl16k 16384 31 0 0 4 1 3 3 0 8 0 mcl12k 12288 73 0 0 2 0 2 2 0 8 0 mcl9k 9216 25 0 0 2 0 2 2 0 8 0 mcl8k 8192 57 0 0 5 2 3 3 0 8 0 mcl4k 4096 25 0 0 4 1 3 3 0 8 0 mcl2k2 2112 17 0 0 2 0 2 2 0 8 0 mcl2k 2048 384 0 0 20 1 19 19 0 8 0 mtagpl 96 1101 0 0 16 0 16 16 0 8 0 mbufpl 256 2606 0 0 119 1 118 118 0 8 0 bufpl 288 29663 0 23019 475 0 475 475 0 8 0 anonpl 24 5620085 0 5592788 474 307 167 191 0 186 0 amapchunkpl 152 593133 0 592144 164 122 42 65 0 158 1 amappl16 200 56386 0 55381 269 215 54 65 0 8 1 amappl15 192 4198 0 4193 1 0 1 1 0 8 0 amappl14 184 3687 0 3681 1 0 1 1 0 8 0 amappl13 176 2827 0 2824 1 0 1 1 0 8 0 amappl12 168 3706 0 3699 1 0 1 1 0 8 0 amappl11 160 960 0 944 1 0 1 1 0 8 0 amappl10 152 2759 0 2748 1 0 1 1 0 8 0 amappl9 144 3100 0 3094 1 0 1 1 0 8 0 amappl8 136 2700 0 2564 5 0 5 5 0 8 0 amappl7 128 1000 0 985 1 0 1 1 0 8 0 amappl6 120 3004 0 2970 7 5 2 2 0 8 0 amappl5 112 17181 0 17159 1 0 1 1 0 8 0 amappl4 104 5861 0 5829 2 0 2 2 0 8 0 amappl3 96 6250 0 6232 1 0 1 1 0 8 0 amappl2 88 5336 0 5271 3 1 2 3 0 8 0 amappl1 80 350626 0 350037 21 7 14 19 0 8 0 amappl 88 242594 0 242270 12 3 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 135 0 5 3 0 3 3 0 8 0 uaddrrnd 24 19292 0 19113 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 19292 0 19113 2 0 2 2 0 8 0 vmmpekpl 168 144644 0 144556 8 2 6 6 0 8 0 vmmpepl 168 1764858 0 1761429 553 396 157 175 0 357 0 vmsppl 368 19291 0 19113 18 1 17 17 0 8 0 rwobjpl 56 438665 0 429738 157 30 127 128 0 8 0 pdppl 4096 38591 0 38376 1060 841 219 229 0 8 4 pvpl 32 9375685 0 9345597 844 601 243 327 0 265 0 pmappl 248 19291 0 19113 12 0 12 12 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 2437 0 1321 33 0 33 33 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace pf_anchor_global_RB_REMOVE(ffffffff82a31e08,ffff800000e54000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000e54490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000de5de0,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd604404,ffff800000be2000,3,ffff800024684fc8) at pfioctl+0x9435 pf_addr_setup sys/net/pf_ioctl.c:892 [inline] pfioctl(4900,cd604404,ffff800000be2000,3,ffff800024684fc8) at pfioctl+0x9435 sys/net/pf_ioctl.c:1423 VOP_IOCTL(fffffd806f73faa8,cd604404,ffff800000be2000,3,fffffd807f7d8840,ffff800024684fc8) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd80748cc720,cd604404,ffff800000be2000,ffff800024684fc8) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800024684fc8,ffff80002a910ca8,ffff80002a910d00) at sys_ioctl+0x4a2 syscall(ffff80002a910d70) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002a910d70) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa35959dc320, 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(ffffffff829e4d20) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff829e4d20) at __mp_lock+0x122 sys/kern/kern_lock.c:147 __mp_acquire_count(ffffffff829e4d20,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(ffff80002e352730,1) at sleep_finish+0x198 sys/kern/kern_synch.c:437 tsleep(ffffffff829c1418,120,ffffffff825577d7,2) at tsleep+0x12c sys/kern/kern_synch.c:158 sys_nanosleep(ffff80002c939510,ffff80002e352850,ffff80002e3528b0) at sys_nanosleep+0x1f5 sys/kern/kern_time.c:299 syscall(ffff80002e352920) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002e352920) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffb790, count: -11