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(ffffffff82ac08d8,ffff800000cbb000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000cbb490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000d37e00,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff80002af38550) at pfioctl+0x859d pf_addr_setup sys/net/pf_ioctl.c:892 [inline] pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff80002af38550) at pfioctl+0x859d sys/net/pf_ioctl.c:1652 VOP_IOCTL(fffffd806f76ec68,cd60441a,ffff800000bf5000,3,fffffd807f7d86c0,ffff80002af38550) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8075aed150,cd60441a,ffff800000bf5000,ffff80002af38550) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff80002af38550,ffff800021216cc8,ffff800021216d20) at sys_ioctl+0x4a2 syscall(ffff800021216d90) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021216d90) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x85476c90710, count: -9 ddb{1}> show registers rdi 0xffff800021249000 rsi 0x1834 __ALIGN_SIZE+0x834 rbp 0xffff8000212167b0 rbx 0xffffffff82ac08d8 pf_anchors rdx 0xffff800021249000 rcx 0x1833 __ALIGN_SIZE+0x833 rax 0xffffffff8176fbdb pf_anchor_global_RB_REMOVE+0x2b r8 0x400 r9 0x8080808080808080 r10 0xbbc9ed092197d631 r11 0xa74e9bab934b6f24 r12 0x8281a9795bf253f4 r13 0xffffffff82ac08e0 pf_main_anchor r14 0xffff800000cbb000 r15 0xdeaf007fdeaf4152 rip 0xffffffff8176fc08 pf_anchor_global_RB_REMOVE+0x58 cs 0x8 rflags 0x10282 __ALIGN_SIZE+0xf282 rsp 0xffff800021216760 ss 0x10 pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx ddb{1}> show proc PROC (syz-executor.6) pid=459132 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=85, nice=20 forw=0xffffffffffffffff, list=0xffff80002af39cf0,0xffffffff829b0e58 process=0xffff8000294da9a8 user=0xffff800021211000, vmspace=0xfffffd806a87ea20 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 29056 44278 66762 0 2 0 syz-executor.6 *29056 459132 66762 0 7 0x4000000 syz-executor.6 78353 450623 97798 0 3 0x82 nanoslp syz-executor.2 62892 219984 0 0 3 0x14280 nfsidl nfsio 54062 482579 0 0 3 0x14280 nfsidl nfsio 54561 515283 0 0 3 0x14280 nfsidl nfsio 99900 489338 0 0 3 0x14280 nfsidl nfsio 34891 201728 0 0 3 0x14280 nfsidl nfsio 19416 499948 0 0 3 0x14280 nfsidl nfsio 20764 194508 0 0 3 0x14280 nfsidl nfsio 36433 211671 0 0 3 0x14280 nfsidl nfsio 15241 447333 0 0 3 0x14280 nfsidl nfsio 97064 91330 0 0 3 0x14280 nfsidl nfsio 47703 216074 0 0 3 0x14280 nfsidl nfsio 27067 388644 0 0 3 0x14280 nfsidl nfsio 24190 490593 0 0 3 0x14280 nfsidl nfsio 49359 137078 0 0 3 0x14280 nfsidl nfsio 58400 264133 0 0 3 0x14280 nfsidl nfsio 67555 346534 0 0 3 0x14280 nfsidl nfsio 71867 229530 0 0 3 0x14280 nfsidl nfsio 5077 204560 0 0 3 0x14280 nfsidl nfsio 2923 466735 0 0 3 0x14280 nfsidl nfsio 99432 246789 0 0 3 0x14280 nfsidl nfsio 33982 97853 97798 0 3 0x82 nanoslp syz-executor.3 38483 25121 0 0 3 0x14200 acct acct 25602 363548 97798 0 3 0x82 piperd syz-executor.7 66762 487969 97798 0 3 0x82 nanoslp syz-executor.6 26947 119124 0 0 3 0x14200 bored sosplice 35981 42230 97798 0 3 0x82 piperd syz-executor.5 76494 48555 97798 0 3 0x82 piperd syz-executor.4 91205 18993 97798 0 3 0x82 piperd syz-executor.1 97798 260815 41351 0 3 0x82 kqread syz-fuzzer 97798 174320 41351 0 3 0x4000082 nanoslp syz-fuzzer 97798 103180 41351 0 3 0x4000082 thrsleep syz-fuzzer 97798 118829 41351 0 3 0x4000082 thrsleep syz-fuzzer 97798 196120 41351 0 3 0x4000082 thrsleep syz-fuzzer 97798 258224 41351 0 3 0x4000082 nanoslp syz-fuzzer 97798 478186 41351 0 3 0x4000082 thrsleep syz-fuzzer 97798 317791 41351 0 3 0x4000082 thrsleep syz-fuzzer 97798 185698 41351 0 3 0x4000082 thrsleep syz-fuzzer 41351 473470 25505 0 3 0x10008a sigsusp ksh 25505 241207 37267 0 3 0x9a kqread sshd 33126 512365 1 0 3 0x100083 ttyin getty 37267 491847 1 0 3 0x88 kqread sshd 68012 494973 4431 74 3 0x1100092 bpf pflogd 4431 332177 1 0 3 0x80 netio pflogd 90315 464269 10099 73 3 0x1100090 kqread syslogd 10099 215793 1 0 3 0x100082 netio syslogd 29479 93012 1 0 3 0x100080 kqread resolvd 6253 320282 58502 77 3 0x100092 kqread dhcpleased 16923 198823 58502 77 3 0x100092 kqread dhcpleased 58502 7056 1 0 3 0x80 kqread dhcpleased 99440 161848 0 0 3 0x14200 bored smr 18349 181430 0 0 7 0x14200 zerothread 67680 384821 0 0 3 0x14200 aiodoned aiodoned 8879 461901 0 0 3 0x14200 syncer update 80359 369685 0 0 3 0x14200 cleaner cleaner 56709 95565 0 0 3 0x14200 reaper reaper 26792 176174 0 0 3 0x14200 pgdaemon pagedaemon 24887 348606 0 0 3 0x14200 bored viomb 59198 114584 0 0 3 0x40014200 acpi0 acpi0 14567 152216 0 0 3 0x40014200 idle1 80974 263098 0 0 3 0x14200 bored softnet 54978 152731 0 0 3 0x14200 bored systqmp 76832 313615 0 0 3 0x14200 bored systq 60715 282076 0 0 3 0x40014200 bored softclock 54239 313900 0 0 3 0x40014200 idle0 1 86865 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 29056 (syz-executor.6) thread 0xffff80002af38550 (459132) exclusive rwlock pf_lock r = 0 (0xffffffff829100c0) #0 witness_lock+0x44d #1 pfioctl+0x5b38 sys/net/pf_ioctl.c:1601 #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 (0xffffffff8292cf40) #0 witness_lock+0x44d #1 pfioctl+0x3690 sys/net/pf_ioctl.c:1601 #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 (0xffffffff82b2e8b0) #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 10193 6640K 6990K 78643K 18044 0 pcb 13 13K 15K 78643K 685 0 rtable 194 7K 9K 78643K 1331 0 ifaddr 98 22K 23K 78643K 984 0 sysctl 2 0K 0K 78643K 2 0 counters 54 35K 35K 78643K 200 0 ioctlops 1 4K 8K 78643K 7037 0 iov 0 0K 24K 78643K 429 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1327 83K 83K 78643K 3874 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 17K 78643K 120 0 VM map 2 1K 1K 78643K 2 0 sem 11 1K 1K 78643K 17 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 10 33K 81K 78643K 11059 0 sigio 0 0K 0K 78643K 425 0 proc 70 87K 124K 78643K 1424 0 subproc 91 5K 6K 78643K 364 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 539 0 in_multi 77 5K 7K 78643K 517 0 ether_multi 1 0K 0K 78643K 72 0 mrt 1 0K 0K 78643K 51 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 79 360K 360K 78643K 79 0 exec 0 0K 2K 78643K 1433 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 432 364K 380K 78643K 137989 0 UVM aobj 131 4K 4K 78643K 153 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 1K 78643K 354 0 NDP 12 0K 2K 78643K 141 0 temp 131 4713K 4841K 78643K 280417 0 kqueue 12 18K 24K 78643K 297 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 288 0 285 1 0 1 1 0 8 0 rtentry 112 359 0 277 4 0 4 4 0 8 0 unpcb 136 2271 0 2256 15 14 1 6 0 8 0 syncache 296 18 0 18 5 5 0 1 0 8 0 tcpqe 32 46 77 46 2 2 0 1 0 8 0 tcpcb 736 2024 0 2020 63 59 4 8 0 8 3 arp 120 59 0 45 1 0 1 1 0 8 0 inpcb 304 11147 0 11140 198 192 6 16 0 8 5 rttmr 72 14 0 14 3 3 0 1 0 8 0 nd6 48 84 0 66 1 0 1 1 0 8 0 pkpcb 40 10 0 10 2 2 0 1 0 8 0 kcovpl 48 28 0 21 1 0 1 1 0 8 0 ppxss 1248 25 0 25 3 3 0 1 0 8 0 pfstscr 40 20 0 20 3 3 0 1 0 8 0 pffrag 232 8 0 8 5 5 0 1 0 482 0 pffrnode 88 8 0 8 5 5 0 1 0 8 0 pffrent 40 126 0 126 6 6 0 1 0 8 0 pfosfp 40 1438 0 1014 5 0 5 5 0 8 0 pfosfpen 112 1438 0 723 21 0 21 21 0 8 0 pfrktable 1344 52 31 49 2 1 1 1 0 8 0 pftag 88 14 0 8 2 1 1 1 0 8 0 pfqueue 264 11 0 11 2 2 0 1 0 8 0 pfstitem 24 42 0 40 1 0 1 1 0 8 0 pfstkey 112 92 0 90 1 0 1 1 0 8 0 pfstate 320 64 0 62 3 2 1 3 0 8 0 pfrule 1360 2557 0 2168 40 7 33 33 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1477 0 1139 37 11 26 29 0 8 0 art_table 32 1478 0 1139 4 0 4 4 0 8 0 art_node 16 358 0 287 1 0 1 1 0 8 0 sysvmsgpl 40 59 0 19 1 0 1 1 0 8 0 semupl 112 6 0 6 1 1 0 1 0 8 0 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 150 0 22 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 15146 0 13537 102 0 102 102 0 8 0 ffsino 272 15146 0 13537 109 1 108 108 0 8 0 nchpl 144 28990 0 27376 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 83071 0 83071 7 6 1 2 0 8 1 percpumem 16 112 0 73 1 0 1 1 0 8 0 vcpupl 2048 17 0 0 3 0 3 3 0 8 0 vmpool 560 17 0 0 2 0 2 2 0 8 0 pfiaddrpl 120 39 0 38 3 2 1 1 0 8 0 scsiplug 72 4 0 4 1 1 0 1 0 8 0 scxspl 216 84830 0 84830 27 26 1 8 0 8 1 plimitpl 152 1755 0 1741 1 0 1 1 0 8 0 sigapl 424 11352 0 11291 8 0 8 8 0 8 0 futexpl 64 74977 0 74977 5 4 1 1 0 8 1 knotepl 120 142 0 0 4 0 4 4 0 8 0 kqueuepl 216 860 0 852 14 13 1 5 0 8 0 pipepl 336 1001 0 976 25 22 3 8 0 8 0 fdescpl 496 11316 0 11293 7 3 4 5 0 8 0 filepl 152 49171 0 48947 116 104 12 19 0 8 1 lockfpl 104 1186 0 1184 2 1 1 2 0 8 0 lockfspl 48 386 0 384 1 0 1 1 0 8 0 sessionpl 144 44 0 28 1 0 1 1 0 8 0 pgrppl 48 76 0 60 1 0 1 1 0 8 0 ucredpl 96 4052 0 4040 1 0 1 1 0 8 0 zombiepl 144 11293 0 11291 6 5 1 1 0 8 0 processpl 1064 11352 0 11291 5 0 5 5 0 8 0 procpl 672 28160 0 28090 24 16 8 9 0 8 1 srpgc 96 34 0 34 4 4 0 1 0 8 0 sosppl 168 92 0 92 5 5 0 1 0 8 0 sockpl 480 13758 0 13733 329 317 12 29 0 8 8 mcl64k 65536 42 0 0 5 2 3 5 0 8 0 mcl16k 16384 25 0 0 4 1 3 3 0 8 0 mcl12k 12288 30 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 41 0 0 4 1 3 3 0 8 0 mcl4k 4096 32 0 0 4 1 3 3 0 8 0 mcl2k2 2112 11 0 0 1 0 1 1 0 8 0 mcl2k 2048 968 0 0 31 4 27 28 0 8 0 mtagpl 96 427 0 0 9 0 9 9 0 8 0 mbufpl 256 1422 0 0 47 3 44 46 0 8 0 bufpl 288 20945 0 14609 453 0 453 453 0 8 0 anonpl 24 3052600 0 3041891 188 98 90 98 0 186 0 amapchunkpl 152 328447 0 327858 91 61 30 41 0 158 0 amappl16 200 28854 0 28547 123 105 18 32 0 8 0 amappl15 192 1661 0 1657 1 0 1 1 0 8 0 amappl14 184 2921 0 2917 2 1 1 1 0 8 0 amappl13 176 204 0 202 1 0 1 1 0 8 0 amappl12 168 1543 0 1538 1 0 1 1 0 8 0 amappl11 160 371 0 356 1 0 1 1 0 8 0 amappl10 152 1872 0 1861 1 0 1 1 0 8 0 amappl9 144 2022 0 2017 1 0 1 1 0 8 0 amappl8 136 3522 0 3345 7 0 7 7 0 8 0 amappl7 128 2416 0 2402 1 0 1 1 0 8 0 amappl6 120 1800 0 1775 2 1 1 2 0 8 0 amappl5 112 11782 0 11767 1 0 1 1 0 8 0 amappl4 104 2805 0 2774 1 0 1 1 0 8 0 amappl3 96 2122 0 2111 1 0 1 1 0 8 0 amappl2 88 1602 0 1541 3 1 2 3 0 8 0 amappl1 80 197929 0 197436 20 6 14 19 0 8 0 amappl 88 136095 0 135865 9 1 8 8 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 152 0 22 3 0 3 3 0 8 0 uaddrrnd 24 11333 0 11293 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 11333 0 11293 1 0 1 1 0 8 0 vmmpekpl 168 74103 0 74043 5 1 4 4 0 8 0 vmmpepl 168 994355 0 992338 268 154 114 126 0 357 0 vmsppl 368 11332 0 11293 6 1 5 5 0 8 0 rwobjpl 56 238619 0 231214 113 6 107 109 0 8 0 pdppl 4096 22673 0 22603 783 699 84 88 0 8 14 pvpl 32 5451668 0 5437230 369 219 150 245 0 265 1 pmappl 248 11332 0 11293 6 3 3 4 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1730 0 820 27 0 27 27 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{0}> trace x86_ipi_db(ffffffff82976ff0) 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+0x2f kd_curproc sys/dev/kcov.c:578 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x2f sys/dev/kcov.c:148 __mp_lock(ffffffff82b2e6a8) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82b2e6a8) at __mp_lock+0x133 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x1f uvm_pagezero_thread(ffff800021142fc8) at uvm_pagezero_thread+0x12c sys/uvm/uvm_pmemrange.c:2179 end trace frame: 0x0, count: -8 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(ffffffff82ac08d8,ffff800000cbb000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84 pf_remove_if_empty_ruleset(ffff800000cbb490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300 pfi_dynaddr_setup(ffff800000d37e00,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:485 pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff80002af38550) at pfioctl+0x859d pf_addr_setup sys/net/pf_ioctl.c:892 [inline] pfioctl(4900,cd60441a,ffff800000bf5000,3,ffff80002af38550) at pfioctl+0x859d sys/net/pf_ioctl.c:1652 VOP_IOCTL(fffffd806f76ec68,cd60441a,ffff800000bf5000,3,fffffd807f7d86c0,ffff80002af38550) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264 vn_ioctl(fffffd8075aed150,cd60441a,ffff800000bf5000,ffff80002af38550) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531 sys_ioctl(ffff80002af38550,ffff800021216cc8,ffff800021216d20) at sys_ioctl+0x4a2 syscall(ffff800021216d90) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021216d90) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x85476c90710, count: -9