panic: kernel diagnostic assertion "map->limit == rtmap_limit" failed: file "/syzkaller/managers/main/kernel/sys/net/rtable.c", line 132 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *151639 38996 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83340d7d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a5da,ffffffff83358ee4,84,ffffffff833cdad4) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(6,21) at rtmap_grow+0x1f2 rtable_add(5) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(5) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(5,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800001485378,8020699f,ffff80003c9bef60,ffff800031530558) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff800031530558,ffff80003c9bf130,ffff80003c9bf080) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c9bf130) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9bf130) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7de00a47140, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "map->limit == rtmap_limit" failed: file "/syzkaller/managers/main/kernel/sys/net/rtable.c", line 132 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83340d7d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a5da,ffffffff83358ee4,84,ffffffff833cdad4) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(6,21) at rtmap_grow+0x1f2 rtable_add(5) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(5) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(5,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800001485378,8020699f,ffff80003c9bef60,ffff800031530558) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff800031530558,ffff80003c9bf130,ffff80003c9bf080) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c9bf130) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9bf130) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7de00a47140, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c9bec90 rbx 0x21 rdx 0 rcx 0 rax 0xffff800031530558 r8 0x101010101010101 r9 0x8080808080808080 r10 0x706914564deac8af r11 0x95c6800aa49eadf5 r12 0 r13 0x1 r14 0 r15 0x1 rip 0xffffffff82f51025 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c9bec80 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=151639 pid=38996 tcnt=4 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=0xffff800031531a18,0xffff80002a7f5788 process=0xffff8000ffff9218 user=0xffff80003c9ba000, vmspace=0xfffffd806ba4ed00 estcpu=0, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 38996 129578 85706 0 2 0 syz-executor 38996 388328 85706 0 2 0x4000000 syz-executor *38996 151639 85706 0 7 0x4000000 syz-executor 38996 434611 85706 0 3 0x4000080 fsleep syz-executor 44552 11798 72152 0 2 0 syz-executor 44552 479045 72152 0 3 0x4000080 fsleep syz-executor 23568 210913 77016 0 2 0 syz-executor 23568 365004 77016 0 3 0x4000080 fsleep syz-executor 23568 289713 77016 0 3 0x4000080 fsleep syz-executor 93563 364805 76820 0 2 0 syz-executor 93563 369084 76820 0 3 0x4000080 fsleep syz-executor 93563 487624 76820 0 3 0x4000080 fsleep syz-executor 26746 464078 74471 0 2 0 syz-executor 26746 234245 74471 0 3 0x4000080 fsleep syz-executor 26746 50222 74471 0 3 0x4000080 fsleep syz-executor 58779 375207 59126 0 2 0 syz-executor 58779 220441 59126 0 3 0x4000080 ttyopn syz-executor 58779 435290 59126 0 3 0x4000080 ttyopn syz-executor 58779 265554 59126 0 3 0x4000080 fsleep syz-executor 58779 446564 59126 0 3 0x4000080 fsleep syz-executor 46244 60952 91157 0 2 0 syz-executor 46244 49308 91157 0 3 0x4000080 fsleep syz-executor 46244 490543 91157 0 3 0x4000080 fsleep syz-executor 93137 196360 74637 0 3 0x3000 suspend syz-executor 93137 214926 74637 0 2 0x4081000 syz-executor 9012 329229 0 0 3 0x14200 bored sosplice 91157 226050 95393 0 2 0xc82 syz-executor 76820 482914 95393 0 3 0x82 nanoslp syz-executor 72152 87360 95393 0 3 0x82 nanoslp syz-executor 85706 71181 95393 0 2 0xc82 syz-executor 77016 422074 95393 0 3 0x82 nanoslp syz-executor 74471 482877 95393 0 3 0x82 nanoslp syz-executor 74637 77262 95393 0 2 0xc82 syz-executor 59126 454835 95393 0 3 0x82 nanoslp syz-executor 95393 10057 13546 0 3 0x82 kqread syz-executor 13546 453761 28613 0 3 0x10008a sigsusp ksh 28613 311963 42988 0 3 0x98 kqread sshd-session 42988 425232 86200 0 3 0x92 kqread sshd-session 41057 51010 1 0 3 0x100083 ttyopn getty 86200 55556 1 0 3 0x88 kqread sshd 9898 75614 98358 73 3 0x1100090 kqread syslogd 98358 461477 1 0 3 0x100082 sbwait syslogd 65118 484394 1 0 3 0x100080 kqread resolvd 94024 433177 47084 77 3 0x100092 kqread dhcpleased 82128 442703 47084 77 3 0x100092 kqread dhcpleased 47084 396223 1 0 3 0x80 kqread dhcpleased 40826 203922 0 0 3 0x14200 bored smr 55767 30379 0 0 2 0x14200 zerothread 25513 249802 0 0 3 0x14200 aiodoned aiodoned 53770 56699 0 0 3 0x14200 syncer update 95641 128523 0 0 3 0x14200 cleaner cleaner 51030 125031 0 0 3 0x14200 reaper reaper 55637 250883 0 0 3 0x14200 pgdaemon pagedaemon 67608 449737 0 0 3 0x14200 bored viomb 93159 147799 0 0 3 0x40014200 acpi0 acpi0 22828 434989 0 0 3 0x14200 bored softnet7 6479 98094 0 0 3 0x14200 bored softnet6 13023 392032 0 0 3 0x14200 bored softnet5 62156 122590 0 0 3 0x14200 bored softnet4 44454 254883 0 0 3 0x14200 bored softnet3 15243 356200 0 0 3 0x14200 bored softnet2 16591 464818 0 0 3 0x14200 bored softnet1 10270 437545 0 0 3 0x14200 bored softnet0 46905 512586 0 0 3 0x14200 bored systqmp 44796 516169 0 0 3 0x14200 bored systq 93794 30006 0 0 2 0x40014200 softclock 32874 333288 0 0 3 0x40014200 idle0 1 89326 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10189 11107K 11382K 166960K 11489 0 pcb 21 12K 12K 166960K 41 0 rtable 219 7K 7K 166960K 275 0 pf 31 13K 14K 166960K 40 0 ifaddr 42 7K 7K 166960K 47 0 ifgroup 50 2K 2K 166960K 56 0 sysctl 3 1K 9K 166960K 7 0 counters 32 17K 18K 166960K 37 0 ioctlops 0 0K 4K 166960K 39 0 iov 0 0K 28K 166960K 4 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1344 85K 85K 166960K 1429 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 5 0K 0K 166960K 6 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 97K 166960K 228 0 sigio 0 0K 0K 166960K 2 0 proc 60 59K 124K 166960K 479 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 12 0 in_multi 99 7K 7K 166960K 99 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 103 466K 466K 166960K 103 0 exec 0 0K 1K 166960K 346 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 168K 166960K 3599 0 UVM aobj 6 2K 2K 166960K 6 0 pinsyscall 39 78K 96K 166960K 1250 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 1 0 NDP 11 0K 2K 166960K 30 0 temp 36 8630K 8694K 166960K 4563 0 kqueue 13 20K 33K 166960K 43 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 42 0 37 1 0 1 1 0 8 0 rtentry 136 98 0 1 4 0 4 4 0 8 0 unpcb 144 73 0 57 1 0 1 1 0 8 0 syncache 336 4 0 4 1 1 0 1 0 8 0 tcpcb 736 32 0 27 1 0 1 1 0 8 0 arp 96 10 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 118 0 107 2 0 2 2 0 8 0 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 104 18 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 5 0 5 1 1 0 1 0 8 0 pfstscr 40 2 0 0 1 0 1 1 0 8 0 pftag 88 2 0 0 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 0 1 0 1 1 0 8 0 pfstate 384 1 0 0 1 0 1 1 0 8 0 pfrule 1344 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 455 0 6 29 0 29 29 0 8 0 art_table 40 456 0 6 5 0 5 5 0 8 0 art_node 32 98 0 12 1 0 1 1 0 8 0 semapl 112 4 0 1 1 0 1 1 0 8 0 shmpl 112 3 0 0 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1740 0 239 95 0 95 95 0 8 0 ffsino 256 1740 0 239 95 0 95 95 0 8 0 nchpl 144 2056 0 374 63 0 63 63 0 8 0 rtmask 32 2 0 2 1 1 0 1 0 8 0 uvmvnodes 80 1861 0 0 38 0 38 38 0 8 0 vnodes 216 1861 0 0 104 0 104 104 0 8 0 namei 1024 6217 0 6217 4 2 2 2 0 8 2 kstatmem 264 28 0 6 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 7217 0 7217 8 7 1 8 1 8 1 plimitpl 152 47 0 30 1 0 1 1 0 8 0 sigapl 424 510 0 459 7 1 6 7 0 8 0 knotepl 120 6923 0 6876 8 5 3 8 0 8 0 kqueuepl 184 53 0 44 1 0 1 1 0 8 0 pipepl 304 104 0 77 3 0 3 3 0 8 0 fdescpl 448 489 0 459 5 1 4 5 0 8 0 filepl 120 1808 0 1588 8 1 7 8 0 8 0 lockfpl 104 22 0 20 1 0 1 1 0 8 0 lockfspl 48 12 0 10 1 0 1 1 0 8 0 sessionpl 144 21 0 13 1 0 1 1 0 8 0 pgrppl 48 30 0 14 1 0 1 1 0 8 0 ucredpl 104 194 0 183 1 0 1 1 0 8 0 zombiepl 144 462 0 461 1 0 1 1 0 8 0 processpl 1152 510 0 459 5 1 4 5 0 8 0 procpl 664 658 0 590 6 0 6 6 0 8 0 sosppl 168 1 0 1 1 1 0 1 0 8 0 sockpl 552 236 0 203 3 0 3 3 0 8 0 mcl64k 65536 7 0 7 2 1 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 6 0 6 1 1 0 1 0 8 0 mcl4k 4096 2555 0 2506 13 6 7 13 0 8 0 mcl2k 2048 281 0 277 2 1 1 2 0 8 0 mtagpl 96 6 0 4 1 0 1 1 0 8 0 mbufpl 256 4621 0 4458 12 0 12 12 0 8 0 bufpl 280 3192 0 127 219 0 219 219 0 8 0 anonpl 24 113596 0 110305 32 11 21 32 0 187 0 amapchunkpl 152 11006 0 10442 27 5 22 25 0 158 0 amappl16 200 2208 0 2180 5 3 2 5 0 8 0 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 99 0 89 1 0 1 1 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 1100 0 1069 3 1 2 3 0 8 0 amappl11 160 43 0 33 1 0 1 1 0 8 0 amappl10 152 28 0 28 1 1 0 1 0 8 0 amappl9 144 266 0 266 1 1 0 1 0 8 0 amappl8 136 30 0 29 1 0 1 1 0 8 0 amappl7 128 97 0 87 1 0 1 1 0 8 0 amappl6 120 167 0 164 1 0 1 1 0 8 0 amappl5 112 123 0 117 1 0 1 1 0 8 0 amappl4 104 271 0 256 1 0 1 1 0 8 0 amappl3 96 1637 0 1529 3 0 3 3 0 8 0 amappl2 88 718 0 646 2 0 2 2 0 8 0 amappl1 80 8123 0 7578 13 1 12 13 0 8 0 amappl 88 2948 0 2762 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 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 489 0 459 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 489 0 459 1 0 1 1 0 8 0 vmmpekpl 168 5339 0 5314 2 0 2 2 0 8 0 vmmpepl 168 37473 0 35564 83 0 83 83 0 357 0 vmsppl 368 488 0 459 4 1 3 4 0 8 0 rwobjpl 40 14958 0 12218 28 0 28 28 0 8 0 pdppl 4096 985 0 918 99 32 67 83 0 8 0 pvpl 32 245145 0 235796 92 16 76 91 0 265 0 pmappl 216 488 0 459 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 371 0 49 10 0 10 10 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83340d7d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a5da,ffffffff83358ee4,84,ffffffff833cdad4) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(6,21) at rtmap_grow+0x1f2 rtable_add(5) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(5) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(5,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800001485378,8020699f,ffff80003c9bef60,ffff800031530558) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff800031530558,ffff80003c9bf130,ffff80003c9bf080) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c9bf130) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9bf130) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7de00a47140, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83340d7d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a5da,ffffffff83358ee4,84,ffffffff833cdad4) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(6,21) at rtmap_grow+0x1f2 rtable_add(5) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(5) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(5,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800001485378,8020699f,ffff80003c9bef60,ffff800031530558) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff800031530558,ffff80003c9bf130,ffff80003c9bf080) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c9bf130) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9bf130) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7de00a47140, count: -10