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(ffffffff82a01960,ffff800000c51000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84
pf_remove_if_empty_ruleset(ffff800000c51490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300
pfi_dynaddr_setup(ffff800000c3fd60,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:487
pfioctl(4900,cd60441a,ffff800000bf5000,2,ffff8000fffeb260) at pfioctl+0x8d37 pf_addr_setup sys/net/pf_ioctl.c:894 [inline]
pfioctl(4900,cd60441a,ffff800000bf5000,2,ffff8000fffeb260) at pfioctl+0x8d37 sys/net/pf_ioctl.c:1653
VOP_IOCTL(fffffd806f678b88,cd60441a,ffff800000bf5000,2,fffffd807f7d77e0,ffff8000fffeb260) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264
vn_ioctl(fffffd806a4792f8,cd60441a,ffff800000bf5000,ffff8000fffeb260) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531
sys_ioctl(ffff8000fffeb260,ffff80002e38c368,ffff80002e38c3c0) at sys_ioctl+0x4a2
syscall(ffff80002e38c430) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002e38c430) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x90a25f9d190, count: -9
ddb{0}> show registers
rdi 0xffff800022c51000
rsi 0xfc8
rbp 0xffff80002e38be40
rbx 0xffffffff82a01960 pf_anchors
rdx 0xffff800022c51000
rcx 0xfc7
rax 0xffffffff813934cb pf_anchor_global_RB_REMOVE+0x2b
r8 0x400
r9 0x8080808080808080
r10 0xb9d9afa388b9f452
r11 0x7a482a7d714a2808
r12 0xe04ee2749d3c709c
r13 0xffffffff82a01968 pf_main_anchor
r14 0xffff800000c51000
r15 0xdeaf007fdeafbead
rip 0xffffffff813934f8 pf_anchor_global_RB_REMOVE+0x58
cs 0x8
rflags 0x10286 __ALIGN_SIZE+0xf286
rsp 0xffff80002e38bdf0
ss 0x10
pf_anchor_global_RB_REMOVE+0x58: movq 0(%r12),%rbx
ddb{0}> show proc
PROC (syz-executor.1) pid=374808 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=68, nice=20
forw=0xffffffffffffffff, list=0xffff8000fffead20,0xffff8000fffeb7b0
process=0xffff8000ffff0c88 user=0xffff80002e387000, vmspace=0xfffffd807effdcf0
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
97656 460034 62707 0 2 0 syz-executor.1
*97656 374808 62707 0 7 0x4000000 syz-executor.1
65395 311033 61128 0 2 0 syz-executor.5
65395 416800 61128 0 2 0x4000000 syz-executor.5
34627 108650 62173 0 2 0 syz-executor.4
69096 423268 46250 0 2 0 syz-executor.3
69096 159395 46250 0 2 0x4000000 syz-executor.3
73937 431509 4595 0 2 0 syz-executor.7
7048 89766 50112 0 2 0 syz-executor.0
7048 208224 50112 0 2 0x4000000 syz-executor.0
21099 373840 30591 0 2 0 syz-executor.2
21099 267671 30591 0 3 0x4000080 fsleep syz-executor.2
60197 259395 40121 0 2 0 syz-executor.6
60197 288395 40121 0 3 0x4000080 fsleep syz-executor.6
60197 375318 40121 0 3 0x4000080 fsleep syz-executor.6
60197 246515 40121 0 3 0x4000080 fsleep syz-executor.6
60197 497157 40121 0 7 0x4000000 syz-executor.6
30591 435166 1342 0 3 0x82 nanoslp syz-executor.2
50112 84504 1342 0 2 0x2 syz-executor.0
62173 267916 1342 0 2 0x2 syz-executor.4
46250 309834 1342 0 3 0x82 nanoslp syz-executor.3
35740 372830 0 0 3 0x14200 bored sosplice
61128 198786 1342 0 3 0x82 nanoslp syz-executor.5
4595 199877 1342 0 2 0x2 syz-executor.7
40121 205879 1342 0 3 0x82 nanoslp syz-executor.6
62707 142639 1342 0 3 0x82 nanoslp syz-executor.1
1342 424512 94005 0 3 0x82 kqread syz-fuzzer
1342 519557 94005 0 3 0x4000082 thrsleep syz-fuzzer
1342 248693 94005 0 3 0x4000082 thrsleep syz-fuzzer
1342 1483 94005 0 3 0x4000082 thrsleep syz-fuzzer
1342 287226 94005 0 3 0x4000082 thrsleep syz-fuzzer
1342 94824 94005 0 3 0x4000082 thrsleep syz-fuzzer
1342 228939 94005 0 3 0x4000082 thrsleep syz-fuzzer
1342 516180 94005 0 3 0x4000082 thrsleep syz-fuzzer
94005 189555 17236 0 3 0x10008a sigsusp ksh
17236 404050 88721 0 3 0x9a kqread sshd
31722 267554 1 0 3 0x100083 ttyin getty
88721 226187 1 0 3 0x88 kqread sshd
6172 417585 96923 74 3 0x1100092 bpf pflogd
96923 153084 1 0 3 0x80 netio pflogd
13050 4028 83917 73 3 0x1100090 kqread syslogd
83917 24405 1 0 3 0x100082 netio syslogd
89032 382696 1 0 3 0x100080 kqread resolvd
37005 152100 25245 77 3 0x100092 kqread dhcpleased
27586 180787 25245 77 3 0x100092 kqread dhcpleased
25245 57009 1 0 3 0x80 kqread dhcpleased
37268 266194 0 0 3 0x14200 bored smr
46354 322612 0 0 2 0x14200 zerothread
81413 412381 0 0 3 0x14200 aiodoned aiodoned
39831 386308 0 0 3 0x14200 syncer update
46419 76228 0 0 3 0x14200 cleaner cleaner
74178 276498 0 0 3 0x14200 reaper reaper
53184 277753 0 0 3 0x14200 pgdaemon pagedaemon
22261 54390 0 0 3 0x14200 bored viomb
40797 501677 0 0 3 0x40014200 acpi0 acpi0
38766 446752 0 0 3 0x40014200 idle1
40527 416713 0 0 3 0x14200 bored softnet
53675 76009 0 0 3 0x14200 bored softnet
69708 61190 0 0 3 0x14200 bored softnet
75705 442498 0 0 3 0x14200 bored softnet
68342 489967 0 0 3 0x14200 bored systqmp
33344 498781 0 0 3 0x14200 bored systq
95337 182556 0 0 3 0x40014200 bored softclock
18046 431114 0 0 3 0x40014200 idle0
1 400102 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 97656 (syz-executor.1) thread 0xffff8000fffeb260 (374808)
exclusive rwlock pf_lock r = 0 (0xffffffff82947dc0)
#0 witness_lock+0x44d
#1 pfioctl+0x5dc6 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 (0xffffffff8296fdc0)
#0 witness_lock+0x44d
#1 pfioctl+0x38b8 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 (0xffffffff82947e20)
#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 (0xffffffff82a009d0)
#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 10204 6485K 6816K 78643K 13133 0
pcb 14 12K 14K 78643K 385 0
rtable 214 8K 9K 78643K 739 0
ifaddr 85 18K 18K 78643K 236 0
sysctl 3 1K 1K 78643K 3 0
counters 54 35K 35K 78643K 100 0
ioctlops 1 4K 4K 78643K 2368 0
iov 0 0K 32K 78643K 317 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 5 0
vnodes 1333 83K 83K 78643K 2150 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 5K 78643K 24 0
VM map 2 1K 1K 78643K 2 0
sem 12 0K 0K 78643K 192 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 18 65K 89K 78643K 1780 0
sigio 0 0K 0K 78643K 81 0
proc 70 91K 128K 78643K 743 0
subproc 104 6K 6K 78643K 195 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 117 0
in_multi 87 5K 6K 78643K 236 0
ether_multi 1 0K 0K 78643K 4 0
mrt 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 181 811K 811K 78643K 181 0
exec 0 0K 2K 78643K 977 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 268 181K 186K 78643K 12204 0
UVM aobj 131 4K 4K 78643K 134 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 75 0
NDP 12 0K 2K 78643K 66 0
temp 142 4756K 4999K 78643K 35571 0
kqueue 13 20K 26K 78643K 175 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 72 0 69 1 0 1 1 0 8 0
rtentry 112 224 0 132 4 0 4 4 0 8 0
unpcb 136 939 0 924 10 9 1 6 0 8 0
syncache 296 6 0 6 2 2 0 1 0 8 0
tcpqe 32 49 0 49 2 2 0 1 0 8 0
tcpcb 736 2133 0 2060 36 29 7 19 0 8 0
arp 120 34 0 20 1 0 1 1 0 8 0
inpcb 312 3066 0 3055 36 20 16 16 0 8 14
nd6 48 51 0 32 1 0 1 1 0 8 0
pkpcb 40 4 0 4 1 1 0 1 0 8 0
kcovpl 48 15 0 7 1 0 1 1 0 8 0
ppxss 1248 6 0 6 2 1 1 1 0 8 1
pfstscr 40 8 0 8 1 1 0 1 0 8 0
pffrag 232 3 0 1 1 0 1 1 0 482 0
pffrnode 88 3 0 1 1 0 1 1 0 8 0
pffrent 40 11 0 9 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 4 1 1 1 0 1 1 0 8 0
pftag 88 3 0 0 1 0 1 1 0 8 0
pfqueue 264 549 0 549 2 1 1 1 0 8 1
pfstitem 24 29 0 25 1 0 1 1 0 8 0
pfstkey 112 37 0 33 1 0 1 1 0 8 0
pfstate 336 33 0 29 2 0 2 2 0 8 0
pfrule 1360 94 0 72 3 1 2 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 1042 0 633 29 3 26 29 0 8 0
art_table 32 1043 0 633 4 0 4 4 0 8 0
art_node 16 219 0 135 1 0 1 1 0 8 0
sysvmsgpl 40 19 0 9 2 1 1 1 0 8 0
semapl 112 190 0 180 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 3690 0 2245 91 0 91 91 0 8 0
ffsino 272 3690 0 2245 97 0 97 97 0 8 0
nchpl 144 6050 0 4404 63 0 63 63 0 8 0
uvmvnodes 80 4283 0 0 88 0 88 88 0 8 0
vnodes 224 4283 0 0 252 0 252 252 0 8 0
namei 1024 22666 0 22666 3 2 1 2 0 8 1
percpumem 16 62 0 23 1 0 1 1 0 8 0
vcpupl 2048 8 0 0 1 0 1 1 0 8 0
vmpool 560 12 0 4 1 0 1 1 0 8 0
pfiaddrpl 120 1 0 0 1 0 1 1 0 8 0
kstatmem 264 70 0 46 2 0 2 2 0 8 0
scxspl 216 17202 0 17202 11 10 1 8 0 8 1
plimitpl 152 253 0 238 1 0 1 1 0 8 0
sigapl 424 2071 0 2022 8 2 6 7 0 8 0
futexpl 64 15317 0 15313 1 0 1 1 0 8 0
knotepl 120 287 0 0 7 0 7 7 0 8 0
kqueuepl 216 391 0 381 9 8 1 5 0 8 0
pipepl 336 540 0 512 16 13 3 8 0 8 0
fdescpl 496 2053 0 2022 5 1 4 5 0 8 0
filepl 152 15350 0 15104 28 11 17 19 0 8 5
lockfpl 104 923 0 921 2 1 1 2 0 8 0
lockfspl 48 212 0 210 1 0 1 1 0 8 0
sessionpl 144 31 0 14 1 0 1 1 0 8 0
pgrppl 48 31 0 14 1 0 1 1 0 8 0
ucredpl 96 2204 0 2192 1 0 1 1 0 8 0
zombiepl 144 2022 0 2022 1 0 1 1 0 8 1
processpl 1064 2071 0 2022 4 0 4 4 0 8 0
procpl 672 5286 0 5221 12 6 6 8 0 8 0
srpgc 96 14 0 14 3 3 0 1 0 8 0
sosppl 168 12 0 12 1 0 1 1 0 8 1
sockpl 480 4081 0 4052 83 55 28 28 0 8 23
mcl64k 65536 17 0 0 3 0 3 3 0 8 0
mcl16k 16384 11 0 0 2 0 2 2 0 8 0
mcl12k 12288 17 0 0 2 0 2 2 0 8 0
mcl9k 9216 7 0 0 1 0 1 1 0 8 0
mcl8k 8192 13 0 0 2 0 2 2 0 8 0
mcl4k 4096 17 0 0 3 0 3 3 0 8 0
mcl2k2 2112 5 0 0 1 0 1 1 0 8 0
mcl2k 2048 158 0 0 19 0 19 19 0 8 0
mtagpl 96 157 0 0 4 0 4 4 0 8 0
mbufpl 256 418 0 0 24 0 24 24 0 8 0
bufpl 288 5990 0 157 417 0 417 417 0 8 0
anonpl 24 365920 0 347990 120 6 114 114 0 186 3
amapchunkpl 152 33054 0 32328 34 4 30 30 0 158 1
amappl16 200 4066 0 3520 30 0 30 30 0 8 1
amappl15 192 289 0 286 1 0 1 1 0 8 0
amappl14 184 324 0 319 1 0 1 1 0 8 0
amappl13 176 134 0 133 1 0 1 1 0 8 0
amappl12 168 7 0 4 1 0 1 1 0 8 0
amappl11 160 244 0 222 2 0 2 2 0 8 0
amappl10 152 662 0 650 1 0 1 1 0 8 0
amappl9 144 907 0 897 1 0 1 1 0 8 0
amappl8 136 715 0 662 2 0 2 2 0 8 0
amappl7 128 151 0 141 1 0 1 1 0 8 0
amappl6 120 653 0 634 2 1 1 2 0 8 0
amappl5 112 2117 0 2093 1 0 1 1 0 8 0
amappl4 104 1370 0 1343 2 1 1 2 0 8 0
amappl3 96 5377 0 5326 2 0 2 2 0 8 0
amappl2 88 2474 0 2413 3 1 2 3 0 8 0
amappl1 80 50728 0 50046 21 6 15 20 0 8 0
amappl 88 11599 0 11422 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 133 0 3 3 0 3 3 0 8 0
uaddrrnd 24 2065 0 2026 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 2065 0 2026 1 0 1 1 0 8 0
vmmpekpl 168 20935 0 20886 3 0 3 3 0 8 0
vmmpepl 168 202255 0 199550 139 17 122 123 0 357 4
vmsppl 368 2064 0 2026 5 1 4 4 0 8 0
rwobjpl 56 54292 0 48299 85 0 85 85 0 8 0
pdppl 4096 4137 0 4060 188 111 77 81 0 8 0
pvpl 32 838892 0 815866 259 70 189 242 0 265 3
pmappl 248 2064 0 2026 4 1 3 3 0 8 0
extentpl 40 58 0 38 1 0 1 1 0 8 0
phpool 112 984 0 182 23 0 23 23 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
pf_anchor_global_RB_REMOVE(ffffffff82a01960,ffff800000c51000) at pf_anchor_global_RB_REMOVE+0x58 sys/net/pf_ruleset.c:84
pf_remove_if_empty_ruleset(ffff800000c51490) at pf_remove_if_empty_ruleset+0xdd sys/net/pf_ruleset.c:300
pfi_dynaddr_setup(ffff800000c3fd60,0) at pfi_dynaddr_setup+0x411 sys/net/pf_if.c:487
pfioctl(4900,cd60441a,ffff800000bf5000,2,ffff8000fffeb260) at pfioctl+0x8d37 pf_addr_setup sys/net/pf_ioctl.c:894 [inline]
pfioctl(4900,cd60441a,ffff800000bf5000,2,ffff8000fffeb260) at pfioctl+0x8d37 sys/net/pf_ioctl.c:1653
VOP_IOCTL(fffffd806f678b88,cd60441a,ffff800000bf5000,2,fffffd807f7d77e0,ffff8000fffeb260) at VOP_IOCTL+0x96 sys/kern/vfs_vops.c:264
vn_ioctl(fffffd806a4792f8,cd60441a,ffff800000bf5000,ffff8000fffeb260) at vn_ioctl+0xbc sys/kern/vfs_vnops.c:531
sys_ioctl(ffff8000fffeb260,ffff80002e38c368,ffff80002e38c3c0) at sys_ioctl+0x4a2
syscall(ffff80002e38c430) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002e38c430) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x90a25f9d190, 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(ffffffff82a007c8) at __mp_lock+0x120 __mp_lock_spin sys/kern/kern_lock.c:117 [inline]
__mp_lock(ffffffff82a007c8) at __mp_lock+0x120 sys/kern/kern_lock.c:147
end trace frame: 0x0, count: -4