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 295949 61611 0 0 0 1 syz-executor *128441 54621 0 0 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833b549f) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833f2760,ffffffff833ede9f,84,ffffffff83449b28) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(17,21) at rtmap_grow+0x24f rtable_add(16) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(16) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(16,ffff800000c31000) at if_createrdomain+0x40 sys/net/if.c:2045 ifioctl(ffff800010fdb790,8020699f,ffff80003c433080,ffff8000fffeb778) at ifioctl+0x1c52 sys/net/if.c:2394 sys_ioctl(ffff8000fffeb778,ffff80003c433260,ffff80003c4331b0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c433260) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c433260) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x208d011c670, 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(ffffffff833b549f) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833f2760,ffffffff833ede9f,84,ffffffff83449b28) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(17,21) at rtmap_grow+0x24f rtable_add(16) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(16) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(16,ffff800000c31000) at if_createrdomain+0x40 sys/net/if.c:2045 ifioctl(ffff800010fdb790,8020699f,ffff80003c433080,ffff8000fffeb778) at ifioctl+0x1c52 sys/net/if.c:2394 sys_ioctl(ffff8000fffeb778,ffff80003c433260,ffff80003c4331b0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c433260) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c433260) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x208d011c670, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c432d90 rbx 0xffffffff83811e07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff8000fffeb778 rax 0xffffffff83810ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3813b5c057a15acb r11 0x9118e870835ca01b r12 0xffffffff83811c08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff82c5fb15 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c432d80 ss 0 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=128441 pid=54621 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=83, usrpri=83, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000fffea020,0xffff8000fffead28 process=0xffff8000fffee1c8 user=0xffff80003c42e000, vmspace=0xfffffd806c9549a0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 61611 295949 61523 0 7 0 syz-executor 61611 13293 61523 0 2 0x4000000 syz-executor 5545 368280 35491 0 2 0 syz-executor 5545 334528 35491 0 3 0x4000080 fsleep syz-executor 91632 233294 17486 0 2 0 syz-executor 91632 413805 17486 0 2 0x4000000 syz-executor 54621 237502 48668 0 2 0 syz-executor 54621 361159 48668 0 2 0x4000000 syz-executor *54621 128441 48668 0 7 0x4000000 syz-executor 49838 503875 21000 0 2 0 syz-executor 49838 394600 21000 0 3 0x4000080 fsleep syz-executor 49838 126647 21000 0 3 0x4000080 fsleep syz-executor 35923 133112 28791 0 2 0 syz-executor 35923 239070 28791 0 3 0x4000080 fsleep syz-executor 35923 415320 28791 0 3 0x4000080 fsleep syz-executor 35923 336138 28791 0 3 0x4000080 fsleep syz-executor 77639 390996 14658 0 3 0x3000 suspend syz-executor 77639 342045 14658 0 2 0x4081000 syz-executor 14658 393875 59996 0 3 0x82 wait syz-executor 21000 256898 59996 0 2 0xc82 syz-executor 17486 100968 59996 0 2 0xc82 syz-executor 96614 418863 59996 0 3 0x82 wait syz-executor 48668 36472 59996 0 2 0xc82 syz-executor 61523 194662 59996 0 2 0xc82 syz-executor 28791 95384 59996 0 2 0xc82 syz-executor 35491 185424 59996 0 2 0xc82 syz-executor 59996 111722 40466 0 3 0x82 kqread syz-executor 40466 270089 46862 0 3 0x10008a sigsusp ksh 46862 230660 88559 0 3 0x98 kqread sshd-session 88559 259340 77267 0 3 0x92 kqread sshd-session 3612 13301 1 0 3 0x100083 ttyopn getty 77267 467019 1 0 3 0x88 kqread sshd 71243 511621 52410 74 3 0x1100092 bpf pflogd 52410 422392 1 0 3 0x80 sbwait pflogd 12316 333532 39974 73 3 0x1100090 kqread syslogd 39974 272777 1 0 3 0x100082 sbwait syslogd 98162 385785 1 0 3 0x100080 kqread resolvd 21098 516694 91842 77 3 0x100092 kqread dhcpleased 92887 350312 91842 77 3 0x100092 kqread dhcpleased 91842 482391 1 0 3 0x80 kqread dhcpleased 56394 506079 0 0 3 0x14200 bored smr 53847 289236 0 0 3 0x14200 pgzero zerothread 1664 209936 0 0 3 0x14200 aiodoned aiodoned 69063 456861 0 0 3 0x14200 syncer update 15283 44694 0 0 3 0x14200 cleaner cleaner 38922 125177 0 0 3 0x14200 reaper reaper 87243 341542 0 0 3 0x14200 pgdaemon pagedaemon 23011 151517 0 0 3 0x14200 bored viomb 91119 109128 0 0 3 0x40014200 acpi0 acpi0 72769 341358 0 0 3 0x40014200 idle1 66516 385906 0 0 3 0x14200 bored softnet1 13519 211401 0 0 3 0x14200 bored softnet0 32892 168620 0 0 3 0x14200 bored systqmp 66702 221202 0 0 3 0x14200 bored systq 65030 49030 0 0 2 0x14200 softclockmp 77080 112945 0 0 3 0x40014200 tmoslp softclock 95243 410184 0 0 3 0x40014200 idle0 1 136561 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb{0}> show all locks Process 54621 (syz-executor) thread 0xffff8000fffeb778 (128441) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff83947148) #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:2045 #6 ifioctl+0x1c52 sys/net/if.c:2394 #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:775 #9 Xsyscall+0x128 Process 77639 (syz-executor) thread 0xffff8000ffff2a78 (342045) exclusive rrwlock inode r = 0 (0xfffffd806634d460) #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:570 #5 vn_write+0x18f sys/kern/vfs_vnops.c:405 #6 dofilewritev+0x242 sys/kern/sys_generic.c:380 #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:775 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11090 12163K 12472K 166960K 13539 0 pcb 20 12K 12K 166960K 151 0 rtable 201 7K 8K 166960K 431 0 pf 33 17K 81K 166960K 107 0 ifaddr 39 7K 8K 166960K 81 0 ifgroup 51 2K 2K 166960K 123 0 sysctl 4 1K 9K 166960K 11 0 counters 68 36K 38K 166960K 264 0 ioctlops 0 0K 4K 166960K 1681 0 iov 0 0K 24K 166960K 30 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1463 92K 92K 166960K 2131 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 10 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 29 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 102K 166960K 774 0 sigio 0 0K 0K 166960K 9 0 proc 72 115K 196K 166960K 601 0 subproc 72 4K 4K 166960K 73 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 213 0 in_multi 81 5K 7K 166960K 128 0 ether_multi 1 0K 0K 166960K 6 0 mrt 2 0K 0K 166960K 8 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 223 996K 996K 166960K 223 0 exec 0 0K 1K 166960K 482 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 259 168K 183K 166960K 9076 0 UVM aobj 22 9K 9K 166960K 24 0 pinsyscall 43 86K 106K 166960K 1901 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 59 0 NDP 11 0K 2K 166960K 50 0 temp 57 8671K 8736K 166960K 35414 0 kqueue 13 20K 32K 166960K 129 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 81 0 78 1 0 1 1 0 8 0 rtentry 176 125 0 40 6 1 5 6 0 8 0 unpcb 144 581 0 560 7 3 4 4 0 8 3 syncache 336 8 0 8 2 2 0 1 0 8 0 tcpqe 32 2 0 2 2 2 0 1 0 8 0 tcpcb 736 264 0 257 5 4 1 4 0 8 0 arp 136 19 0 2 1 0 1 1 0 8 0 inpcb 328 716 0 701 4 2 2 4 0 8 0 nd6 152 25 0 6 1 0 1 1 0 8 0 pkpcb 40 7 0 7 3 3 0 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1192 88 0 88 3 2 1 1 0 8 1 pppxif 1504 73 0 73 3 2 1 1 0 8 1 pffrag 232 5 0 2 1 0 1 1 0 482 0 pffrnode 88 5 0 2 1 0 1 1 0 8 0 pffrent 40 10 0 7 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 1 0 0 1 0 1 1 0 8 0 pfstitem 24 60 0 19 1 0 1 1 0 8 0 pfstkey 128 60 0 19 2 0 2 2 0 8 0 pfstate 448 59 0 19 5 0 5 5 0 8 0 pfrule 1344 23 0 18 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 541 0 179 30 2 28 29 0 8 3 art_table 40 542 0 179 5 0 5 5 0 8 0 art_node 32 125 0 49 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semapl 112 27 0 17 1 0 1 1 0 8 0 shmpl 112 18 0 2 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2831 0 1322 96 0 96 96 0 8 0 ffsino 296 2831 0 1322 118 1 117 118 0 8 0 nchpl 144 3985 0 2283 64 0 64 64 0 8 0 vnodes 216 3412 0 0 190 0 190 190 0 8 0 namei 1024 13961 0 13961 5 4 1 2 0 8 1 percpumem 16 147 0 98 1 0 1 1 0 8 0 vcpupl 3968 3 0 0 1 0 1 1 0 8 0 vmpool 848 3 0 0 1 0 1 1 0 8 0 kstatmem 264 70 0 46 5 2 3 3 0 8 1 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 25559 0 25559 10 8 2 8 1 8 2 plimitpl 152 104 0 86 1 0 1 1 0 8 0 sigapl 424 1079 0 1031 7 1 6 7 0 8 0 knotepl 120 477 0 0 15 0 15 15 0 8 0 kqueuepl 224 371 0 360 6 4 2 5 0 8 1 pipepl 344 162 0 135 3 0 3 3 0 8 0 fdescpl 528 1061 0 1029 3 0 3 3 0 8 0 filepl 160 6545 0 6278 18 5 13 15 0 8 1 lockfpl 104 252 0 216 2 0 2 2 0 8 1 lockfspl 48 99 0 95 1 0 1 1 0 8 0 sessionpl 144 24 0 15 1 0 1 1 0 8 0 pgrppl 48 45 0 28 1 0 1 1 0 8 0 ucredpl 104 962 0 948 1 0 1 1 0 8 0 zombiepl 144 1258 0 1256 2 1 1 1 0 8 0 processpl 1232 1079 0 1031 5 1 4 5 0 8 0 procpl 664 2239 0 2180 6 0 6 6 0 8 0 sosppl 176 4 0 4 2 1 1 1 0 8 1 sockpl 752 1410 0 1371 17 6 11 11 0 8 7 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 117 0 0 15 0 15 15 0 8 0 mcl2k 2048 24 0 0 3 0 3 3 0 8 0 mtagpl 96 37 0 0 1 0 1 1 0 8 0 mbufpl 256 246 0 0 16 0 16 16 0 8 0 bufpl 280 11951 0 5815 439 0 439 439 0 8 0 anonpl 32 10251 0 0 83 0 83 83 0 246 0 amapchunkpl 152 30487 0 29765 46 18 28 39 0 158 0 amappl16 200 4115 0 3987 28 13 15 17 0 8 7 amappl15 192 8 0 7 1 0 1 1 0 8 0 amappl14 184 21 0 21 1 1 0 1 0 8 0 amappl13 176 432 0 430 1 0 1 1 0 8 0 amappl12 168 1426 0 1383 3 0 3 3 0 8 0 amappl11 160 8 0 8 1 1 0 1 0 8 0 amappl10 152 53 0 39 1 0 1 1 0 8 0 amappl9 144 249 0 248 1 0 1 1 0 8 0 amappl8 136 29 0 27 1 0 1 1 0 8 0 amappl7 128 98 0 97 1 0 1 1 0 8 0 amappl6 120 279 0 266 1 0 1 1 0 8 0 amappl5 112 82 0 70 1 0 1 1 0 8 0 amappl4 104 423 0 393 1 0 1 1 0 8 0 amappl3 96 5708 0 5587 5 1 4 4 0 8 0 amappl2 88 546 0 486 2 0 2 2 0 8 0 amappl1 80 12114 0 11516 15 1 14 14 0 8 0 amappl 88 8253 0 8072 5 0 5 5 0 92 0 uvmvnodes 80 124 0 0 3 0 3 3 0 8 0 dma4096 4096 2 0 2 2 2 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 7 0 7 2 1 1 1 0 8 1 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 7 0 7 2 2 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 23 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1061 0 1029 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1061 0 1029 1 0 1 1 0 8 0 vmmpekpl 168 10452 0 10421 3 0 3 3 0 8 0 vmmpepl 168 74875 0 72784 109 10 99 101 0 357 7 vmsppl 488 1060 0 1029 6 2 4 5 0 8 0 rwobjpl 80 23048 0 21856 33 4 29 29 0 8 0 pdppl 4096 2136 0 2061 116 40 76 88 0 8 1 pvpl 32 18032 0 0 147 1 146 147 0 265 0 pmappl 256 1063 0 1029 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 308 0 55 8 0 8 8 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(ffffffff833b549f) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833f2760,ffffffff833ede9f,84,ffffffff83449b28) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(17,21) at rtmap_grow+0x24f rtable_add(16) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(16) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(16,ffff800000c31000) at if_createrdomain+0x40 sys/net/if.c:2045 ifioctl(ffff800010fdb790,8020699f,ffff80003c433080,ffff8000fffeb778) at ifioctl+0x1c52 sys/net/if.c:2394 sys_ioctl(ffff8000fffeb778,ffff80003c433260,ffff80003c4331b0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c433260) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c433260) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x208d011c670, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff8000299ddff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x7b0cf2853730, count: 12 ddb{1}> trace x86_ipi_db(ffff8000299ddff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x7b0cf2853730, count: -3