panic: kernel diagnostic assertion "map->limit == rtmap_limit" failed: file "/syzkaller/managers/multicore/kernel/sys/net/rtable.c", line 131 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 500324 58382 0 0 0 0 syz-executor *492992 58382 0 0 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830f11cf) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff830a8ebd,ffffffff82fe642d,83,ffffffff830e6c0e) at __assert+0x29 rtable_init() at rtable_init rtable_add(16) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:373 [inline] rtable_add(16) at rtable_add+0x2d9 sys/net/rtable.c:222 if_createrdomain(16,ffff800000b12800) at if_createrdomain+0x40 sys/net/if.c:1945 ifioctl(ffff800010fd4fb8,8020699f,ffff800033f8c7f0,ffff8000ffff3460) at ifioctl+0x1a1e sys/net/if.c:2294 sys_ioctl(ffff8000ffff3460,ffff800033f8c9d0,ffff800033f8c920) at sys_ioctl+0x67c syscall(ffff800033f8c9d0) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800033f8c9d0) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc412011ef00, count: 5 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 "map->limit == rtmap_limit" failed: file "/syzkaller/managers/multicore/kernel/sys/net/rtable.c", line 131 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830f11cf) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff830a8ebd,ffffffff82fe642d,83,ffffffff830e6c0e) at __assert+0x29 rtable_init() at rtable_init rtable_add(16) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:373 [inline] rtable_add(16) at rtable_add+0x2d9 sys/net/rtable.c:222 if_createrdomain(16,ffff800000b12800) at if_createrdomain+0x40 sys/net/if.c:1945 ifioctl(ffff800010fd4fb8,8020699f,ffff800033f8c7f0,ffff8000ffff3460) at ifioctl+0x1a1e sys/net/if.c:2294 sys_ioctl(ffff8000ffff3460,ffff800033f8c9d0,ffff800033f8c920) at sys_ioctl+0x67c syscall(ffff800033f8c9d0) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800033f8c9d0) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc412011ef00, count: -10 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800033f8c510 rbx 0xffff800029b7cdbf rdx 0 rcx 0xffff8000ffff3460 rax 0xffff800029b7bff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x2cba11088f968e4 r11 0x549d98dd9d0ca5aa r12 0xffff800029b7cbc0 r13 0 r14 0 r15 0x1 rip 0xffffffff82b713d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800033f8c500 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=492992 pid=58382 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=50, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000ffff2f50,0xffff8000371d02c0 process=0xffff800031f7fb08 user=0xffff800033f87000, vmspace=0xfffffd806bf99aa8 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 58382 500324 4016 0 7 0 syz-executor *58382 492992 4016 0 7 0x4000000 syz-executor 58382 298443 4016 0 2 0x4000000 syz-executor 84328 116501 33605 0 2 0 syz-executor 84328 168868 33605 0 3 0x4000080 fsleep syz-executor 31376 381086 31308 0 2 0 syz-executor 31376 126329 31308 0 3 0x4000080 fsleep syz-executor 49671 200066 62449 0 2 0 syz-executor 49671 271866 62449 0 3 0x4000080 fsleep syz-executor 15483 434894 74573 0 2 0 syz-executor 15483 49859 74573 0 2 0x4000000 syz-executor 15483 407343 74573 0 2 0x4000000 syz-executor 6476 514682 84160 0 2 0 syz-executor 6476 20153 84160 0 3 0x4000080 ttyin syz-executor 6476 202712 84160 0 3 0x4000080 fsleep syz-executor 59348 246034 0 0 3 0x14200 bored sosplice 72117 366652 92683 0 3 0x100082 sbwait arp 92683 194779 80669 0 3 0x10008a sigsusp sh 33605 368489 78243 0 3 0x82 nanoslp syz-executor 84160 165371 78243 0 3 0x82 nanoslp syz-executor 56068 474583 78243 0 3 0x82 wait syz-executor 31308 355684 78243 0 3 0x82 nanoslp syz-executor 74573 87338 78243 0 3 0x82 nanoslp syz-executor 80669 476473 78243 0 3 0x82 wait syz-executor 62449 191379 78243 0 3 0x82 nanoslp syz-executor 4016 166063 78243 0 3 0x82 nanoslp syz-executor 78243 13771 17018 0 3 0x82 kqread syz-executor 17018 164811 41189 0 3 0x10008a sigsusp ksh 41189 208713 32833 0 3 0x98 kqread sshd-session 32833 385873 22958 0 3 0x92 kqread sshd-session 97277 411088 1 0 3 0x100083 ttyin getty 22958 97229 1 0 3 0x88 kqread sshd 90784 412112 54589 74 3 0x1100092 bpf pflogd 54589 20381 1 0 3 0x80 sbwait pflogd 68588 370683 73100 73 3 0x1100090 kqread syslogd 73100 218530 1 0 3 0x100082 sbwait syslogd 4041 114023 1 0 3 0x100080 kqread resolvd 59371 269835 46969 77 3 0x100092 kqread dhcpleased 28419 374634 46969 77 3 0x100092 kqread dhcpleased 46969 457021 1 0 3 0x80 kqread dhcpleased 19360 486257 0 0 3 0x14200 bored smr 81227 25186 0 0 2 0x14200 zerothread 27976 407110 0 0 3 0x14200 aiodoned aiodoned 24957 418394 0 0 3 0x14200 syncer update 48664 69377 0 0 3 0x14200 cleaner cleaner 43555 241654 0 0 3 0x14200 reaper reaper 21784 397512 0 0 3 0x14200 pgdaemon pagedaemon 58566 38943 0 0 3 0x14200 bored viomb 19285 25967 0 0 3 0x40014200 acpi0 acpi0 75436 303203 0 0 3 0x40014200 idle1 68251 121188 0 0 3 0x14200 bored softnet3 8319 375818 0 0 3 0x14200 bored softnet2 41878 458742 0 0 3 0x14200 bored softnet1 99707 466777 0 0 3 0x14200 bored softnet0 75670 384540 0 0 3 0x14200 bored systqmp 85589 19868 0 0 3 0x14200 bored systq 75250 412550 0 0 3 0x14200 tmoslp softclockmp 38470 299099 0 0 3 0x40014200 tmoslp softclock 69027 65555 0 0 3 0x40014200 idle0 1 202921 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 58382 (syz-executor) thread 0xffff8000ffff3460 (492992) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff8363b4e8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 __mp_acquire_count+0x58 #2 mi_switch+0x4b7 sys/kern/sched_bsd.c:441 #3 yield+0x6a sys/kern/sched_bsd.c:320 #4 malloc+0xe5 sys/kern/kern_malloc.c:170 #5 rtmap_grow+0xb2 sys/net/rtable.c:126 #6 rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:373 [inline] #6 rtable_add+0x2d9 sys/net/rtable.c:222 #7 if_createrdomain+0x40 sys/net/if.c:1945 #8 ifioctl+0x1a1e sys/net/if.c:2294 #9 sys_ioctl+0x67c #10 syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] #10 syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 #11 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10195 11189K 11436K 166960K 11510 0 pcb 17 12K 12K 166960K 46 0 rtable 232 7K 7K 166960K 359 0 pf 34 17K 273K 166960K 58 0 ifaddr 42 7K 7K 166960K 50 0 ifgroup 55 2K 2K 166960K 66 0 counters 64 36K 36K 166960K 72 0 ioctlops 0 0K 4K 166960K 1556 0 iov 0 0K 4K 166960K 9 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1435 90K 91K 166960K 1719 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 7 0K 0K 166960K 7 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 19 69K 89K 166960K 306 0 sigio 0 0K 0K 166960K 9 0 proc 72 91K 128K 166960K 535 0 subproc 104 6K 6K 166960K 104 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 56 0 in_multi 93 6K 6K 166960K 96 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 382 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 246 73K 77K 166960K 4443 0 UVM aobj 8 2K 2K 166960K 8 0 pinsyscall 45 90K 102K 166960K 1381 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 9 0 NDP 12 0K 1K 166960K 32 0 temp 43 6820K 6884K 166960K 9558 0 kqueue 13 20K 28K 166960K 47 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 44 0 39 1 0 1 1 0 8 0 rtentry 112 109 0 3 4 0 4 4 0 8 0 unpcb 144 351 0 332 6 5 1 6 0 8 0 syncache 336 6 0 6 2 2 0 1 0 8 0 tcpcb 808 124 0 118 7 6 1 7 0 8 0 arp 120 17 0 0 1 0 1 1 0 8 0 inpcb 336 296 0 285 8 6 2 8 0 8 0 nd6 136 25 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1168 3 0 3 1 1 0 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 28 0 0 1 0 1 1 0 8 0 pfstkey 128 28 0 0 1 0 1 1 0 8 0 pfstate 376 28 0 0 3 0 3 3 0 8 0 pfrule 1344 22 0 17 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 420 0 0 27 0 27 27 0 8 0 art_table 32 421 0 0 4 0 4 4 0 8 0 art_node 16 106 0 9 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 5 0 0 1 0 1 1 0 8 0 shmpl 112 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1972 0 469 95 0 95 95 0 8 0 ffsino 272 1972 0 469 101 0 101 101 0 8 0 nchpl 144 2400 0 715 63 0 63 63 0 8 0 uvmvnodes 80 2265 0 0 47 0 47 47 0 8 0 vnodes 216 2265 0 0 126 0 126 126 0 8 0 namei 1024 7659 0 7658 3 2 1 2 0 8 0 percpumem 16 50 0 4 1 0 1 1 0 8 0 kstatmem 264 32 0 8 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 6553 0 6553 3 2 1 2 1 8 1 plimitpl 152 47 0 29 1 0 1 1 0 8 0 sigapl 424 608 0 556 7 1 6 7 0 8 0 futexpl 64 2731 0 2727 1 0 1 1 0 8 0 knotepl 120 312 0 0 10 0 10 10 0 8 0 kqueuepl 216 97 0 87 3 2 1 3 0 8 0 pipepl 320 120 0 93 3 0 3 3 0 8 0 fdescpl 496 589 0 556 5 0 5 5 0 8 0 filepl 152 3238 0 2978 21 9 12 20 0 8 0 lockfpl 104 149 0 146 1 0 1 1 0 8 0 lockfspl 48 24 0 21 1 0 1 1 0 8 0 sessionpl 144 25 0 16 1 0 1 1 0 8 0 pgrppl 48 69 0 52 1 0 1 1 0 8 0 ucredpl 104 518 0 504 1 0 1 1 0 8 0 zombiepl 144 567 0 566 1 0 1 1 0 8 0 processpl 1160 608 0 556 5 0 5 5 0 8 0 procpl 648 914 0 853 6 0 6 6 0 8 0 sosppl 168 3 0 2 1 0 1 1 0 8 0 sockpl 664 694 0 659 21 17 4 21 0 8 0 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 154 0 0 20 0 20 20 0 8 0 mcl2k 2048 29 0 0 4 0 4 4 0 8 0 mtagpl 96 10 0 0 1 0 1 1 0 8 0 mbufpl 256 190 0 0 12 0 12 12 0 8 0 bufpl 280 2486 0 97 171 0 171 171 0 8 0 anonpl 24 172221 0 168695 49 24 25 47 0 185 0 amapchunkpl 152 14812 0 14285 30 8 22 30 0 158 0 amappl16 200 4624 0 4599 18 16 2 15 0 8 0 amappl15 192 11 0 11 1 1 0 1 0 8 0 amappl14 184 112 0 99 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 1 0 1 0 8 0 amappl12 168 1232 0 1198 3 1 2 2 0 8 0 amappl11 160 52 0 38 1 0 1 1 0 8 0 amappl10 152 11 0 11 1 1 0 1 0 8 0 amappl9 144 147 0 147 1 1 0 1 0 8 0 amappl8 136 24 0 21 1 0 1 1 0 8 0 amappl7 128 114 0 101 1 0 1 1 0 8 0 amappl6 120 185 0 183 1 0 1 1 0 8 0 amappl5 112 137 0 125 1 0 1 1 0 8 0 amappl4 104 313 0 294 1 0 1 1 0 8 0 amappl3 96 2700 0 2595 3 0 3 3 0 8 0 amappl2 88 895 0 808 3 0 3 3 0 8 0 amappl1 80 8615 0 8022 14 0 14 14 0 8 0 amappl 88 4054 0 3872 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 7 0 7 2 2 0 1 0 8 0 dma128 128 254 0 254 2 2 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 8 0 0 1 0 1 1 0 8 0 uaddrrnd 24 589 0 556 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 589 0 556 1 0 1 1 0 8 0 vmmpekpl 168 6537 0 6499 3 0 3 3 0 8 0 vmmpepl 168 45926 0 43993 96 8 88 95 0 357 1 vmsppl 448 588 0 556 6 1 5 5 0 8 0 rwobjpl 56 19721 0 16472 49 2 47 49 0 8 0 pdppl 4096 1185 0 1112 101 28 73 83 0 8 0 pvpl 32 14655 0 0 119 0 119 119 0 265 0 pmappl 248 588 0 556 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 398 0 49 11 0 11 11 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff834ffff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff8363b2e0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff8363b2e0) at __mp_lock+0x192 sys/kern/kern_lock.c:144 softintr_dispatch(0) at softintr_dispatch+0x5b sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7aaefec6bc70, count: 9 ddb{0}> trace x86_ipi_db(ffffffff834ffff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff8363b2e0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff8363b2e0) at __mp_lock+0x192 sys/kern/kern_lock.c:144 softintr_dispatch(0) at softintr_dispatch+0x5b sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7aaefec6bc70, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830f11cf) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff830a8ebd,ffffffff82fe642d,83,ffffffff830e6c0e) at __assert+0x29 rtable_init() at rtable_init rtable_add(16) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:373 [inline] rtable_add(16) at rtable_add+0x2d9 sys/net/rtable.c:222 if_createrdomain(16,ffff800000b12800) at if_createrdomain+0x40 sys/net/if.c:1945 ifioctl(ffff800010fd4fb8,8020699f,ffff800033f8c7f0,ffff8000ffff3460) at ifioctl+0x1a1e sys/net/if.c:2294 sys_ioctl(ffff8000ffff3460,ffff800033f8c9d0,ffff800033f8c920) at sys_ioctl+0x67c syscall(ffff800033f8c9d0) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800033f8c9d0) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc412011ef00, count: 5 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830f11cf) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff830a8ebd,ffffffff82fe642d,83,ffffffff830e6c0e) at __assert+0x29 rtable_init() at rtable_init rtable_add(16) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:373 [inline] rtable_add(16) at rtable_add+0x2d9 sys/net/rtable.c:222 if_createrdomain(16,ffff800000b12800) at if_createrdomain+0x40 sys/net/if.c:1945 ifioctl(ffff800010fd4fb8,8020699f,ffff800033f8c7f0,ffff8000ffff3460) at ifioctl+0x1a1e sys/net/if.c:2294 sys_ioctl(ffff8000ffff3460,ffff800033f8c9d0,ffff800033f8c920) at sys_ioctl+0x67c syscall(ffff800033f8c9d0) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff800033f8c9d0) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc412011ef00, count: -10