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 *500280 24897 0 0 0x4000000 0 syz-executor 109951 90990 0 0x2 0x1 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833751de) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833b16f1,ffffffff833afdc1,84,ffffffff8340a8dd) 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,ffff800001478800) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014b1818,8020699f,ffff80003c461290,ffff80003c45a558) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff80003c45a558,ffff80003c461470,ffff80003c4613c0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c461470) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c461470) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x641451579e0, 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(ffffffff833751de) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833b16f1,ffffffff833afdc1,84,ffffffff8340a8dd) 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,ffff800001478800) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014b1818,8020699f,ffff80003c461290,ffff80003c45a558) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff80003c45a558,ffff80003c461470,ffff80003c4613c0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c461470) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c461470) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x641451579e0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c460fa0 rbx 0xffffffff837d9ddf cpu_info_full_primary+0x2ddf rdx 0 rcx 0xffff80003c45a558 rax 0xffffffff837d8ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x62981fa18b7f496d r11 0x8d49cb7cf1a33a08 r12 0xffffffff837d9be0 cpu_info_full_primary+0x2be0 r13 0 r14 0 r15 0x1 rip 0xffffffff81a1d0d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c460f90 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=500280 pid=24897 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=0xffff80003c45b250,0xffffffff839572d0 process=0xffff800038c27040 user=0xffff80003c45c000, vmspace=0xfffffd8069b01208 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 24897 339903 39818 0 2 0 syz-executor 24897 367205 39818 0 2 0x4000000 syz-executor *24897 500280 39818 0 7 0x4000000 syz-executor 61768 152278 73025 0 2 0 syz-executor 61768 237996 73025 0 3 0x4000080 fsleep syz-executor 12908 9150 97262 0 2 0 syz-executor 12908 440857 97262 0 3 0x4000080 fsleep syz-executor 73958 411804 80876 0 2 0 syz-executor 46169 101384 90990 0 2 0 syz-executor 46169 380816 90990 0 3 0x4000080 fsleep syz-executor 46169 152710 90990 0 3 0x4000080 fsleep syz-executor 46169 372256 90990 0 3 0x4000080 fsleep syz-executor 45515 496586 69822 0 2 0 syz-executor 45515 185280 69822 0 3 0x4000080 fsleep syz-executor 45515 177705 69822 0 3 0x4000080 fsleep syz-executor 82169 353368 83806 0 3 0x3000 suspend syz-executor 82169 178494 83806 0 2 0x4081000 syz-executor 82098 440387 0 0 3 0x14200 acct acct 85889 259243 0 0 3 0x14200 bored sosplice 73025 446815 48404 0 3 0x82 nanoslp syz-executor 97262 12698 48404 0 2 0x2 syz-executor 80876 311747 48404 0 2 0xc82 syz-executor 53090 172449 48404 0 2 0x2 syz-executor 90990 109951 48404 0 7 0x3 syz-executor 83806 491664 48404 0 3 0x82 wait syz-executor 39818 371075 48404 0 3 0x82 nanoslp syz-executor 69822 236397 48404 0 2 0xc82 syz-executor 48404 79088 89635 0 3 0x82 kqread syz-executor 89635 515531 6147 0 3 0x10008a sigsusp ksh 6147 479524 10572 0 3 0x98 kqread sshd-session 10572 149571 2604 0 3 0x92 kqread sshd-session 44655 219308 1 0 3 0x100083 ttyin getty 2604 73377 1 0 3 0x88 kqread sshd 72670 243958 20606 74 3 0x1100092 bpf pflogd 20606 53202 1 0 3 0x80 sbwait pflogd 98944 460673 39645 73 3 0x1100090 kqread syslogd 39645 372372 1 0 3 0x100082 sbwait syslogd 65624 293609 1 0 3 0x100080 kqread resolvd 36736 414291 63853 77 3 0x100092 kqread dhcpleased 77947 54790 63853 77 3 0x100092 kqread dhcpleased 63853 475185 1 0 3 0x80 kqread dhcpleased 44008 378003 0 0 3 0x14200 bored smr 26064 515433 0 0 2 0x14200 zerothread 72789 171717 0 0 3 0x14200 aiodoned aiodoned 77838 154285 0 0 3 0x14200 syncer update 95978 245950 0 0 3 0x14200 cleaner cleaner 31735 82892 0 0 3 0x14200 reaper reaper 12424 463224 0 0 3 0x14200 pgdaemon pagedaemon 35523 98876 0 0 3 0x14200 bored viomb 38338 472155 0 0 3 0x40014200 acpi0 acpi0 87722 114400 0 0 3 0x40014200 idle1 83176 215430 0 0 3 0x14200 bored softnet7 21856 404918 0 0 3 0x14200 bored softnet6 41063 478507 0 0 3 0x14200 bored softnet5 10539 68848 0 0 3 0x14200 bored softnet4 16481 513262 0 0 3 0x14200 bored softnet3 50424 171298 0 0 3 0x14200 bored softnet2 54874 363631 0 0 3 0x14200 bored softnet1 74610 514855 0 0 3 0x14200 bored softnet0 2353 328272 0 0 3 0x14200 bored systqmp 26250 241414 0 0 3 0x14200 bored systq 43822 422266 0 0 3 0x14200 tmoslp softclockmp 98880 287242 0 0 3 0x40014200 tmoslp softclock 94308 476179 0 0 3 0x40014200 idle0 1 322028 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 24897 (syz-executor) thread 0xffff80003c45a558 (500280) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff8395afa8) #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:746 #9 Xsyscall+0x128 Process 82169 (syz-executor) thread 0xffff80003c45ad20 (178494) exclusive rrwlock inode r = 0 (0xfffffd806989b8f8) #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:746 #9 Xsyscall+0x128 Process 53090 (syz-executor) thread 0xffff8000ffff3768 (172449) exclusive rwlock vmmaplk r = 0 (0xfffffd8069b01c90) #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 uvmspace_fork+0x12b sys/uvm/uvm_map.c:3738 #4 process_new+0x577 sys/kern/kern_fork.c:281 #5 fork1+0x3f6 sys/kern/kern_fork.c:-1 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 #7 Xsyscall+0x128 exclusive rwlock vmmaplk r = 0 (0xfffffd800b0276b8) #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 uvmspace_fork+0x44 sys/uvm/uvm_map.c:3729 #4 process_new+0x577 sys/kern/kern_fork.c:281 #5 fork1+0x3f6 sys/kern/kern_fork.c:-1 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:746 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10244 11090K 11169K 166960K 11467 0 pcb 18 14K 16K 166960K 131 0 rtable 203 7K 7K 166960K 375 0 pf 36 18K 19K 166960K 71 0 ifaddr 43 7K 7K 166960K 59 0 ifgroup 55 2K 2K 166960K 77 0 sysctl 2 1K 9K 166960K 6 0 counters 68 36K 37K 166960K 94 0 ioctlops 0 0K 4K 166960K 1577 0 iov 0 0K 12K 166960K 9 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1405 88K 89K 166960K 1600 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 8 0 VM map 2 1K 1K 166960K 2 0 sem 7 0K 0K 166960K 8 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 236K 166960K 367 0 sigio 0 0K 0K 166960K 3 0 proc 73 131K 164K 166960K 554 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 32 0 in_multi 99 7K 7K 166960K 108 0 ether_multi 1 0K 0K 166960K 3 0 mrt 0 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 241 1076K 1076K 166960K 241 0 exec 0 0K 1K 166960K 450 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 152K 165K 166960K 5045 0 UVM aobj 8 2K 2K 166960K 8 0 pinsyscall 43 86K 104K 166960K 1462 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 16 0 NDP 12 0K 2K 166960K 39 0 temp 76 8647K 8713K 166960K 17923 0 kqueue 14 22K 28K 166960K 68 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 51 0 48 1 0 1 1 0 8 0 rtentry 176 103 0 16 5 0 5 5 0 8 0 unpcb 144 424 0 401 9 3 6 6 0 8 5 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 736 112 0 106 4 1 3 4 0 8 2 arp 128 12 0 1 1 0 1 1 0 8 0 inpcb 328 459 0 448 12 7 5 7 0 8 4 nd6 144 17 0 1 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 1 0 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1192 13 0 13 1 0 1 1 0 8 1 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 pfstitem 24 37 0 2 1 0 1 1 0 8 0 pfstkey 128 41 0 6 2 0 2 2 0 8 0 pfstate 384 38 0 4 4 0 4 4 0 8 0 pfrule 1344 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 478 0 46 28 1 27 28 0 8 0 art_table 40 480 0 46 5 0 5 5 0 8 0 art_node 32 103 0 26 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 2 1 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 5 0 0 1 0 1 1 0 8 0 shmpl 112 5 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2001 0 487 95 0 95 95 0 8 0 ffsino 296 2001 0 487 117 0 117 117 0 8 0 nchpl 144 2524 0 830 64 1 63 64 0 8 0 uvmvnodes 80 2244 0 0 46 0 46 46 0 8 0 vnodes 216 2244 0 0 125 0 125 125 0 8 0 namei 1024 8300 0 8300 3 2 1 2 0 8 1 percpumem 16 62 0 13 1 0 1 1 0 8 0 kstatmem 264 48 0 22 3 0 3 3 0 8 1 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 13072 0 13072 14 6 8 8 1 8 8 plimitpl 152 57 0 39 1 0 1 1 0 8 0 sigapl 424 667 0 611 7 0 7 7 0 8 0 knotepl 120 305 0 0 10 0 10 10 0 8 0 kqueuepl 224 95 0 84 1 0 1 1 0 8 0 pipepl 344 135 0 107 3 0 3 3 0 8 0 fdescpl 528 643 0 611 3 0 3 3 0 8 0 filepl 160 3683 0 3455 22 6 16 18 0 8 6 lockfpl 104 66 0 63 1 0 1 1 0 8 0 lockfspl 48 34 0 31 1 0 1 1 0 8 0 sessionpl 144 22 0 13 1 0 1 1 0 8 0 pgrppl 48 33 0 16 1 0 1 1 0 8 0 ucredpl 104 429 0 416 1 0 1 1 0 8 0 zombiepl 144 737 0 736 1 0 1 1 0 8 0 processpl 1232 667 0 611 5 0 5 5 0 8 0 procpl 664 1085 0 1019 7 1 6 7 0 8 0 sosppl 168 4 0 4 1 0 1 1 0 8 1 sockpl 752 1009 0 972 31 20 11 17 0 8 7 mcl64k 65536 3 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 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 118 0 0 15 0 15 15 0 8 0 mcl2k 2048 63 0 0 8 0 8 8 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 220 0 0 14 0 14 14 0 8 0 bufpl 280 5554 0 124 388 0 388 388 0 8 0 anonpl 32 10160 0 0 83 1 82 82 0 246 0 amapchunkpl 152 16284 0 15722 39 10 29 29 0 158 2 amappl16 200 2314 0 2107 21 4 17 17 0 8 6 amappl15 192 23 0 23 1 1 0 1 0 8 0 amappl14 184 116 0 104 1 0 1 1 0 8 0 amappl13 176 11 0 11 1 1 0 1 0 8 0 amappl12 168 1316 0 1285 2 0 2 2 0 8 0 amappl11 160 51 0 37 1 0 1 1 0 8 0 amappl10 152 9 0 9 2 2 0 1 0 8 0 amappl9 144 254 0 254 1 1 0 1 0 8 0 amappl8 136 35 0 31 1 0 1 1 0 8 0 amappl7 128 107 0 95 1 0 1 1 0 8 0 amappl6 120 175 0 172 1 0 1 1 0 8 0 amappl5 112 122 0 112 1 0 1 1 0 8 0 amappl4 104 302 0 282 1 0 1 1 0 8 0 amappl3 96 2785 0 2668 4 0 4 4 0 8 0 amappl2 88 653 0 589 2 0 2 2 0 8 0 amappl1 80 9186 0 8586 15 2 13 15 0 8 0 amappl 88 4316 0 4137 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 7 0 7 2 2 0 1 0 8 0 dma128 128 255 0 255 2 1 1 1 0 8 1 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 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 643 0 611 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 643 0 611 1 0 1 1 0 8 0 vmmpekpl 168 6862 0 6823 3 0 3 3 0 8 0 vmmpepl 168 46884 0 44676 103 0 103 103 0 357 2 vmsppl 488 642 0 611 5 1 4 5 0 8 0 rwobjpl 80 17515 0 14139 70 1 69 69 0 8 0 pdppl 4096 1294 0 1222 98 26 72 86 0 8 0 pvpl 32 21166 0 0 172 1 171 171 0 265 0 pmappl 256 642 0 611 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 281 0 34 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(ffffffff833751de) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833b16f1,ffffffff833afdc1,84,ffffffff8340a8dd) 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,ffff800001478800) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff8000014b1818,8020699f,ffff80003c461290,ffff80003c45a558) at ifioctl+0x1c66 sys/net/if.c:2301 sys_ioctl(ffff80003c45a558,ffff80003c461470,ffff80003c4613c0) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c461470) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c461470) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x641451579e0, count: -10 ddb{0}> machine ddbcpu 1