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 11055 41104 0 0x2 0 1 syz-executor.1 *452551 6877 0 0x14000 0x200 0K softnet db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82403198) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8246c76d,ffffffff824a7844,14a,ffffffff82437f19) at __assert+0x2b sys/kern/subr_prf.c:154 pf_purge_rule(ffff800000b3e558) at pf_purge_rule+0xc9 sys/net/pf_ioctl.c:330 pf_purge(ffffffff8290bbac) at pf_purge+0xd2 pf_purge_expired_rules sys/net/pf.c:1245 [inline] pf_purge(ffffffff8290bbac) at pf_purge+0xd2 sys/net/pf.c:1280 taskq_thread(ffff80000002c000) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: 9 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 kernel diagnostic assertion "(rule != NULL) && (rule->ruleset != NULL)" failed: file "/syzkaller/managers/multicore/kernel/sys/net/pf_ioctl.c", line 330 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82403198) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8246c76d,ffffffff824a7844,14a,ffffffff82437f19) at __assert+0x2b sys/kern/subr_prf.c:154 pf_purge_rule(ffff800000b3e558) at pf_purge_rule+0xc9 sys/net/pf_ioctl.c:330 pf_purge(ffffffff8290bbac) at pf_purge+0xd2 pf_purge_expired_rules sys/net/pf.c:1245 [inline] pf_purge(ffffffff8290bbac) at pf_purge+0xd2 sys/net/pf.c:1280 taskq_thread(ffff80000002c000) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: -6 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020da9350 rbx 0xffff800020da9400 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff82139aef kprintf+0x16f r9 0x1 r10 0x2 r11 0x3e2fdb95bd65e8ca r12 0x3000000008 r13 0xffff800020da9360 r14 0x100 r15 0x1 rip 0xffffffff82024518 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020da9340 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (softnet) pid=452551 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020d88ea0,0xffff800020d884f0 process=0xffff800020d8ab88 user=0xffff800020da4000, vmspace=0xffffffff8290b568 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 7259 173975 41104 0 2 0 syz-executor.1 7259 138493 41104 0 3 0x4000080 fsleep syz-executor.1 7259 451649 41104 0 3 0x4000080 fsleep syz-executor.1 41104 11055 36952 0 7 0x2 syz-executor.1 93540 196442 0 0 3 0x14200 acct acct 74455 222447 0 0 3 0x14280 nfsidl nfsio 16147 289313 0 0 3 0x14280 nfsidl nfsio 52526 285026 0 0 3 0x14280 nfsidl nfsio 33142 200816 0 0 3 0x14280 nfsidl nfsio 88088 196606 0 0 3 0x14280 nfsidl nfsio 21799 167668 0 0 3 0x14280 nfsidl nfsio 2012 237108 0 0 3 0x14280 nfsidl nfsio 55872 521102 0 0 3 0x14280 nfsidl nfsio 18147 225211 0 0 3 0x14280 nfsidl nfsio 92894 441964 0 0 3 0x14280 nfsidl nfsio 89418 170274 0 0 3 0x14280 nfsidl nfsio 95412 55948 0 0 3 0x14280 nfsidl nfsio 31174 280007 0 0 3 0x14280 nfsidl nfsio 29290 325025 0 0 3 0x14280 nfsidl nfsio 85989 431148 0 0 3 0x14280 nfsidl nfsio 83081 380535 0 0 3 0x14280 nfsidl nfsio 5142 326505 0 0 3 0x14280 nfsidl nfsio 56176 484683 0 0 3 0x14280 nfsidl nfsio 18427 94418 0 0 3 0x14280 nfsidl nfsio 84185 120495 0 0 3 0x14280 nfsidl nfsio 29984 262234 0 0 3 0x14200 bored sosplice 49459 101467 36952 0 2 0x482 syz-executor.0 36952 211628 66790 0 3 0x82 thrsleep syz-fuzzer 36952 491450 66790 0 3 0x4000082 thrsleep syz-fuzzer 36952 302203 66790 0 3 0x4000082 thrsleep syz-fuzzer 36952 71975 66790 0 3 0x4000082 kqread syz-fuzzer 36952 376913 66790 0 3 0x4000082 thrsleep syz-fuzzer 36952 327583 66790 0 3 0x4000082 thrsleep syz-fuzzer 36952 9884 66790 0 3 0x4000082 thrsleep syz-fuzzer 36952 380147 66790 0 3 0x4000082 thrsleep syz-fuzzer 36952 518893 66790 0 3 0x4000082 thrsleep syz-fuzzer 36952 147350 66790 0 3 0x4000082 thrsleep syz-fuzzer 66790 12596 40315 0 3 0x10008a pause ksh 40315 194472 76673 0 3 0x92 select sshd 49281 99980 1 0 3 0x100083 ttyin getty 76673 297029 1 0 3 0x80 select sshd 28842 309199 17974 74 3 0x100092 bpf pflogd 17974 144349 1 0 3 0x80 netio pflogd 56491 105892 89496 73 3 0x100090 kqread syslogd 89496 127708 1 0 3 0x100082 netio syslogd 51047 346805 1 77 3 0x100090 poll dhclient 82030 489320 1 0 3 0x80 poll dhclient 48667 245568 0 0 3 0x14200 bored smr 3342 290026 0 0 3 0x14200 pgzero zerothread 43199 116541 0 0 3 0x14200 aiodoned aiodoned 27309 406380 0 0 3 0x14200 syncer update 20343 254995 0 0 3 0x14200 cleaner cleaner 74403 481594 0 0 3 0x14200 reaper reaper 58501 406636 0 0 3 0x14200 pgdaemon pagedaemon 15180 94604 0 0 3 0x14200 bored crynlk 42914 439307 0 0 3 0x14200 bored crypto 25104 46526 0 0 3 0x40014200 acpi0 acpi0 5170 446337 0 0 3 0x40014200 idle1 * 6877 452551 0 0 7 0x14200 softnet 93001 502481 0 0 2 0x14200 systqmp 51300 65544 0 0 3 0x14200 bored systq 28949 80319 0 0 3 0x40014200 bored softclock 94011 188095 0 0 3 0x40014200 idle0 1 24047 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 6877 (softnet) thread 0xffff800020d88c30 (452551) exclusive rwlock netlock r = 0 (0xffffffff82753778) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 pf_purge+0x27 sys/net/pf.c:1273 #2 taskq_thread+0xec sys/kern/kern_task.c:437 #3 proc_trampoline+0x1c exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82902548) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 pf_purge+0x1b sys/net/pf.c:1264 #2 taskq_thread+0xec sys/kern/kern_task.c:437 #3 proc_trampoline+0x1c shared rwlock softnet r = 0 (0xffff80000002c070) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 taskq_thread+0xdf sys/kern/kern_task.c:436 #2 proc_trampoline+0x1c ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9541 6437K 6853K 78643K 11561 0 pcb 13 8K 8K 78643K 385 0 rtable 134 16K 19K 78643K 617 0 ifaddr 96 18K 19K 78643K 243 0 sysctl 1 1K 1K 78643K 1 0 counters 45 34K 34K 78643K 83 0 ioctlops 0 0K 4K 78643K 1865 0 iov 0 0K 16K 78643K 117 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 76K 77K 78643K 1551 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 14 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 131 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 6 17K 25K 78643K 699 0 sigio 0 0K 0K 78643K 7 0 proc 63 63K 95K 78643K 581 0 subproc 32 2K 2K 78643K 68 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 51 0 in_multi 67 3K 4K 78643K 223 0 ether_multi 1 0K 0K 78643K 16 0 mrt 1 0K 0K 78643K 8 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 301 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 144 88K 88K 78643K 3360 0 UVM aobj 29 2K 2K 78643K 36 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 591 0 NDP 15 0K 0K 78643K 61 0 temp 129 3865K 3940K 78643K 17272 0 kqueue 3 4K 16K 78643K 42 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 14 0 6 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 58 0 56 1 0 1 1 0 8 0 rtentry 112 109 0 62 2 0 2 2 0 8 0 unpcb 120 574 0 562 1 0 1 1 0 8 0 syncache 264 7 0 7 3 3 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 335 0 335 2 2 0 1 0 8 0 tcpcb 544 551 0 547 2 1 1 2 0 8 0 inpcb 296 1758 0 1748 5 3 2 2 0 8 1 rttmr 72 4 0 4 1 1 0 1 0 8 0 nd6 48 34 0 28 1 0 1 1 0 8 0 pkpcb 40 7 0 7 2 1 1 1 0 8 1 ppxss 1128 4 0 4 3 2 1 1 0 8 1 pfstscr 40 4 0 4 1 1 0 1 0 8 0 pffrag 232 9 0 9 4 3 1 1 0 482 1 pffrnode 88 9 0 9 4 3 1 1 0 8 1 pffrent 40 25 0 25 4 3 1 1 0 8 1 pfosfp 40 846 0 846 5 0 5 5 0 8 5 pfosfpen 112 1428 0 1428 21 0 21 21 0 8 21 pfrktable 1344 41 0 34 2 0 2 2 0 8 1 pftag 88 2 0 0 1 0 1 1 0 8 0 pfstitem 24 17 0 15 1 0 1 1 0 8 0 pfstkey 112 21 0 19 1 0 1 1 0 8 0 pfstate 328 19 0 17 2 0 2 2 0 8 1 pfrule 1360 60 0 30 4 1 3 3 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 375 0 175 15 0 15 15 0 8 2 art_table 32 376 0 175 2 0 2 2 0 8 0 art_node 16 106 0 64 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 2 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 127 0 117 1 0 1 1 0 8 0 shmpl 112 34 0 7 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2310 0 904 89 0 89 89 0 8 0 ffsino 272 2310 0 904 95 0 95 95 0 8 0 nchpl 144 3462 0 1862 60 0 60 60 0 8 0 uvmvnodes 72 2591 0 0 48 0 48 48 0 8 0 vnodes 208 2591 0 0 137 0 137 137 0 8 0 namei 1024 10382 0 10382 4 3 1 1 0 8 1 percpumem 16 52 0 19 1 0 1 1 0 8 0 vcpupl 1984 5 0 0 1 0 1 1 0 8 0 vmpool 560 5 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 18 0 9 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 10370 0 10370 8 7 1 7 0 8 1 plimitpl 152 63 0 55 1 0 1 1 0 8 0 sigapl 424 931 0 877 9 2 7 7 0 8 0 futexpl 56 11565 0 11563 4 3 1 1 0 8 0 knotepl 112 145 0 126 1 0 1 1 0 8 0 kqueuepl 144 100 0 95 1 0 1 1 0 8 0 pipepl 304 206 0 196 6 4 2 2 0 8 1 fdescpl 496 893 0 876 3 0 3 3 0 8 0 filepl 152 6482 0 6370 6 1 5 5 0 8 0 lockfpl 104 130 0 129 1 0 1 1 0 8 0 lockfspl 48 50 0 49 1 0 1 1 0 8 0 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 36 0 25 1 0 1 1 0 8 0 ucredpl 96 574 0 565 1 0 1 1 0 8 0 zombiepl 144 878 0 877 2 1 1 1 0 8 0 processpl 984 931 0 877 7 0 7 7 0 8 0 procpl 624 2497 0 2432 7 1 6 6 0 8 1 sosppl 128 9 0 9 3 3 0 1 0 8 0 sockpl 400 2410 0 2388 10 6 4 4 0 8 1 mcl64k 65536 12 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 14 0 0 2 0 2 2 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 214 0 0 26 0 26 26 0 8 0 mtagpl 96 39 0 0 1 0 1 1 0 8 0 mbufpl 256 577 0 0 34 0 34 34 0 8 0 bufpl 280 4681 0 136 325 0 325 325 0 8 0 anonpl 16 95392 0 82201 93 23 70 85 0 124 0 amapchunkpl 152 5310 0 5154 14 6 8 11 0 158 0 amappl16 192 4090 0 3170 59 11 48 58 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 662 0 652 1 0 1 1 0 8 0 amappl13 168 42 0 39 1 0 1 1 0 8 0 amappl12 160 10 0 7 1 0 1 1 0 8 0 amappl11 152 59 0 44 1 0 1 1 0 8 0 amappl10 144 14 0 10 1 0 1 1 0 8 0 amappl9 136 412 0 409 1 0 1 1 0 8 0 amappl8 128 407 0 368 2 0 2 2 0 8 0 amappl7 120 137 0 122 1 0 1 1 0 8 0 amappl6 112 28 0 21 1 0 1 1 0 8 0 amappl5 104 798 0 780 1 0 1 1 0 8 0 amappl4 96 529 0 497 1 0 1 1 0 8 0 amappl3 88 763 0 755 1 0 1 1 0 8 0 amappl2 80 6060 0 5984 2 0 2 2 0 8 0 amappl1 72 29456 0 28988 23 13 10 18 0 8 0 amappl 80 2763 0 2711 2 0 2 2 0 84 0 dma4096 4096 1 0 1 1 1 0 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 35 0 7 1 0 1 1 0 8 0 uaddrrnd 24 898 0 876 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 898 0 876 1 0 1 1 0 8 0 vmmpekpl 168 10889 0 10848 2 0 2 2 0 8 0 vmmpepl 168 116285 0 114071 196 63 133 133 0 357 36 vmsppl 368 897 0 876 2 0 2 2 0 8 0 pdppl 4096 1803 0 1757 7 1 6 6 0 8 0 pvpl 32 293352 0 276804 220 54 166 201 0 265 0 pmappl 232 897 0 876 4 2 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 307 0 15 9 0 9 9 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82403198) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8246c76d,ffffffff824a7844,14a,ffffffff82437f19) at __assert+0x2b sys/kern/subr_prf.c:154 pf_purge_rule(ffff800000b3e558) at pf_purge_rule+0xc9 sys/net/pf_ioctl.c:330 pf_purge(ffffffff8290bbac) at pf_purge+0xd2 pf_purge_expired_rules sys/net/pf.c:1245 [inline] pf_purge(ffffffff8290bbac) at pf_purge+0xd2 sys/net/pf.c:1280 taskq_thread(ffff80000002c000) at taskq_thread+0xec sys/kern/kern_task.c:437 end trace frame: 0x0, count: -6 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d70ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff82902340) at __mp_lock+0x127 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82902340) at __mp_lock+0x127 sys/kern/kern_lock.c:147 syscall(ffff800021ee7c80) at syscall+0x400 mi_syscall sys/sys/syscall_mi.h:93 [inline] syscall(ffff800021ee7c80) at syscall+0x400 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc1c00, count: 9 ddb{1}> trace x86_ipi_db(ffff800020d70ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff82902340) at __mp_lock+0x127 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82902340) at __mp_lock+0x127 sys/kern/kern_lock.c:147 syscall(ffff800021ee7c80) at syscall+0x400 mi_syscall sys/sys/syscall_mi.h:93 [inline] syscall(ffff800021ee7c80) at syscall+0x400 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc1c00, count: -6