Warning: Permanently added '10.128.10.54' (ECDSA) to the list of known hosts. panic: rw_enter: pf_state_lock locking against myself Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *279647 16600 0 0x2 0 0K syz-executor3072 432111 92255 0 0x12 0 1 sshd db_enter() at db_enter+0x18 panic(ffffffff8240652b) at panic+0x15e rw_enter(ffffffff826db7e0,1) at rw_enter+0x4bd pf_state_insert(ffff800000adb900,ffff800021255728,ffff800021255730,fffffd806dd4d500) at pf_state_insert+0xa0 pfsync_state_import(ffff800000af7800,1) at pfsync_state_import+0xcbe pfioctl(4900,c1084425,ffff800000af7800,3,ffff8000ffff62b0) at pfioctl+0x50ac VOP_IOCTL(fffffd806f734e20,c1084425,ffff800000af7800,3,fffffd807f7b7b40,ffff8000ffff62b0) at VOP_IOCTL+0x9a vn_ioctl(fffffd80769f1850,c1084425,ffff800000af7800,ffff8000ffff62b0) at vn_ioctl+0xba sys_ioctl(ffff8000ffff62b0,ffff800021255bd8,ffff800021255c20) at sys_ioctl+0x4b0 syscall(ffff800021255ca0) at syscall+0x4a1 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff0fe0, count: 4 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic rw_enter: pf_state_lock locking against myself ddb{0}> trace db_enter() at db_enter+0x18 panic(ffffffff8240652b) at panic+0x15e rw_enter(ffffffff826db7e0,1) at rw_enter+0x4bd pf_state_insert(ffff800000adb900,ffff800021255728,ffff800021255730,fffffd806dd4d500) at pf_state_insert+0xa0 pfsync_state_import(ffff800000af7800,1) at pfsync_state_import+0xcbe pfioctl(4900,c1084425,ffff800000af7800,3,ffff8000ffff62b0) at pfioctl+0x50ac VOP_IOCTL(fffffd806f734e20,c1084425,ffff800000af7800,3,fffffd807f7b7b40,ffff8000ffff62b0) at VOP_IOCTL+0x9a vn_ioctl(fffffd80769f1850,c1084425,ffff800000af7800,ffff8000ffff62b0) at vn_ioctl+0xba sys_ioctl(ffff8000ffff62b0,ffff800021255bd8,ffff800021255c20) at sys_ioctl+0x4b0 syscall(ffff800021255ca0) at syscall+0x4a1 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff0fe0, count: -11 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800021255530 rbx 0xffff800021255540 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff82038635 kprintf+0x145 r9 0x1 r10 0x3a6f08322340f3e1 r11 0x22dbb03e63656df8 r12 0x3000000008 r13 0xffff8000212555e0 r14 0x100 r15 0x1 rip 0xffffffff81c04668 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021255520 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor3072) pid=279647 stat=onproc flags process=2 proc=0 pri=54, usrpri=55, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff6010,0xffffffff828cbd48 process=0xffff8000212376e8 user=0xffff800021250000, vmspace=0xfffffd806e948a18 estcpu=5, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *16600 279647 62086 0 7 0x2 syz-executor3072 62086 100385 92255 0 3 0x10008a sigsusp ksh 92255 432111 64400 0 7 0x12 sshd 90647 150394 1 0 3 0x100083 ttyin getty 64400 299062 1 0 3 0x80 select sshd 92828 247135 71520 74 3 0x100092 bpf pflogd 71520 452185 1 0 3 0x80 netio pflogd 41095 79346 95277 73 3 0x100090 kqread syslogd 95277 172774 1 0 3 0x100082 netio syslogd 44780 343037 1 77 3 0x100090 poll dhclient 86168 41528 1 0 3 0x80 poll dhclient 28066 337397 0 0 3 0x14200 bored smr 4255 140581 0 0 3 0x14200 pgzero zerothread 48692 307575 0 0 3 0x14200 aiodoned aiodoned 15961 70396 0 0 3 0x14200 syncer update 27004 275755 0 0 3 0x14200 cleaner cleaner 80014 489626 0 0 3 0x14200 reaper reaper 4454 331981 0 0 3 0x14200 pgdaemon pagedaemon 14703 345811 0 0 3 0x14200 bored crynlk 77957 349499 0 0 3 0x14200 bored crypto 16268 514885 0 0 3 0x14200 bored viomb 89871 482410 0 0 3 0x40014200 acpi0 acpi0 19546 72474 0 0 3 0x40014200 idle1 40301 254176 0 0 3 0x14200 bored softnet 33966 270639 0 0 3 0x14200 bored systqmp 41366 199400 0 0 3 0x14200 bored systq 51783 218734 0 0 3 0x40014200 bored softclock 1502 354202 0 0 3 0x40014200 idle0 1 388830 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 16600 (syz-executor3072) thread 0xffff8000ffff62b0 (279647) exclusive rwlock pf_state_lock r = 0 (0xffffffff826db7f0) #0 witness_lock+0x4b0 #1 pfioctl+0x509f #2 VOP_IOCTL+0x9a #3 vn_ioctl+0xba #4 sys_ioctl+0x4b0 #5 syscall+0x4a1 #6 Xsyscall+0x128 exclusive rwlock pf_lock r = 0 (0xffffffff826db7c0) #0 witness_lock+0x4b0 #1 pfioctl+0x5093 #2 VOP_IOCTL+0x9a #3 vn_ioctl+0xba #4 sys_ioctl+0x4b0 #5 syscall+0x4a1 #6 Xsyscall+0x128 exclusive rwlock netlock r = 0 (0xffffffff82721440) #0 witness_lock+0x4b0 #1 pfioctl+0x2de3 #2 VOP_IOCTL+0x9a #3 vn_ioctl+0xba #4 sys_ioctl+0x4b0 #5 syscall+0x4a1 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828cbf70) #0 witness_lock+0x4b0 #1 vn_ioctl+0x40 #2 sys_ioctl+0x4b0 #3 syscall+0x4a1 #4 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9475 6411K 6412K 78643K 10565 0 pcb 13 8K 8K 78643K 13 0 rtable 61 2K 2K 78643K 127 0 ifaddr 30 8K 8K 78643K 31 0 counters 40 33K 33K 78643K 40 0 ioctlops 1 0K 4K 78643K 1468 0 mount 1 1K 1K 78643K 1 0 vnodes 1183 74K 75K 78643K 1188 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 1 0K 0K 78643K 1 0 proc 59 63K 71K 78643K 367 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 11 0K 0K 78643K 11 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 19 95K 95K 78643K 19 0 exec 0 0K 2K 78643K 302 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 35 2K 2K 78643K 592 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 4 0K 0K 78643K 4 0 temp 23 3961K 4025K 78643K 1687 0 kqueue 2 2K 2K 78643K 2 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 arp 64 2 0 0 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 120 15 0 13 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 unpcb 120 29 0 19 1 0 1 1 0 8 0 syncache 296 5 0 5 1 0 1 1 0 8 1 tcpcb 736 8 0 5 1 0 1 1 0 8 0 inpcb 304 29 0 23 1 0 1 1 0 8 0 pfstscr 40 2 0 0 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 pfstitem 24 9 0 0 1 0 1 1 0 8 0 pfstkey 112 11 0 0 1 0 1 1 0 8 0 pfstate 320 10 0 0 1 0 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 97 0 0 7 0 7 7 0 8 0 art_table 32 98 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1398 0 16 87 0 87 87 0 8 0 ffsino 272 1398 0 16 93 0 93 93 0 8 0 nchpl 144 1572 0 33 58 0 58 58 0 8 0 uvmvnodes 72 1408 0 0 26 0 26 26 0 8 0 vnodes 224 1408 0 0 83 0 83 83 0 8 0 namei 1024 3781 0 3781 1 0 1 1 0 8 1 percpumem 16 31 0 0 1 0 1 1 0 8 0 scxspl 216 3391 0 3391 2 1 1 2 0 8 1 plimitpl 152 14 0 8 1 0 1 1 0 8 0 sigapl 424 221 0 192 4 0 4 4 0 8 0 knotepl 112 5 0 0 1 0 1 1 0 8 0 kqueuepl 168 1 0 0 1 0 1 1 0 8 0 pipepl 336 64 0 60 1 0 1 1 0 8 0 fdescpl 496 205 0 192 3 0 3 3 0 8 0 filepl 152 958 0 909 2 0 2 2 0 8 0 lockfpl 104 5 0 4 1 0 1 1 0 8 0 lockfspl 48 3 0 2 1 0 1 1 0 8 0 sessionpl 144 18 0 9 1 0 1 1 0 8 0 pgrppl 48 18 0 9 1 0 1 1 0 8 0 ucredpl 96 62 0 53 1 0 1 1 0 8 0 zombiepl 144 192 0 192 1 0 1 1 0 8 1 processpl 1080 221 0 192 3 0 3 3 0 8 0 procpl 672 221 0 192 3 0 3 3 0 8 0 sockpl 432 73 0 55 3 0 3 3 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 72 0 0 9 0 9 9 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 90 0 0 6 0 6 6 0 8 0 bufpl 280 1994 0 112 135 0 135 135 0 8 0 anonpl 24 20112 0 18876 10 1 9 10 0 186 1 amapchunkpl 152 527 0 490 3 1 2 3 0 158 0 amappl16 200 77 0 72 1 0 1 1 0 8 0 amappl15 192 1 0 0 1 0 1 1 0 8 0 amappl14 184 22 0 19 1 0 1 1 0 8 0 amappl13 176 14 0 13 1 0 1 1 0 8 0 amappl12 168 9 0 9 1 0 1 1 0 8 1 amappl11 160 53 0 38 1 0 1 1 0 8 0 amappl10 152 12 0 10 1 0 1 1 0 8 0 amappl9 144 230 0 230 2 1 1 1 0 8 1 amappl8 136 60 0 59 1 0 1 1 0 8 0 amappl7 128 211 0 210 1 0 1 1 0 8 0 amappl6 120 56 0 49 1 0 1 1 0 8 0 amappl5 112 353 0 335 1 0 1 1 0 8 0 amappl4 104 273 0 251 1 0 1 1 0 8 0 amappl3 96 107 0 99 1 0 1 1 0 8 0 amappl2 88 819 0 768 2 0 2 2 0 8 0 amappl1 80 14582 0 14153 17 6 11 17 0 8 0 amappl 88 403 0 383 1 0 1 1 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 64 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 205 0 192 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 205 0 192 1 0 1 1 0 8 0 vmmpekpl 168 5591 0 5575 1 0 1 1 0 8 0 vmmpepl 168 30005 0 29176 48 7 41 48 0 357 2 vmsppl 368 204 0 192 2 0 2 2 0 8 0 rwobjpl 56 7746 0 7191 13 4 9 13 0 8 1 pdppl 4096 417 0 384 45 12 33 39 0 8 0 pvpl 32 81237 0 78242 28 0 28 28 0 265 3 pmappl 232 204 0 192 1 0 1 1 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 262 0 15 8 0 8 8 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 panic(ffffffff8240652b) at panic+0x15e rw_enter(ffffffff826db7e0,1) at rw_enter+0x4bd pf_state_insert(ffff800000adb900,ffff800021255728,ffff800021255730,fffffd806dd4d500) at pf_state_insert+0xa0 pfsync_state_import(ffff800000af7800,1) at pfsync_state_import+0xcbe pfioctl(4900,c1084425,ffff800000af7800,3,ffff8000ffff62b0) at pfioctl+0x50ac VOP_IOCTL(fffffd806f734e20,c1084425,ffff800000af7800,3,fffffd807f7b7b40,ffff8000ffff62b0) at VOP_IOCTL+0x9a vn_ioctl(fffffd80769f1850,c1084425,ffff800000af7800,ffff8000ffff62b0) at vn_ioctl+0xba sys_ioctl(ffff8000ffff62b0,ffff800021255bd8,ffff800021255c20) at sys_ioctl+0x4b0 syscall(ffff800021255ca0) at syscall+0x4a1 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff0fe0, count: -11 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d68ff0) at x86_ipi_db+0x1a x86_ipi_handler() at x86_ipi_handler+0xb7 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff828cbd68) at __mp_lock+0x122 syscall(ffff80002120cc50) at syscall+0x3fd Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffeab70, count: 9 ddb{1}> trace x86_ipi_db(ffff800020d68ff0) at x86_ipi_db+0x1a x86_ipi_handler() at x86_ipi_handler+0xb7 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff828cbd68) at __mp_lock+0x122 syscall(ffff80002120cc50) at syscall+0x3fd Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffeab70, count: -6 ddb{1}>