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 * 22870 15614 0 0 0x4000000 0 syz-executor 181490 6861 0 0x2 0x1 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83373e37) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833b09bc,ffffffff833ae9ea,84,ffffffff834093ea) 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,ffff800001486000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014ec9b0,8020699f,ffff80003c49b170,ffff800037c21788) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff800037c21788,ffff80003c49b350,ffff80003c49b2a0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c49b350) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c49b350) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6b256ae6dc0, 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(ffffffff83373e37) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833b09bc,ffffffff833ae9ea,84,ffffffff834093ea) 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,ffff800001486000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014ec9b0,8020699f,ffff80003c49b170,ffff800037c21788) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff800037c21788,ffff80003c49b350,ffff80003c49b2a0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c49b350) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c49b350) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6b256ae6dc0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c49ae80 rbx 0xffffffff837d4ddf cpu_info_full_primary+0x2ddf rdx 0 rcx 0xffff800037c21788 rax 0xffffffff837d3ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x581aea1605215f11 r11 0xc6adab690977069e r12 0xffffffff837d4be0 cpu_info_full_primary+0x2be0 r13 0 r14 0 r15 0x1 rip 0xffffffff8295d045 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c49ae70 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=22870 pid=15614 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=0xffff800037c214f0,0xffffffff83871c48 process=0xffff800037c24ec0 user=0xffff80003c496000, vmspace=0xfffffd800ebb3208 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 15614 315230 85325 0 2 0 syz-executor 15614 513752 85325 0 2 0x4000000 syz-executor *15614 22870 85325 0 7 0x4000000 syz-executor 56364 259862 21395 0 3 0x80 nanoslp syz-executor 56364 387954 21395 0 3 0x4000080 fifow syz-executor 56364 414930 21395 0 3 0x4000080 kqsel syz-executor 56364 289637 21395 0 3 0x4000080 fsleep syz-executor 11077 7201 64002 0 3 0x82 sysctllk syz-executor 18572 292271 13744 0 3 0x3000 suspend syz-executor 18572 331060 13744 0 3 0x4081000 sysctllk syz-executor 60107 100872 64002 0 3 0x82 sysctllk syz-executor 47535 78798 64002 0 3 0x82 sysctllk syz-executor 72001 303684 1 0 3 0x80 fsleep syz-executor 72001 49767 1 0 3 0x4000000 sysctllk syz-executor 80652 290046 64002 0 3 0x82 sysctllk syz-executor 6354 389592 1 0 3 0x82 sysctllk getty 70528 207151 97082 0 3 0x82 sysctllk sshd-session 78356 100917 1 0 3 0 vmmapbsy syz-executor 78356 325410 1 0 3 0x4000000 vmmapbsy syz-executor 78356 439077 1 0 3 0x4000080 msgwait syz-executor 78356 492371 1 0 2 0x4000c00 syz-executor 25854 174994 0 0 3 0x14200 bored sosplice 85325 93031 64002 0 2 0xc82 syz-executor 21395 434418 64002 0 3 0x82 nanoslp syz-executor 13744 273667 64002 0 3 0x82 wait syz-executor 6861 181490 64002 0 7 0x3 syz-executor 64002 65282 15444 0 3 0x82 kqread syz-executor 15444 430883 80442 0 3 0x10008a sigsusp ksh 80442 289472 55452 0 3 0x98 kqread sshd-session 55452 499475 97082 0 3 0x92 kqread sshd-session 97082 340679 1 0 3 0x88 kqread sshd 65341 206187 8076 74 3 0x1100092 bpf pflogd 8076 337728 1 0 3 0x80 sbwait pflogd 15690 142106 48730 73 3 0x1100090 kqread syslogd 48730 20685 1 0 3 0x100082 sbwait syslogd 3998 335798 1 0 3 0x100080 kqread resolvd 43807 18263 16548 77 3 0x100092 sysctllk dhcpleased 3171 285678 16548 77 3 0x100092 kqread dhcpleased 16548 39808 1 0 3 0x80 kqread dhcpleased 34597 199695 0 0 3 0x14200 bored smr 98636 129569 0 0 3 0x14200 pgzero zerothread 31102 51062 0 0 3 0x14200 aiodoned aiodoned 15748 509845 0 0 3 0x14200 syncer update 21094 14009 0 0 3 0x14200 cleaner cleaner 39308 55709 0 0 3 0x14200 reaper reaper 78286 202670 0 0 3 0x14200 pgdaemon pagedaemon 52362 21769 0 0 3 0x14200 bored viomb 93831 353451 0 0 3 0x40014200 acpi0 acpi0 22352 39625 0 0 3 0x40014200 idle1 46728 209089 0 0 3 0x14200 bored softnet7 43756 209598 0 0 3 0x14200 bored softnet6 88883 118809 0 0 3 0x14200 bored softnet5 59385 351919 0 0 3 0x14200 bored softnet4 25637 319502 0 0 3 0x14200 bored softnet3 11390 172640 0 0 3 0x14200 bored softnet2 71619 182533 0 0 3 0x14200 bored softnet1 71811 35887 0 0 3 0x14200 bored softnet0 58689 100151 0 0 3 0x14200 bored systqmp 82806 510684 0 0 3 0x14200 bored systq 10772 63435 0 0 3 0x14200 tmoslp softclockmp 50132 177161 0 0 2 0x40014200 softclock 4826 305535 0 0 3 0x40014200 idle0 1 119450 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb{0}> show all locks Process 15614 (syz-executor) thread 0xffff800037c21788 (22870) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff83871998) #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 78356 (syz-executor) thread 0xffff80003c459a18 (325410) exclusive rrwlock inode r = 0 (0xfffffd806b91bec0) #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+0xa3 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:748 #9 Xsyscall+0x128 Process 78356 (syz-executor) thread 0xffff80002a2de550 (492371) exclusive rwlock sysctllk r = 0 (0xffffffff837d7758) #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 sysctl_vslock+0x45 sys/kern/kern_sysctl.c:191 #3 sys_sysctl+0x371 sys/kern/kern_sysctl.c:301 #4 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:748 #5 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10218 11132K 11304K 166960K 12552 0 pcb 18 14K 15K 166960K 389 0 rtable 164 8K 8K 166960K 498 0 pf 41 19K 82K 166960K 206 0 ifaddr 33 5K 7K 166960K 132 0 ifgroup 53 2K 2K 166960K 224 0 sysctl 1 1K 9K 166960K 19 0 counters 68 36K 37K 166960K 252 0 ioctlops 0 0K 4K 166960K 1712 0 iov 0 0K 24K 166960K 101 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1342 84K 85K 166960K 2585 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 13K 166960K 29 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 48 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 45K 93K 166960K 1540 0 sigio 0 0K 0K 166960K 71 0 proc 63 99K 164K 166960K 667 0 subproc 54 3K 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 164 0 in_multi 53 4K 7K 166960K 171 0 ether_multi 1 0K 0K 166960K 19 0 mrt 3 0K 0K 166960K 14 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 574 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 237 142K 170K 166960K 15872 0 UVM aobj 41 5K 5K 166960K 46 0 pinsyscall 43 86K 107K 166960K 2657 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 70 0 NDP 12 0K 2K 166960K 83 0 temp 73 8651K 8731K 166960K 85548 0 kqueue 14 22K 31K 166960K 344 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 125 0 122 1 0 1 1 0 8 0 rtentry 176 168 0 109 5 0 5 5 0 8 0 unpcb 144 1329 0 1307 21 19 2 6 0 8 1 syncache 336 4 0 4 2 2 0 1 0 8 0 tcpcb 736 522 0 515 13 11 2 7 0 8 1 arp 128 23 0 11 1 0 1 1 0 8 0 inpcb 328 1631 0 1616 22 20 2 10 0 8 0 nd6 144 20 0 11 1 0 1 1 0 8 0 pkpcb 40 13 0 13 7 6 1 1 0 8 1 kcovpl 48 8 0 2 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 1 0 1 0 8 0 ppxss 1192 71 0 70 6 5 1 1 0 8 0 pppxif 1504 13 0 13 6 5 1 1 0 8 1 pfstscr 40 3 0 3 2 2 0 1 0 8 0 pffrag 232 12 0 11 1 0 1 1 0 482 0 pffrnode 88 12 0 11 1 0 1 1 0 8 0 pffrent 40 16 0 15 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 pfrktable 1344 1 0 1 1 1 0 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfstitem 24 118 0 93 1 0 1 1 0 8 0 pfstkey 128 121 0 94 3 0 3 3 0 8 0 pfstate 384 116 0 93 7 2 5 7 0 8 0 pfrule 1344 30 0 25 2 1 1 2 0 8 0 rttmr 136 3 0 3 2 2 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 789 0 514 28 7 21 28 0 8 0 art_table 40 791 0 514 5 0 5 5 0 8 0 art_node 32 165 0 117 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 4 1 0 1 1 0 8 0 semapl 112 43 0 33 1 0 1 1 0 8 0 shmpl 112 43 0 5 2 0 2 2 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 4443 0 2933 95 0 95 95 0 8 0 ffsino 296 4443 0 2933 117 0 117 117 0 8 0 nchpl 144 6650 0 4949 64 0 64 64 0 8 0 rtmask 32 17 0 17 6 6 0 1 0 8 0 uvmvnodes 80 5049 0 0 104 0 104 104 0 8 0 vnodes 216 5049 0 0 281 0 281 281 0 8 0 namei 1024 22283 0 22283 3 2 1 2 0 8 1 percpumem 16 141 0 92 1 0 1 1 0 8 0 kstatmem 264 136 0 108 7 4 3 3 0 8 0 scsiplug 72 5 0 5 3 3 0 1 0 8 0 scxspl 216 29436 0 29436 11 10 1 8 1 8 1 plimitpl 152 368 0 348 1 0 1 1 0 8 0 sigapl 424 1852 0 1798 7 0 7 7 0 8 0 knotepl 120 811 0 0 25 0 25 25 0 8 0 kqueuepl 224 757 0 745 14 12 2 5 0 8 1 pipepl 344 400 0 371 12 9 3 6 0 8 0 fdescpl 528 1826 0 1795 3 0 3 3 0 8 0 filepl 160 12344 0 12137 38 26 12 17 0 8 2 lockfpl 104 635 0 633 2 1 1 2 0 8 0 lockfspl 48 263 0 261 1 0 1 1 0 8 0 sessionpl 144 24 0 15 1 0 1 1 0 8 0 pgrppl 48 91 0 72 1 0 1 1 0 8 0 ucredpl 104 2183 0 2170 1 0 1 1 0 8 0 zombiepl 144 2354 0 2352 2 1 1 1 0 8 0 processpl 1248 1852 0 1798 5 0 5 5 0 8 0 procpl 664 4501 0 4437 7 0 7 7 0 8 0 sosppl 168 15 0 15 6 6 0 1 0 8 0 sockpl 752 3139 0 3099 57 52 5 18 0 8 0 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 12 0 0 2 0 2 2 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 121 0 0 15 0 15 15 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 78 0 0 8 1 7 7 0 8 0 mtagpl 96 68 0 0 2 0 2 2 0 8 0 mbufpl 256 419 0 0 25 0 25 25 0 8 0 bufpl 280 12902 0 6759 440 0 440 440 0 8 0 anonpl 32 10764 0 0 87 0 87 87 0 246 0 amapchunkpl 152 55025 0 54569 57 25 32 32 0 158 12 amappl16 200 6263 0 6219 78 64 14 24 0 8 8 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 157 0 143 1 0 1 1 0 8 0 amappl13 176 2 0 2 1 1 0 1 0 8 0 amappl12 168 2466 0 2441 4 2 2 3 0 8 0 amappl11 160 53 0 38 1 0 1 1 0 8 0 amappl10 152 10 0 10 2 2 0 1 0 8 0 amappl9 144 255 0 255 1 1 0 1 0 8 0 amappl8 136 55 0 52 1 0 1 1 0 8 0 amappl7 128 134 0 120 1 0 1 1 0 8 0 amappl6 120 178 0 174 1 0 1 1 0 8 0 amappl5 112 121 0 111 1 0 1 1 0 8 0 amappl4 104 304 0 285 1 0 1 1 0 8 0 amappl3 96 11143 0 11042 5 1 4 4 0 8 0 amappl2 88 666 0 595 2 0 2 2 0 8 0 amappl1 80 14085 0 13466 16 2 14 15 0 8 0 amappl 88 15080 0 14922 5 0 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 9 0 9 4 3 1 1 0 8 1 dma128 128 254 0 254 2 2 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 45 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1826 0 1795 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1826 0 1795 1 0 1 1 0 8 0 vmmpekpl 168 16483 0 16435 3 0 3 3 0 8 0 vmmpepl 168 120003 0 118079 124 30 94 108 0 357 1 vmsppl 488 1825 0 1795 5 1 4 5 0 8 0 rwobjpl 80 37447 0 31378 132 4 128 128 0 8 0 pdppl 4096 3660 0 3590 106 36 70 86 0 8 0 pvpl 32 18262 0 0 149 1 148 148 0 265 0 pmappl 256 1825 0 1795 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 314 0 64 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(ffffffff83373e37) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833b09bc,ffffffff833ae9ea,84,ffffffff834093ea) 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,ffff800001486000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014ec9b0,8020699f,ffff80003c49b170,ffff800037c21788) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff800037c21788,ffff80003c49b350,ffff80003c49b2a0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c49b350) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c49b350) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6b256ae6dc0, count: -10 ddb{0}> machine ddbcpu 1