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 *350930 33669 0 0 0x4000000 0 syz-executor 307085 91298 0 0x2 0x1 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336fbc1) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833af890,ffffffff833ad1c4,84,ffffffff8340817e) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(21,21) at rtmap_grow+0x24f rtable_add(20) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(20) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(20,ffff800001481800) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014e6bf0,8020699f,ffff80003c467380,ffff80002effdcb8) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff80002effdcb8,ffff80003c467560,ffff80003c4674b0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c467560) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c467560) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3cdda39fa40, 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(ffffffff8336fbc1) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833af890,ffffffff833ad1c4,84,ffffffff8340817e) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(21,21) at rtmap_grow+0x24f rtable_add(20) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(20) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(20,ffff800001481800) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014e6bf0,8020699f,ffff80003c467380,ffff80002effdcb8) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff80002effdcb8,ffff80003c467560,ffff80003c4674b0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c467560) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c467560) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3cdda39fa40, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c467090 rbx 0xffffffff83811ddf cpu_info_full_primary+0x2ddf rdx 0 rcx 0xffff80002effdcb8 rax 0xffffffff83810ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x817491dc6ff4bb73 r11 0xe9792159b3d59a9f r12 0xffffffff83811be0 cpu_info_full_primary+0x2be0 r13 0 r14 0 r15 0x1 rip 0xffffffff811a29e5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c467080 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=350930 pid=33669 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002effc030,0xffff80002effc808 process=0xffff800035c1d360 user=0xffff80003c462000, vmspace=0xfffffd806b9e0d70 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 33669 506120 91298 0 2 0 syz-executor *33669 350930 91298 0 7 0x4000000 syz-executor 33669 243432 91298 0 2 0x4000000 syz-executor 83367 30591 18087 0 2 0 syz-executor 83367 198468 18087 0 2 0x4000000 syz-executor 95076 96315 3108 -1 2 0x10 syz-executor 95076 312859 3108 -1 3 0x4000090 fsleep syz-executor 95076 213934 3108 -1 2 0x4000010 syz-executor 95076 173823 3108 -1 2 0x4000010 syz-executor 27634 477799 88848 0 2 0 syz-executor 27634 416217 88848 0 2 0x4000000 syz-executor 27634 395714 88848 0 3 0x4000080 fsleep syz-executor 27634 44636 88848 0 3 0x4000080 fsleep syz-executor 32890 135302 59823 0 2 0 syz-executor 32890 498175 59823 0 3 0x4000080 fsleep syz-executor 32890 390881 59823 0 3 0x4000080 fsleep syz-executor 32890 139950 59823 0 3 0x4000080 fsleep syz-executor 58637 421267 27521 0 2 0 syz-executor 58637 40064 27521 0 3 0x4000080 fsleep syz-executor 90092 510872 63904 0 3 0x80 nanoslp syz-executor 90092 94750 63904 0 3 0x4000080 kqread syz-executor 90092 178042 63904 0 3 0x4000080 kqread syz-executor 90092 411820 63904 0 3 0x4000080 fsleep syz-executor 90092 296818 63904 0 3 0x4000080 fsleep syz-executor 8353 446456 60783 0 2 0 syz-executor 8353 432090 60783 0 3 0x4000000 smrbar syz-executor 63602 168199 0 0 3 0x14200 acct acct 83867 517837 0 0 3 0x14200 bored sosplice 18087 401983 18375 0 2 0xc82 syz-executor 88848 200582 18375 0 3 0x82 nanoslp syz-executor 91298 307085 18375 0 7 0x3 syz-executor 3108 190456 18375 0 3 0x82 nanoslp syz-executor 60783 101841 18375 0 3 0x82 nanoslp syz-executor 27521 41821 18375 0 3 0x82 nanoslp syz-executor 59823 455959 18375 0 3 0x82 nanoslp syz-executor 63904 170682 18375 0 3 0x82 nanoslp syz-executor 18375 290990 98471 0 3 0x82 kqread syz-executor 98471 174195 57506 0 3 0x10008a sigsusp ksh 57506 21873 439 0 3 0x98 kqread sshd-session 439 472899 3853 0 3 0x92 kqread sshd-session 57183 304635 1 0 3 0x100083 ttyin getty 3853 462438 1 0 3 0x88 kqread sshd 29107 206469 44131 74 3 0x1100092 bpf pflogd 44131 523636 1 0 3 0x80 sbwait pflogd 61926 282111 21720 73 3 0x1100090 kqread syslogd 21720 455008 1 0 3 0x100082 sbwait syslogd 9012 497253 1 0 3 0x100080 kqread resolvd 98511 165374 22652 77 3 0x100092 kqread dhcpleased 53838 272883 22652 77 3 0x100092 kqread dhcpleased 22652 181710 1 0 3 0x80 kqread dhcpleased 79901 349602 0 0 3 0x14200 bored smr 61504 171189 0 0 2 0x14200 zerothread 5150 53968 0 0 3 0x14200 aiodoned aiodoned 77744 481864 0 0 3 0x14200 syncer update 11023 399877 0 0 3 0x14200 cleaner cleaner 1616 79975 0 0 3 0x14200 reaper reaper 72948 113083 0 0 3 0x14200 pgdaemon pagedaemon 74992 400713 0 0 3 0x14200 bored viomb 6051 97320 0 0 3 0x40014200 acpi0 acpi0 47024 429472 0 0 3 0x40014200 idle1 31390 268101 0 0 3 0x14200 bored softnet7 7947 441461 0 0 3 0x14200 bored softnet6 3304 480898 0 0 3 0x14200 bored softnet5 4156 452137 0 0 3 0x14200 bored softnet4 6398 271929 0 0 3 0x14200 bored softnet3 19203 429269 0 0 3 0x14200 bored softnet2 33682 276429 0 0 3 0x14200 bored softnet1 56528 409127 0 0 3 0x14200 bored softnet0 91111 272125 0 0 3 0x14200 bored systqmp 3684 174673 0 0 3 0x14200 bored systq 1676 152422 0 0 3 0x14200 tmoslp softclockmp 42538 363395 0 0 2 0x40014200 softclock 3611 197787 0 0 3 0x40014200 idle0 1 83043 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 33669 (syz-executor) thread 0xffff80002effdcb8 (350930) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff83959e10) #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:174 #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:1952 #6 ifioctl+0x1c66 sys/net/if.c:2301 #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:748 #9 Xsyscall+0x128 Process 83367 (syz-executor) thread 0xffff80002effca90 (198468) exclusive rwlock vmmaplk r = 0 (0xfffffd806b9e06d0) #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 vm_map_lock_ln+0x12e sys/uvm/uvm_map.c:5168 #3 uvmfault_lookup+0xe8 sys/uvm/uvm_fault.c:1918 #4 uvm_fault_check+0x895 uvmfault_amapcopy sys/uvm/uvm_fault.c:235 [inline] #4 uvm_fault_check+0x895 sys/uvm/uvm_fault.c:784 #5 uvm_fault+0x106 sys/uvm/uvm_fault.c:677 #6 upageflttrap+0xa9 sys/arch/amd64/amd64/trap.c:192 #7 usertrap+0x3c6 sys/arch/amd64/amd64/trap.c:605 #8 recall_trap+0x8 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10238 11170K 11361K 166960K 11730 0 pcb 19 14K 15K 166960K 57 0 rtable 219 9K 9K 166960K 293 0 pf 38 18K 81K 166960K 65 0 ifaddr 44 7K 7K 166960K 57 0 ifgroup 59 2K 2K 166960K 77 0 sysctl 3 1K 9K 166960K 9 0 counters 76 37K 37K 166960K 100 0 ioctlops 0 0K 4K 166960K 1503 0 iov 0 0K 12K 166960K 7 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1381 87K 87K 166960K 1566 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 7 0 VM map 2 1K 1K 166960K 2 0 sem 4 0K 0K 166960K 4 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 81K 166960K 356 0 sigio 0 0K 0K 166960K 4 0 proc 72 115K 164K 166960K 561 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 98 7K 7K 166960K 107 0 ether_multi 1 0K 0K 166960K 3 0 mrt 1 0K 0K 166960K 2 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 406 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 251 160K 169K 166960K 4908 0 UVM aobj 40 2K 2K 166960K 41 0 pinsyscall 43 86K 98K 166960K 1439 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 19 0 NDP 14 0K 2K 166960K 36 0 temp 41 8642K 8714K 166960K 17722 0 kqueue 15 22K 26K 166960K 67 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 174 0 170 3 0 3 3 0 8 2 rtentry 176 100 0 7 5 0 5 5 0 8 0 unpcb 144 255 0 170 4 0 4 4 0 8 0 syncache 336 6 0 6 2 1 1 1 0 8 1 tcpcb 736 140 0 133 7 1 6 7 0 8 5 arp 128 10 0 1 1 0 1 1 0 8 0 inpcb 328 461 0 449 8 1 7 7 0 8 5 nd6 144 18 0 0 1 0 1 1 0 8 0 pkpcb 40 35 0 34 2 1 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1192 14 0 10 3 2 1 2 0 8 0 pppxif 1504 3 0 3 3 2 1 2 0 8 1 pffrag 232 4 0 1 1 0 1 1 0 482 0 pffrnode 88 4 0 1 1 0 1 1 0 8 0 pffrent 40 5 0 2 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 pfstitem 24 38 0 2 1 0 1 1 0 8 0 pfstkey 128 38 0 2 2 0 2 2 0 8 0 pfstate 384 38 0 2 4 0 4 4 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 457 0 20 28 0 28 28 0 8 0 art_table 40 458 0 20 5 0 5 5 0 8 0 art_node 32 100 0 17 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semapl 112 2 0 0 1 0 1 1 0 8 0 shmpl 112 38 0 1 2 0 2 2 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 1957 0 444 96 0 96 96 0 8 0 ffsino 296 1957 0 444 117 0 117 117 0 8 0 nchpl 144 2445 0 751 63 0 63 63 0 8 0 rtmask 32 4 0 2 2 1 1 1 0 8 0 uvmvnodes 80 2172 0 0 45 0 45 45 0 8 0 vnodes 216 2172 0 0 121 0 121 121 0 8 0 namei 1024 7981 0 7981 3 2 1 2 0 8 1 percpumem 16 65 0 12 1 0 1 1 0 8 0 kstatmem 264 42 0 12 4 1 3 3 0 8 0 scxspl 216 8381 0 8381 3 2 1 2 1 8 1 plimitpl 152 63 0 46 1 0 1 1 0 8 0 sigapl 424 661 0 605 7 0 7 7 0 8 0 knotepl 120 318 0 0 10 0 10 10 0 8 0 kqueuepl 224 105 0 92 1 0 1 1 0 8 0 pipepl 344 120 0 93 3 0 3 3 0 8 0 fdescpl 528 637 0 605 3 0 3 3 0 8 0 filepl 160 3402 0 3099 18 1 17 17 0 8 4 lockfpl 104 176 0 171 1 0 1 1 0 8 0 lockfspl 48 71 0 66 1 0 1 1 0 8 0 sessionpl 144 23 0 14 1 0 1 1 0 8 0 pgrppl 48 40 0 23 1 0 1 1 0 8 0 ucredpl 104 300 0 285 1 0 1 1 0 8 0 zombiepl 144 713 0 713 1 0 1 1 0 8 1 processpl 1232 661 0 605 5 0 5 5 0 8 0 procpl 664 1065 0 991 7 0 7 7 0 8 0 sockpl 752 932 0 830 20 8 12 17 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 130 0 0 17 0 17 17 0 8 0 mcl2k 2048 22 0 0 3 0 3 3 0 8 0 mtagpl 96 8 0 0 1 0 1 1 0 8 0 mbufpl 256 173 0 0 11 0 11 11 0 8 0 bufpl 280 3440 0 123 237 0 237 237 0 8 0 anonpl 32 7497 0 0 61 0 61 61 0 246 0 amapchunkpl 152 15016 0 14480 34 11 23 27 0 158 2 amappl16 200 1046 0 1017 15 13 2 14 0 8 0 amappl15 192 1 0 1 1 1 0 1 0 8 0 amappl14 184 113 0 101 1 0 1 1 0 8 0 amappl13 176 48 0 48 1 1 0 1 0 8 0 amappl12 168 1274 0 1242 3 1 2 2 0 8 0 amappl11 160 74 0 60 1 0 1 1 0 8 0 amappl10 152 1 0 1 1 1 0 1 0 8 0 amappl9 144 251 0 251 1 1 0 1 0 8 0 amappl8 136 28 0 26 1 0 1 1 0 8 0 amappl7 128 117 0 105 1 0 1 1 0 8 0 amappl6 120 170 0 167 1 0 1 1 0 8 0 amappl5 112 135 0 125 1 0 1 1 0 8 0 amappl4 104 292 0 273 1 0 1 1 0 8 0 amappl3 96 2777 0 2653 5 1 4 4 0 8 0 amappl2 88 642 0 577 2 0 2 2 0 8 0 amappl1 80 9236 0 8627 15 1 14 15 0 8 0 amappl 88 4208 0 4029 5 0 5 5 0 92 0 dma8192 8192 1 0 1 1 1 0 1 0 8 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 72 40 0 1 1 0 1 1 0 8 0 uaddrrnd 24 637 0 605 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 637 0 605 1 0 1 1 0 8 0 vmmpekpl 168 6821 0 6786 2 0 2 2 0 8 0 vmmpepl 168 45257 0 43195 100 9 91 99 0 357 1 vmsppl 488 636 0 605 5 0 5 5 0 8 1 rwobjpl 80 16223 0 13054 66 1 65 65 0 8 0 pdppl 4096 1282 0 1210 94 22 72 80 0 8 0 pvpl 32 15265 0 0 124 0 124 124 0 265 0 pmappl 256 636 0 605 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 274 0 29 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(ffffffff8336fbc1) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833af890,ffffffff833ad1c4,84,ffffffff8340817e) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(21,21) at rtmap_grow+0x24f rtable_add(20) at rtable_add+0x2d9 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(20) at rtable_add+0x2d9 sys/net/rtable.c:223 if_createrdomain(20,ffff800001481800) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014e6bf0,8020699f,ffff80003c467380,ffff80002effdcb8) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff80002effdcb8,ffff80003c467560,ffff80003c4674b0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c467560) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c467560) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3cdda39fa40, count: -10 ddb{0}> machine ddbcpu 1