panic: kernel diagnostic assertion "map->limit == rtmap_limit" failed: file "/syzkaller/managers/multicore/kernel/sys/net/rtable.c", line 132 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 1904 32410 0 0 0x4000000 0 syz-executor 54275 42912 0 0x2 0 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bc80a) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff834f8e94,ffffffff834f1ed2,84,ffffffff8354b65d) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(c,21) at rtmap_grow+0x24f rtable_add(b) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(b) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(b,ffff800001609800) at if_createrdomain+0x40 sys/net/if.c:2046 ifioctl(ffff8000015a85f0,8020699f,ffff800039fa9bd0,ffff8000fffeed10) at ifioctl+0x1c52 sys/net/if.c:2395 sys_ioctl(ffff8000fffeed10,ffff800039fa9db0,ffff800039fa9d00) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff800039fa9db0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800039fa9db0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdb5e4b9b830, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "map->limit == rtmap_limit" failed: file "/syzkaller/managers/multicore/kernel/sys/net/rtable.c", line 132 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bc80a) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff834f8e94,ffffffff834f1ed2,84,ffffffff8354b65d) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(c,21) at rtmap_grow+0x24f rtable_add(b) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(b) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(b,ffff800001609800) at if_createrdomain+0x40 sys/net/if.c:2046 ifioctl(ffff8000015a85f0,8020699f,ffff800039fa9bd0,ffff8000fffeed10) at ifioctl+0x1c52 sys/net/if.c:2395 sys_ioctl(ffff8000fffeed10,ffff800039fa9db0,ffff800039fa9d00) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff800039fa9db0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800039fa9db0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdb5e4b9b830, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800039fa98e0 rbx 0xffffffff8390de07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff8000fffeed10 rax 0xffffffff8390cff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x127133f41c7426d8 r11 0x85f216a641bd1c7e r12 0xffffffff8390dc08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff82be6ed5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800039fa98d0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=1904 pid=32410 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=0xffff8000fffefca0,0xffff8000fffee028 process=0xffff80002a37e698 user=0xffff800039fa4000, vmspace=0xfffffa800b0635b8 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 34781 507597 61838 0 2 0 syz-executor 32410 452743 62537 0 2 0 syz-executor 32410 31005 62537 0 2 0x4000000 syz-executor *32410 1904 62537 0 7 0x4000000 syz-executor 10871 120944 31974 0 2 0 syz-executor 16191 236748 53319 0 2 0 syz-executor 16191 487949 53319 0 3 0x4000080 lockf syz-executor 64844 370926 42912 0 2 0 syz-executor 64844 326868 42912 0 3 0x4000080 fsleep syz-executor 43205 368635 85502 0 2 0 syz-executor 43205 458348 85502 0 3 0x4000080 fsleep syz-executor 90942 504275 55613 0 2 0 syz-executor 90942 386322 55613 0 2 0x4000000 syz-executor 90942 126593 55613 0 3 0x4000080 fsleep syz-executor 90942 372624 55613 0 3 0x4000080 fsleep syz-executor 11362 431784 66788 0 3 0x80 nanoslp syz-executor 11362 290870 66788 0 2 0x4000000 syz-executor 11362 100723 66788 0 3 0x4000000 inode syz-executor 11362 190417 66788 0 3 0x4000080 fsleep syz-executor 80640 480190 1 0 3 0x100083 ttyin getty 66788 335203 53244 0 3 0x82 nanoslp syz-executor 55613 102391 53244 0 3 0x82 nanoslp syz-executor 85502 422496 53244 0 3 0x82 nanoslp syz-executor 31974 207833 53244 0 2 0xc82 syz-executor 53319 115775 53244 0 2 0xc82 syz-executor 62537 388337 53244 0 3 0x82 nanoslp syz-executor 42912 54275 53244 0 7 0x2 syz-executor 61838 282557 53244 0 3 0x82 nanoslp syz-executor 53244 444177 1 0 3 0x82 kqread syz-executor 75285 130207 1 74 3 0x1100092 bpf pflogd 25217 194632 1 73 3 0x1100090 kqread syslogd 37942 271547 0 0 3 0x14200 bored smr 22353 269089 0 0 2 0x14200 zerothread 17131 350210 0 0 3 0x14200 aiodoned aiodoned 81323 460186 0 0 3 0x14200 syncer update 34564 502034 0 0 3 0x14200 cleaner cleaner 34126 371041 0 0 3 0x14200 reaper reaper 58149 329360 0 0 3 0x14200 pgdaemon pagedaemon 68317 2449 0 0 3 0x14200 bored viomb 41258 377861 0 0 3 0x40014200 acpi0 acpi0 47423 128388 0 0 3 0x40014200 idle1 26890 295067 0 0 3 0x14200 bored softnet1 22062 441527 0 0 2 0x14200 softnet0 63020 224610 0 0 3 0x14200 bored systqmp 48296 311917 0 0 3 0x14200 bored systq 42589 233430 0 0 3 0x14200 tmoslp softclockmp 25820 398903 0 0 3 0x40014200 tmoslp softclock 99358 102259 0 0 3 0x40014200 idle0 1 230299 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 32410 (syz-executor) thread 0xffff8000fffeed10 (1904) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff83b37a80) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 __mp_acquire_count+0x58 sys/kern/kern_lock.c:-1 #2 malloc+0xe3 sys/kern/kern_malloc.c:175 #3 rtmap_grow+0xb2 sys/net/rtable.c:127 #4 rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] #4 rtable_add+0x2d9 sys/net/rtable.c:223 #5 if_createrdomain+0x40 sys/net/if.c:2046 #6 ifioctl+0x1c52 sys/net/if.c:2395 #7 sys_ioctl+0x674 sys/kern/sys_generic.c:-1 #8 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #9 Xsyscall+0x128 Process 90942 (syz-executor) thread 0xffff80003c3e47f0 (386322) exclusive rwlock fdlock r = 0 (0xffff800039faa280) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 doopenat+0x179 sys/kern/vfs_syscalls.c:1129 #3 sys_open+0x59 sys/kern/vfs_syscalls.c:1064 #4 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #5 Xsyscall+0x128 Process 11362 (syz-executor) thread 0xffff80002a2222a8 (290870) exclusive rrwlock inode r = 0 (0xfffffa8060736568) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:576 #5 vn_write+0x18f sys/kern/vfs_vnops.c:411 #6 dofilewritev+0x2bd sys/kern/sys_generic.c:384 #7 sys_write+0xa2 sys/kern/sys_generic.c:300 #8 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11053 12082K 12414K 166960K 12446 0 pcb 18 14K 16K 166960K 139 0 rtable 243 8K 8K 166960K 376 0 pf 36 18K 24K 166960K 75 0 ifaddr 43 7K 8K 166960K 57 0 ifgroup 55 2K 2K 166960K 77 0 sysctl 3 1K 9K 166960K 9 0 counters 70 37K 38K 166960K 94 0 ioctlops 0 0K 4K 166960K 1531 0 iov 0 0K 16K 166960K 8 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1377 87K 87K 166960K 1635 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 13K 166960K 8 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 48 0 dirhash 12 2K 3K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 106K 166960K 309 0 sigio 0 0K 0K 166960K 5 0 proc 21 33K 180K 166960K 572 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 28 0 in_multi 99 7K 7K 166960K 116 0 ether_multi 1 0K 0K 166960K 3 0 mrt 0 0K 0K 166960K 15 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 55 254K 254K 166960K 55 0 exec 0 0K 1K 166960K 391 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 157 91K 168K 166960K 4742 0 UVM aobj 19 4K 4K 166960K 20 0 pinsyscall 24 48K 106K 166960K 1462 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 46 0 NDP 12 0K 2K 166960K 35 0 temp 45 9116K 9159K 166960K 9895 0 kqueue 4 6K 24K 166960K 69 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 26 0 0 1 0 1 1 0 8 0 rtpcb 120 38 0 38 1 0 1 1 0 8 1 rtentry 176 118 0 9 6 0 6 6 0 8 0 unpcb 144 187 0 182 3 0 3 3 0 8 2 syncache 336 4 0 4 1 1 0 1 0 8 0 tcpcb 736 61 0 60 1 0 1 1 0 8 0 arp 136 18 0 1 1 0 1 1 0 8 0 inpcb 328 298 0 293 7 0 7 7 0 8 6 nd6 152 25 0 1 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1192 9 0 9 2 1 1 1 0 8 1 pppxif 1576 2 0 2 1 0 1 1 0 8 1 pfstscr 40 6 0 4 1 0 1 1 0 8 0 pffrag 232 2 0 0 1 0 1 1 0 482 0 pffrnode 88 2 0 0 1 0 1 1 0 8 0 pffrent 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 pfanchor 1288 2 0 0 1 0 1 1 0 8 0 pfstitem 24 25 0 2 1 0 1 1 0 8 0 pfstkey 128 27 0 4 1 0 1 1 0 8 0 pfstate 448 24 0 2 3 0 3 3 0 8 0 pfrule 1360 22 0 16 2 1 1 2 0 8 0 rttmr 136 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 477 0 21 30 0 30 30 0 8 1 art_table 40 478 0 21 5 0 5 5 0 8 0 art_node 32 117 0 18 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 72 45 0 35 1 0 1 1 0 8 0 shmpl 112 17 0 1 1 0 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 1882 0 413 93 0 93 93 0 8 0 ffsino 296 1882 0 413 114 0 114 114 0 8 0 nchpl 144 2332 0 628 64 0 64 64 0 8 0 rtmask 32 3 0 3 2 1 1 1 0 8 1 vnodes 216 2181 0 0 122 0 122 122 0 8 0 namei 1024 7840 0 7840 4 3 1 2 0 8 1 percpumem 16 62 0 12 1 0 1 1 0 8 0 kstatmem 264 41 0 14 3 0 3 3 0 8 1 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 8227 0 8227 5 3 2 3 1 8 2 plimitpl 152 77 0 64 1 0 1 1 0 8 0 sigapl 424 620 0 582 7 1 6 7 0 8 0 knotepl 120 506 0 0 16 0 16 16 0 8 0 kqueuepl 224 85 0 82 1 0 1 1 0 8 0 pipepl 344 140 0 113 3 0 3 3 0 8 0 fdescpl 528 604 0 582 3 0 3 3 0 8 0 filepl 160 3057 0 2868 13 0 13 13 0 8 2 lockfpl 104 134 0 131 1 0 1 1 0 8 0 lockfspl 48 57 0 55 1 0 1 1 0 8 0 sessionpl 144 35 0 29 1 0 1 1 0 8 0 pgrppl 48 46 0 32 1 0 1 1 0 8 0 ucredpl 104 250 0 243 1 0 1 1 0 8 0 zombiepl 144 691 0 691 1 0 1 1 0 8 1 processpl 1232 620 0 582 5 1 4 5 0 8 0 procpl 664 945 0 896 6 0 6 6 0 8 0 sockpl 752 525 0 515 9 0 9 9 0 8 7 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl9k128 9344 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 128 0 0 16 0 16 16 0 8 0 mcl2k 2048 43 0 0 6 0 6 6 0 8 0 mtagpl 96 6 0 0 1 0 1 1 0 8 0 mbufpl 256 4464 0 0 279 0 279 279 0 8 0 bufpl 280 2992 0 106 207 0 207 207 0 8 0 anonpl 32 6221 0 0 51 0 51 51 0 246 0 amapchunkpl 152 13996 0 13601 27 1 26 27 0 158 7 amappl16 200 2432 0 2368 16 5 11 14 0 8 7 amappl15 192 9 0 9 1 1 0 1 0 8 0 amappl14 184 432 0 432 1 1 0 1 0 8 0 amappl13 176 125 0 122 1 0 1 1 0 8 0 amappl12 168 857 0 837 2 0 2 2 0 8 0 amappl11 160 10 0 10 2 2 0 1 0 8 0 amappl10 152 65 0 61 1 0 1 1 0 8 0 amappl9 144 302 0 302 1 1 0 1 0 8 0 amappl8 136 103 0 102 1 0 1 1 0 8 0 amappl7 128 147 0 142 1 0 1 1 0 8 0 amappl6 120 157 0 157 1 1 0 1 0 8 0 amappl5 112 102 0 100 1 0 1 1 0 8 0 amappl4 104 310 0 300 1 0 1 1 0 8 0 amappl3 96 2629 0 2541 4 0 4 4 0 8 0 amappl2 88 551 0 528 2 0 2 2 0 8 0 amappl1 80 11198 0 11006 15 1 14 15 0 8 4 amappl 88 3992 0 3861 5 1 4 5 0 92 0 uvmvnodes 80 106 0 0 3 0 3 3 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 2 0 1 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 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 19 0 1 1 0 1 1 0 8 0 uaddrrnd 24 604 0 582 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 604 0 582 1 0 1 1 0 8 0 vmmpekpl 168 7017 0 6979 3 0 3 3 0 8 0 vmmpepl 168 48141 0 47036 89 1 88 89 0 357 30 vmsppl 488 603 0 582 5 1 4 5 0 8 0 rwobjpl 80 17113 0 16517 24 1 23 24 0 8 0 pdppl 4096 1215 0 1164 103 52 51 87 0 8 0 pvpl 32 11840 0 0 97 1 96 96 0 265 0 pmappl 256 603 0 582 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 551 0 59 15 0 15 15 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834bc80a) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff834f8e94,ffffffff834f1ed2,84,ffffffff8354b65d) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(c,21) at rtmap_grow+0x24f rtable_add(b) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(b) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(b,ffff800001609800) at if_createrdomain+0x40 sys/net/if.c:2046 ifioctl(ffff8000015a85f0,8020699f,ffff800039fa9bd0,ffff8000fffeed10) at ifioctl+0x1c52 sys/net/if.c:2395 sys_ioctl(ffff8000fffeed10,ffff800039fa9db0,ffff800039fa9d00) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff800039fa9db0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800039fa9db0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdb5e4b9b830, count: -10 ddb{0}>