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 *218191 37187 0 0 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833a1f5e) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833dec81,ffffffff833dab55,84,ffffffff83435e13) 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,ffff800000b2b000) at if_createrdomain+0x40 sys/net/if.c:1975 ifioctl(ffff800001651b28,8020699f,ffff80003c4e9a20,ffff80003c436a90) at ifioctl+0x1b40 sys/net/if.c:2324 sys_ioctl(ffff80003c436a90,ffff80003c4e9c00,ffff80003c4e9b50) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c4e9c00) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4e9c00) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdf02555fca0, 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(ffffffff833a1f5e) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833dec81,ffffffff833dab55,84,ffffffff83435e13) 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,ffff800000b2b000) at if_createrdomain+0x40 sys/net/if.c:1975 ifioctl(ffff800001651b28,8020699f,ffff80003c4e9a20,ffff80003c436a90) at ifioctl+0x1b40 sys/net/if.c:2324 sys_ioctl(ffff80003c436a90,ffff80003c4e9c00,ffff80003c4e9b50) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c4e9c00) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4e9c00) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdf02555fca0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c4e9730 rbx 0xffffffff837bce07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff80003c436a90 rax 0xffffffff837bbff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x22a8661eeb894fbd r11 0xf8b233faeb8dc2f5 r12 0xffffffff837bcc08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff82f02855 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c4e9720 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=218191 pid=37187 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=81, usrpri=82, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000ffffc008,0xffff80003c4382d0 process=0xffff8000fffe0e98 user=0xffff80003c4e4000, vmspace=0xfffffd80696c2210 estcpu=32, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 98140 288366 21066 0 2 0 syz-executor 98140 72582 21066 0 3 0x4000080 fsleep syz-executor 98140 250655 21066 0 3 0x4000080 fsleep syz-executor 98140 503776 21066 0 3 0x4000080 fsleep syz-executor 8794 455001 45807 0 2 0 syz-executor 8794 444616 45807 0 3 0x4000080 fsleep syz-executor 8794 272192 45807 0 3 0x4000080 fsleep syz-executor 8794 353602 45807 0 3 0x4000080 fsleep syz-executor 87685 217527 66828 0 2 0 syz-executor 87685 79643 66828 0 3 0x4000080 fsleep syz-executor 87685 392916 66828 0 3 0x4000080 fsleep syz-executor 68386 310152 1496 0 2 0 syz-executor 68386 79055 1496 0 3 0x4000080 fsleep syz-executor 4499 403304 26564 0 2 0 syz-executor 4499 13514 26564 0 3 0x4000080 fsleep syz-executor 37187 168752 67639 0 2 0 syz-executor 37187 413382 67639 0 2 0x4000000 syz-executor *37187 218191 67639 0 7 0x4000000 syz-executor 42588 46652 41712 0 2 0x3 syz-executor 44914 366091 41712 0 2 0x2 syz-executor 1496 501209 41712 0 2 0x3 syz-executor 52569 73336 1 0 3 0x100083 ttyopn getty 98306 69874 0 0 3 0x14280 nfsidl nfsio 98892 135706 0 0 3 0x14280 nfsidl nfsio 76749 464185 0 0 3 0x14280 nfsidl nfsio 86021 287005 0 0 3 0x14280 nfsidl nfsio 61528 453036 0 0 3 0x14280 nfsidl nfsio 68461 306706 0 0 3 0x14280 nfsidl nfsio 11730 476686 0 0 3 0x14280 nfsidl nfsio 79197 250563 0 0 3 0x14280 nfsidl nfsio 80368 20239 0 0 3 0x14280 nfsidl nfsio 20336 521527 0 0 3 0x14280 nfsidl nfsio 96164 169527 0 0 3 0x14280 nfsidl nfsio 21743 65118 0 0 3 0x14280 nfsidl nfsio 70514 349167 0 0 3 0x14280 nfsidl nfsio 53741 110033 0 0 3 0x14280 nfsidl nfsio 52109 139523 0 0 3 0x14280 nfsidl nfsio 42690 408674 0 0 3 0x14280 nfsidl nfsio 47244 102543 0 0 3 0x14280 nfsidl nfsio 46797 470075 0 0 3 0x14280 nfsidl nfsio 76334 4211 0 0 3 0x14280 nfsidl nfsio 49751 181853 0 0 3 0x14280 nfsidl nfsio 93329 121912 0 0 3 0x14200 acct acct 66828 3905 41712 0 2 0x3 syz-executor 26564 369927 41712 0 2 0x3 syz-executor 67639 171054 41712 0 2 0x3 syz-executor 21066 513616 41712 0 2 0x3 syz-executor 45807 222358 41712 0 2 0x3 syz-executor 41712 54987 85034 0 3 0x82 kqread syz-executor 85034 421978 76373 0 3 0x10008a sigsusp ksh 76373 107519 77219 0 3 0x98 kqread sshd-session 77219 476163 31444 0 3 0x92 kqread sshd-session 31444 42161 1 0 3 0x88 kqread sshd 57673 15899 61392 74 3 0x1100092 bpf pflogd 61392 281990 1 0 3 0x80 sbwait pflogd 87171 147888 46983 73 3 0x1100090 kqread syslogd 46983 470605 1 0 3 0x100082 sbwait syslogd 77395 183627 1 0 3 0x100080 kqread resolvd 68302 278764 45146 77 3 0x100092 kqread dhcpleased 84246 249480 45146 77 3 0x100092 kqread dhcpleased 45146 448970 1 0 3 0x80 kqread dhcpleased 87116 237187 0 0 3 0x14200 bored smr 84756 315336 0 0 2 0x14200 zerothread 92766 184484 0 0 3 0x14200 aiodoned aiodoned 44801 10768 0 0 3 0x14200 syncer update 32777 265972 0 0 3 0x14200 cleaner cleaner 72331 472331 0 0 3 0x14200 reaper reaper 50816 49043 0 0 3 0x14200 pgdaemon pagedaemon 92589 127331 0 0 3 0x14200 bored viomb 83919 415871 0 0 3 0x40014200 acpi0 acpi0 19369 246709 0 0 7 0x40014200 idle1 21663 160789 0 0 3 0x14200 bored softnet1 70728 421845 0 0 3 0x14200 bored softnet0 55639 174649 0 0 3 0x14200 bored systqmp 4281 165660 0 0 3 0x14200 bored systq 87606 467095 0 0 3 0x14200 tmoslp softclockmp 93698 404052 0 0 3 0x40014200 tmoslp softclock 38783 271589 0 0 3 0x40014200 idle0 1 385102 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb{0}> show all locks Process 37187 (syz-executor) thread 0xffff80003c436a90 (218191) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff83933048) #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:1975 #6 ifioctl+0x1b40 sys/net/if.c:2324 #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:765 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10195 11029K 12483K 166960K 13315 0 pcb 18 13K 20K 166960K 279 0 rtable 182 9K 9K 166960K 596 0 pf 28 16K 18K 166960K 141 0 ifaddr 31 5K 7K 166960K 110 0 ifgroup 43 2K 2K 166960K 181 0 sysctl 4 1K 9K 166960K 12 0 counters 62 36K 37K 166960K 332 0 ioctlops 0 0K 4K 166960K 1918 0 iov 0 0K 24K 166960K 122 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1389 87K 88K 166960K 2350 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 14 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 55 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 240K 166960K 1256 0 sigio 0 0K 0K 166960K 18 0 proc 72 115K 164K 166960K 735 0 subproc 72 4K 4K 166960K 99 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 149 0 in_multi 66 4K 7K 166960K 176 0 ether_multi 1 0K 0K 166960K 15 0 mrt 0 0K 0K 166960K 7 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 97 440K 440K 166960K 97 0 exec 0 0K 1K 166960K 551 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 249 167K 190K 166960K 13503 0 UVM aobj 29 10K 10K 166960K 32 0 pinsyscall 41 82K 100K 166960K 2479 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 54 0 NDP 9 0K 2K 166960K 77 0 temp 70 8666K 8791K 166960K 54648 0 kqueue 13 20K 30K 166960K 248 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 230 0 227 3 2 1 3 0 8 0 rtentry 176 175 0 104 6 1 5 6 0 8 0 unpcb 144 789 0 766 8 5 3 4 0 8 2 syncache 336 11 0 11 5 4 1 1 0 8 1 tcpqe 32 6 0 6 2 1 1 1 0 8 1 tcpcb 736 342 0 332 10 8 2 7 0 8 1 arp 136 29 0 16 1 0 1 1 0 8 0 inpcb 328 1231 0 1213 17 15 2 9 0 8 0 nd6 152 36 0 19 1 0 1 1 0 8 0 pkpcb 40 7 0 7 4 4 0 1 0 8 0 kcovpl 48 11 0 3 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 1 0 1 0 8 0 ppxss 1192 118 0 118 4 3 1 1 0 8 1 pppxif 1504 6 0 6 3 2 1 1 0 8 1 pffrag 232 10 0 5 1 0 1 1 0 482 0 pffrnode 88 10 0 5 1 0 1 1 0 8 0 pffrent 40 13 0 8 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 86 0 40 1 0 1 1 0 8 0 pfstkey 128 86 0 40 2 0 2 2 0 8 0 pfstate 448 86 0 40 6 0 6 6 0 8 0 pfrule 1344 21 0 15 2 0 2 2 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 710 0 409 29 9 20 29 0 8 1 art_table 40 713 0 409 5 0 5 5 0 8 0 art_node 32 173 0 110 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 14 2 1 1 1 0 8 0 semapl 112 49 0 39 1 0 1 1 0 8 0 shmpl 112 25 0 3 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 3675 0 2170 95 0 95 95 0 8 0 ffsino 296 3675 0 2170 117 0 117 117 0 8 0 nchpl 144 5361 0 3655 64 0 64 64 0 8 0 rtmask 32 8 0 8 4 4 0 1 0 8 0 vnodes 216 4278 0 0 238 0 238 238 0 8 0 namei 1024 17988 0 17987 1 0 1 1 0 8 0 percpumem 16 181 0 135 1 0 1 1 0 8 0 vcpupl 3968 4 0 0 1 0 1 1 0 8 0 vmpool 840 4 0 0 1 0 1 1 0 8 0 kstatmem 264 112 0 92 3 1 2 3 0 8 0 acpiwqpl 32 1 0 1 1 0 1 1 1 8 1 scsiplug 72 7 0 7 4 3 1 1 0 8 1 scxspl 216 26315 0 26315 12 10 2 8 1 8 2 plimitpl 152 466 0 448 1 0 1 1 0 8 0 sigapl 424 1574 0 1507 8 0 8 8 0 8 0 knotepl 120 522 0 0 16 0 16 16 0 8 0 kqueuepl 224 491 0 479 4 3 1 3 0 8 0 pipepl 344 224 0 197 3 0 3 3 0 8 0 fdescpl 528 1536 0 1506 3 0 3 3 0 8 0 filepl 160 9364 0 9135 24 13 11 17 0 8 0 lockfpl 104 395 0 393 1 0 1 1 0 8 0 lockfspl 48 177 0 175 1 0 1 1 0 8 0 sessionpl 144 32 0 23 1 0 1 1 0 8 0 pgrppl 48 58 0 41 1 0 1 1 0 8 0 ucredpl 104 1331 0 1318 1 0 1 1 0 8 0 zombiepl 144 1863 0 1863 2 1 1 1 0 8 1 processpl 1232 1574 0 1507 6 0 6 6 0 8 0 procpl 664 3516 0 3437 8 0 8 8 0 8 0 sosppl 176 9 0 9 3 3 0 1 0 8 0 sockpl 752 2326 0 2282 30 21 9 17 0 8 4 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 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 119 0 0 15 0 15 15 0 8 0 mcl2k 2048 39 0 0 5 0 5 5 0 8 0 mtagpl 96 27 0 0 1 0 1 1 0 8 0 mbufpl 256 1166 0 0 73 0 73 73 0 8 0 bufpl 280 10201 0 4064 439 0 439 439 0 8 0 anonpl 32 10029 0 0 81 0 81 81 0 246 0 amapchunkpl 152 45926 0 45407 42 13 29 34 0 158 6 amappl16 200 5140 0 4867 54 33 21 22 0 8 6 amappl15 192 6 0 6 1 1 0 1 0 8 0 amappl14 184 6 0 6 1 1 0 1 0 8 0 amappl13 176 460 0 459 1 0 1 1 0 8 0 amappl12 168 1936 0 1895 4 1 3 3 0 8 0 amappl11 160 6 0 5 1 0 1 1 0 8 0 amappl10 152 48 0 34 1 0 1 1 0 8 0 amappl9 144 257 0 257 1 1 0 1 0 8 0 amappl8 136 30 0 27 1 0 1 1 0 8 0 amappl7 128 132 0 131 1 0 1 1 0 8 0 amappl6 120 322 0 309 1 0 1 1 0 8 0 amappl5 112 82 0 72 1 0 1 1 0 8 0 amappl4 104 463 0 433 1 0 1 1 0 8 0 amappl3 96 7841 0 7748 4 1 3 3 0 8 0 amappl2 88 1684 0 1608 2 0 2 2 0 8 0 amappl1 80 15530 0 14945 16 1 15 15 0 8 0 amappl 88 12505 0 12334 5 0 5 5 0 92 0 uvmvnodes 80 144 0 0 3 0 3 3 0 8 0 dma65536 65536 1 0 1 1 1 0 1 0 8 0 dma32768 32768 2 0 2 2 2 0 1 0 8 0 dma8192 8192 1 0 1 1 0 1 1 0 8 1 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 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 31 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1536 0 1506 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1536 0 1506 1 0 1 1 0 8 0 vmmpekpl 168 14095 0 14044 3 0 3 3 0 8 0 vmmpepl 168 105161 0 103041 119 16 103 103 0 357 2 vmsppl 488 1535 0 1506 6 1 5 5 0 8 0 rwobjpl 80 30551 0 29206 34 3 31 31 0 8 0 pdppl 4096 3088 0 3016 119 41 78 82 0 8 6 pvpl 32 17283 0 0 140 0 140 140 0 265 0 pmappl 256 1539 0 1506 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 379 0 69 10 0 10 10 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(ffffffff833a1f5e) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833dec81,ffffffff833dab55,84,ffffffff83435e13) 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,ffff800000b2b000) at if_createrdomain+0x40 sys/net/if.c:1975 ifioctl(ffff800001651b28,8020699f,ffff80003c4e9a20,ffff80003c436a90) at ifioctl+0x1b40 sys/net/if.c:2324 sys_ioctl(ffff80003c436a90,ffff80003c4e9c00,ffff80003c4e9b50) at sys_ioctl+0x674 sys/kern/sys_generic.c:-1 syscall(ffff80003c4e9c00) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4e9c00) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdf02555fca0, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff8000299edff0) 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 acpicpu_idle() at acpicpu_idle+0x457 sys/dev/acpi/acpicpu_x86.c:1224 sched_idle(ffff8000299edff0) at sched_idle+0x391 sys/kern/kern_sched.c:191 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff8000299edff0) 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 acpicpu_idle() at acpicpu_idle+0x457 sys/dev/acpi/acpicpu_x86.c:1224 sched_idle(ffff8000299edff0) at sched_idle+0x391 sys/kern/kern_sched.c:191 end trace frame: 0x0, count: -5