panic: kernel diagnostic assertion "(rule != NULL) && (rule->ruleset != NULL)" failed: file "/syzkaller/managers/multicore/kernel/sys/net/pf_ioctl.c", line 330 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *417001 31539 0 0x14000 0x200 1K systq 92902 77408 0 0x14000 0x40000200 0 softclock db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8244cf87) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff824be1c4,ffffffff824f7e76,14a,ffffffff824840b5) at __assert+0x25 sys/kern/subr_prf.c:161 pf_purge_rule(ffff800000c53010) at pf_purge_rule+0x1ab sys/net/pf_ioctl.c:330 pf_purge_expired_rules() at pf_purge_expired_rules+0xbc sys/net/pf.c:1275 pf_purge(ffffffff82981d30) at pf_purge+0xe0 sys/net/pf.c:1312 taskq_thread(ffffffff827f67a0) at taskq_thread+0xe6 sys/kern/kern_task.c:449 end trace frame: 0x0, count: 8 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: kernel diagnostic assertion "(rule != NULL) && (rule->ruleset != NULL)" failed: file "/syzkaller/managers/multicore/kernel/sys/net/pf_ioctl.c", line 330 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8244cf87) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff824be1c4,ffffffff824f7e76,14a,ffffffff824840b5) at __assert+0x25 sys/kern/subr_prf.c:161 pf_purge_rule(ffff800000c53010) at pf_purge_rule+0x1ab sys/net/pf_ioctl.c:330 pf_purge_expired_rules() at pf_purge_expired_rules+0xbc sys/net/pf.c:1275 pf_purge(ffffffff82981d30) at pf_purge+0xe0 sys/net/pf.c:1312 taskq_thread(ffffffff827f67a0) at taskq_thread+0xe6 sys/kern/kern_task.c:449 end trace frame: 0x0, count: -7 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002115ba50 rbx 0xffff800020d39bff rdx 0x8b rcx 0x2 rax 0xa0 r8 0xffffffff817eb474 kprintf+0x144 r9 0x1 r10 0xb5c077aec4910eca r11 0x3310a9ace032753d r12 0xffff800020d39a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81552b08 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002115ba40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (systq) pid=417001 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000211497a0,0xffff8000211487f0 process=0xffff8000ffffe568 user=0xffff800021156000, vmspace=0xffffffff828c32f0 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 22933 300773 86482 0 3 0x80 nanoslp syz-executor.0 22933 467653 86482 0 3 0x4000080 kqsel syz-executor.0 22933 6132 86482 0 3 0x4000080 kqread syz-executor.0 22933 63922 86482 0 3 0x4000080 fsleep syz-executor.0 83266 74001 8551 0 3 0x82 piperd syz-executor.1 86482 2794 8551 0 2 0x482 syz-executor.0 61980 163216 0 0 3 0x14200 bored sosplice 8551 249765 85689 0 3 0x82 thrsleep syz-fuzzer 8551 414254 85689 0 3 0x4000082 thrsleep syz-fuzzer 8551 210109 85689 0 3 0x4000082 thrsleep syz-fuzzer 8551 117039 85689 0 3 0x4000082 thrsleep syz-fuzzer 8551 212814 85689 0 3 0x4000082 thrsleep syz-fuzzer 8551 46485 85689 0 3 0x4000082 thrsleep syz-fuzzer 8551 116820 85689 0 3 0x4000082 kqread syz-fuzzer 8551 324366 85689 0 3 0x4000082 thrsleep syz-fuzzer 85689 238016 92627 0 3 0x10008a sigsusp ksh 92627 291286 48143 0 3 0x9a kqread sshd 75862 256785 1 0 3 0x100083 ttyin getty 48143 216245 1 0 3 0x88 kqread sshd 60357 202137 14093 74 3 0x100092 bpf pflogd 14093 97474 1 0 3 0x80 netio pflogd 54620 438773 90541 73 3 0x100090 kqread syslogd 90541 291027 1 0 3 0x100082 netio syslogd 9412 388044 1 0 3 0x100080 kqread resolvd 19460 62969 56246 77 3 0x100092 kqread dhcpleased 64004 342666 56246 77 3 0x100092 kqread dhcpleased 56246 11316 1 0 3 0x80 kqread dhcpleased 91958 73683 0 0 3 0x14200 bored smr 68039 512821 0 0 3 0x14200 pgzero zerothread 21515 484229 0 0 3 0x14200 aiodoned aiodoned 91995 495959 0 0 3 0x14200 syncer update 44921 522584 0 0 3 0x14200 cleaner cleaner 2988 90984 0 0 3 0x14200 reaper reaper 65901 374745 0 0 3 0x14200 pgdaemon pagedaemon 52039 386674 0 0 3 0x14200 bored viomb 27230 157299 0 0 3 0x40014200 acpi0 acpi0 34580 498740 0 0 3 0x40014200 idle1 9039 252779 0 0 3 0x14200 bored softnet 54996 267429 0 0 2 0x14200 systqmp *31539 417001 0 0 7 0x14200 systq 77408 92902 0 0 7 0x40014200 softclock 79800 520984 0 0 3 0x40014200 idle0 1 339354 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 31539 (systq) thread 0xffff800021149500 (417001) exclusive rwlock pf_lock r = 0 (0xffffffff82768fb0) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 pf_purge+0xa9 sys/net/pf.c:1308 #2 taskq_thread+0xe6 sys/kern/kern_task.c:449 #3 proc_trampoline+0x1c exclusive rwlock netlock r = 0 (0xffffffff82814800) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 pf_purge+0x38 sys/net/pf.c:1306 #2 taskq_thread+0xe6 sys/kern/kern_task.c:449 #3 proc_trampoline+0x1c shared rwlock systq r = 0 (0xffffffff827f6810) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 taskq_thread+0xcb sys/kern/kern_task.c:445 #2 proc_trampoline+0x1c exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828ba480) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 __mp_acquire_count+0x4c sys/kern/kern_lock.c:227 #2 mi_switch+0x3d3 sys/kern/sched_bsd.c:416 #3 sleep_finish+0x1b2 sys/kern/kern_synch.c:433 #4 msleep+0x115 sys/kern/kern_synch.c:259 #5 taskq_next_work+0x6e sys/kern/kern_task.c:402 #6 taskq_thread+0x145 sys/kern/kern_task.c:442 #7 proc_trampoline+0x1c ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10139 6431K 6816K 78643K 14071 0 pcb 14 14K 16K 78643K 601 0 rtable 96 5K 7K 78643K 671 0 ifaddr 45 11K 13K 78643K 297 0 sysctl 3 1K 1K 78643K 3 0 counters 44 34K 34K 78643K 120 0 ioctlops 0 0K 4K 78643K 1874 0 iov 0 0K 16K 78643K 183 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1305 82K 82K 78643K 2376 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 11 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 465 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 1977 0 sigio 0 0K 0K 78643K 52 0 proc 70 87K 99K 78643K 568 0 subproc 26 1K 1K 78643K 91 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 1 0K 0K 78643K 767 0 in_multi 28 2K 2K 78643K 282 0 ether_multi 2 0K 0K 78643K 50 0 mrt 0 0K 0K 78643K 8 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 151 678K 678K 78643K 151 0 exec 0 0K 2K 78643K 688 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 270 276K 276K 78643K 27450 0 UVM aobj 16 2K 2K 78643K 19 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 2 0K 0K 78643K 231 0 NDP 6 0K 0K 78643K 68 0 temp 84 4200K 4294K 78643K 18437 0 kqueue 13 20K 24K 78643K 129 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 192 0 189 4 2 2 3 0 8 1 rtentry 112 153 0 120 2 0 2 2 0 8 0 unpcb 128 924 0 909 13 10 3 5 0 8 2 syncache 296 6 0 6 2 2 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpcb 736 878 0 873 29 20 9 14 0 8 7 arp 120 17 0 11 1 0 1 1 0 8 0 inpcb 304 2651 0 2642 37 26 11 11 0 8 10 nd6 48 42 0 38 1 0 1 1 0 8 0 kcovpl 48 7 0 5 1 0 1 1 0 8 0 ppxss 1248 9 0 9 2 2 0 1 0 8 0 pfstscr 40 4 0 4 1 0 1 1 0 8 1 pffrag 232 5 0 4 2 1 1 1 0 482 0 pffrnode 88 5 0 4 2 1 1 1 0 8 0 pffrent 40 146 0 145 3 2 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 73 0 69 2 1 1 1 0 8 0 pfqueue 264 39 0 39 2 1 1 1 0 8 1 pfstitem 24 93 0 70 1 0 1 1 0 8 0 pfstkey 112 99 0 76 2 0 2 2 0 8 0 pfstate 320 95 0 72 4 0 4 4 0 8 0 pfrule 1360 145 0 131 3 1 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 623 0 486 17 4 13 13 0 8 2 art_table 32 624 0 486 2 0 2 2 0 8 0 art_node 16 143 0 116 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 0 1 0 1 1 0 8 0 semapl 112 463 0 453 1 0 1 1 0 8 0 shmpl 112 16 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4226 0 2808 89 0 89 89 0 8 0 ffsino 272 4226 0 2808 95 0 95 95 0 8 0 nchpl 144 6917 0 5312 61 0 61 61 0 8 0 uvmvnodes 72 4830 0 0 88 0 88 88 0 8 0 vnodes 224 4830 0 0 285 0 285 285 0 8 0 namei 1024 24611 0 24611 4 3 1 1 0 8 1 percpumem 16 72 0 38 1 0 1 1 0 8 0 vcpupl 2048 17 0 0 3 0 3 3 0 8 0 vmpool 560 19 0 2 2 0 2 2 0 8 0 pfiaddrpl 120 25 0 19 2 1 1 1 0 8 0 scxspl 216 22693 0 22693 10 9 1 8 0 8 1 plimitpl 152 161 0 152 1 0 1 1 0 8 0 sigapl 424 2212 0 2179 4 0 4 4 0 8 0 futexpl 64 15641 0 15640 4 3 1 1 0 8 0 knotepl 112 73 0 0 2 0 2 2 0 8 0 kqueuepl 216 671 0 658 28 27 1 12 0 8 0 pipepl 336 1170 0 1160 27 18 9 11 0 8 8 fdescpl 496 2197 0 2179 3 0 3 3 0 8 0 filepl 152 17739 0 17631 42 29 13 14 0 8 8 lockfpl 104 734 0 732 3 2 1 3 0 8 0 lockfspl 48 250 0 248 2 1 1 2 0 8 0 sessionpl 144 23 0 12 1 0 1 1 0 8 0 pgrppl 48 27 0 16 1 0 1 1 0 8 0 ucredpl 96 3701 0 3689 1 0 1 1 0 8 0 zombiepl 144 2179 0 2179 1 0 1 1 0 8 1 processpl 1064 2212 0 2179 3 0 3 3 0 8 0 procpl 672 6435 0 6392 10 5 5 5 0 8 1 sosppl 168 11 0 11 3 3 0 1 0 8 0 sockpl 480 3767 0 3740 84 64 20 30 0 8 16 mcl64k 65536 8 0 0 1 0 1 1 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 24 0 0 3 1 2 3 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 180 0 0 20 1 19 20 0 8 0 mtagpl 96 264 0 0 7 0 7 7 0 8 0 mbufpl 256 734 0 0 44 0 44 44 0 8 0 bufpl 280 6613 0 284 453 0 453 453 0 8 0 anonpl 24 621918 0 604765 138 29 109 123 0 186 0 amapchunkpl 152 67077 0 66403 46 17 29 37 0 158 0 amappl16 200 5174 0 4617 44 13 31 40 0 8 1 amappl15 192 841 0 832 1 0 1 1 0 8 0 amappl14 184 12 0 7 1 0 1 1 0 8 0 amappl13 176 63 0 62 1 0 1 1 0 8 0 amappl12 168 718 0 716 1 0 1 1 0 8 0 amappl11 160 76 0 59 1 0 1 1 0 8 0 amappl10 152 98 0 92 1 0 1 1 0 8 0 amappl9 144 451 0 449 1 0 1 1 0 8 0 amappl8 136 629 0 588 2 0 2 2 0 8 0 amappl7 128 243 0 235 1 0 1 1 0 8 0 amappl6 120 275 0 266 1 0 1 1 0 8 0 amappl5 112 1532 0 1510 1 0 1 1 0 8 0 amappl4 104 720 0 698 1 0 1 1 0 8 0 amappl3 96 993 0 974 1 0 1 1 0 8 0 amappl2 88 3068 0 3023 5 3 2 2 0 8 0 amappl1 80 41730 0 41279 13 3 10 13 0 8 0 amappl 88 26999 0 26813 5 0 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 64 18 0 3 1 0 1 1 0 8 0 uaddrrnd 24 2216 0 2181 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2216 0 2181 1 0 1 1 0 8 0 vmmpekpl 168 22817 0 22786 2 0 2 2 0 8 0 vmmpepl 168 203079 0 201229 183 92 91 113 0 357 5 vmsppl 368 2215 0 2181 5 1 4 4 0 8 0 rwobjpl 56 51530 0 50172 24 4 20 22 0 8 0 pdppl 4096 4440 0 4379 85 22 63 65 0 8 2 pvpl 32 1137811 0 1117244 240 67 173 212 0 265 0 pmappl 224 2215 0 2181 3 0 3 3 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 435 0 73 11 0 11 11 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff827e2ff0) 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(ffffffff828ba278) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff828ba278) at __mp_lock+0x122 sys/kern/kern_lock.c:147 __mp_acquire_count(ffffffff828ba278,1) at __mp_acquire_count+0x4c sys/kern/kern_lock.c:227 mi_switch() at mi_switch+0x3d3 sys/kern/sched_bsd.c:416 sleep_finish(ffff800021155328,1) at sleep_finish+0x1b2 sys/kern/kern_synch.c:433 softclock_thread(ffff8000211497a0) at softclock_thread+0xd9 sys/kern/kern_timeout.c:797 end trace frame: 0x0, count: 7 ddb{0}> trace x86_ipi_db(ffffffff827e2ff0) 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(ffffffff828ba278) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff828ba278) at __mp_lock+0x122 sys/kern/kern_lock.c:147 __mp_acquire_count(ffffffff828ba278,1) at __mp_acquire_count+0x4c sys/kern/kern_lock.c:227 mi_switch() at mi_switch+0x3d3 sys/kern/sched_bsd.c:416 sleep_finish(ffff800021155328,1) at sleep_finish+0x1b2 sys/kern/kern_synch.c:433 softclock_thread(ffff8000211497a0) at softclock_thread+0xd9 sys/kern/kern_timeout.c:797 end trace frame: 0x0, count: -8 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8244cf87) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff824be1c4,ffffffff824f7e76,14a,ffffffff824840b5) at __assert+0x25 sys/kern/subr_prf.c:161 pf_purge_rule(ffff800000c53010) at pf_purge_rule+0x1ab sys/net/pf_ioctl.c:330 pf_purge_expired_rules() at pf_purge_expired_rules+0xbc sys/net/pf.c:1275 pf_purge(ffffffff82981d30) at pf_purge+0xe0 sys/net/pf.c:1312 taskq_thread(ffffffff827f67a0) at taskq_thread+0xe6 sys/kern/kern_task.c:449 end trace frame: 0x0, count: 8 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8244cf87) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff824be1c4,ffffffff824f7e76,14a,ffffffff824840b5) at __assert+0x25 sys/kern/subr_prf.c:161 pf_purge_rule(ffff800000c53010) at pf_purge_rule+0x1ab sys/net/pf_ioctl.c:330 pf_purge_expired_rules() at pf_purge_expired_rules+0xbc sys/net/pf.c:1275 pf_purge(ffffffff82981d30) at pf_purge+0xe0 sys/net/pf.c:1312 taskq_thread(ffffffff827f67a0) at taskq_thread+0xe6 sys/kern/kern_task.c:449 end trace frame: 0x0, count: -7