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 *296750 14066 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83337890) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379b84,ffffffff8335c625,84,ffffffff833d1e30) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(21,21) at rtmap_grow+0x1f2 rtable_add(20) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(20) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(20,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800010fd6ae8,8020699f,ffff80003a565060,ffff80002a7f4020) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff80002a7f4020,ffff80003a565230,ffff80003a565180) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003a565230) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003a565230) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x350727144f0, 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(ffffffff83337890) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379b84,ffffffff8335c625,84,ffffffff833d1e30) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(21,21) at rtmap_grow+0x1f2 rtable_add(20) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(20) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(20,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800010fd6ae8,8020699f,ffff80003a565060,ffff80002a7f4020) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff80002a7f4020,ffff80003a565230,ffff80003a565180) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003a565230) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003a565230) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x350727144f0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003a564d90 rbx 0x21 rdx 0 rcx 0 rax 0xffff80002a7f4020 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe22a6e4f4592a5bd r11 0xd7293f8ba5b72297 r12 0 r13 0x17 r14 0 r15 0x1 rip 0xffffffff81c8d985 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003a564d80 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=296750 pid=14066 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=0xffff800035d59a30,0xffffffff83869f10 process=0xffff80003ca49fb0 user=0xffff80003a560000, vmspace=0xfffffd806ba42d00 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 14066 374825 66152 0 3 0x80 fsleep syz-executor 14066 517689 66152 0 2 0x4000000 syz-executor *14066 296750 66152 0 7 0x4000000 syz-executor 62761 357870 29386 0 3 0x80 fsleep syz-executor 62761 328070 29386 0 3 0x4000080 sbwait syz-executor 22634 1936 72859 0 2 0xc82 syz-executor 2791 92949 67083 0 3 0x80 fsleep syz-executor 2791 188147 67083 0 3 0x4000080 kqsel syz-executor 98182 23769 0 0 3 0x14280 nfsidl nfsio 75679 402531 0 0 3 0x14280 nfsidl nfsio 17048 283067 0 0 3 0x14280 nfsidl nfsio 46959 121228 0 0 3 0x14280 nfsidl nfsio 56057 320442 0 0 3 0x14280 nfsidl nfsio 39146 309929 0 0 3 0x14280 nfsidl nfsio 30883 328224 0 0 3 0x14280 nfsidl nfsio 51076 101423 0 0 3 0x14280 nfsidl nfsio 75746 219699 0 0 3 0x14280 nfsidl nfsio 70133 116188 0 0 3 0x14280 nfsidl nfsio 25172 122247 0 0 3 0x14280 nfsidl nfsio 15569 226345 0 0 3 0x14280 nfsidl nfsio 62684 143610 0 0 3 0x14280 nfsidl nfsio 24232 310692 0 0 3 0x14280 nfsidl nfsio 67040 350759 0 0 3 0x14280 nfsidl nfsio 26648 189826 0 0 3 0x14280 nfsidl nfsio 85265 425857 0 0 3 0x14280 nfsidl nfsio 15495 463019 0 0 3 0x14280 nfsidl nfsio 48721 385888 0 0 3 0x14280 nfsidl nfsio 29312 72538 0 0 3 0x14280 nfsidl nfsio 91335 502089 0 0 3 0x14200 bored sosplice 29386 68157 72859 0 2 0xc82 syz-executor 40707 97357 72859 0 3 0x82 wait syz-executor 33438 512737 72859 0 3 0x82 wait syz-executor 67083 350059 72859 0 2 0xc82 syz-executor 55853 308885 72859 0 2 0x2 syz-executor 66152 353559 72859 0 2 0xc82 syz-executor 6766 301924 72859 0 3 0x82 wait syz-executor 72859 412010 67504 0 2 0x2 syz-executor 67504 408924 11189 0 3 0x10008a sigsusp ksh 11189 340111 65543 0 3 0x98 kqread sshd-session 65543 273533 33453 0 3 0x92 kqread sshd-session 45150 254173 1 0 3 0x100083 ttyopn getty 33453 326068 1 0 3 0x88 kqread sshd 6391 34363 21317 73 3 0x1100090 kqread syslogd 21317 342730 1 0 3 0x100082 sbwait syslogd 44957 71644 1 0 3 0x100080 kqread resolvd 60016 276079 11345 77 3 0x100092 kqread dhcpleased 92364 329736 11345 77 3 0x100092 kqread dhcpleased 11345 370367 1 0 3 0x80 kqread dhcpleased 72879 186173 0 0 3 0x14200 bored smr 42164 517059 0 0 2 0x14200 zerothread 23697 283929 0 0 3 0x14200 aiodoned aiodoned 71888 412416 0 0 3 0x14200 syncer update 11761 282303 0 0 3 0x14200 cleaner cleaner 62961 394000 0 0 3 0x14200 reaper reaper 40824 154772 0 0 3 0x14200 pgdaemon pagedaemon 33115 281498 0 0 3 0x14200 bored viomb 11941 209592 0 0 3 0x40014200 acpi0 acpi0 46258 166654 0 0 3 0x14200 bored softnet7 42347 64814 0 0 3 0x14200 bored softnet6 79193 364556 0 0 3 0x14200 bored softnet5 74092 275846 0 0 3 0x14200 bored softnet4 17128 57338 0 0 3 0x14200 bored softnet3 58018 298842 0 0 3 0x14200 bored softnet2 55340 501419 0 0 3 0x14200 bored softnet1 64921 88019 0 0 3 0x14200 bored softnet0 86793 90612 0 0 3 0x14200 bored systqmp 79586 466779 0 0 3 0x14200 bored systq 38755 473232 0 0 3 0x40014200 tmoslp softclock 2967 495301 0 0 3 0x40014200 idle0 1 447669 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10213 11060K 11289K 166960K 12026 0 pcb 18 13K 14K 166960K 213 0 rtable 220 10K 10K 166960K 608 0 pf 32 13K 14K 166960K 102 0 ifaddr 42 7K 8K 166960K 87 0 ifgroup 50 2K 2K 166960K 129 0 sysctl 4 1K 9K 166960K 17 0 counters 32 17K 18K 166960K 116 0 ioctlops 0 0K 4K 166960K 267 0 iov 0 0K 44K 166960K 79 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1370 86K 87K 166960K 1896 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 19 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 41 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 93K 166960K 895 0 sigio 0 0K 0K 166960K 9 0 proc 60 59K 116K 166960K 573 0 subproc 72 4K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 97 0 in_multi 98 7K 7K 166960K 147 0 ether_multi 1 0K 0K 166960K 8 0 mrt 0 0K 0K 166960K 9 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 181 811K 811K 166960K 181 0 exec 0 0K 1K 166960K 751 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 4K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 220 160K 179K 166960K 9618 0 UVM aobj 101 4K 4K 166960K 106 0 pinsyscall 38 76K 94K 166960K 1958 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 38 0 NDP 11 0K 2K 166960K 58 0 temp 74 8642K 8767K 166960K 44611 0 kqueue 14 22K 28K 166960K 183 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 152 0 148 3 1 2 2 0 8 1 rtentry 136 198 0 110 4 0 4 4 0 8 0 unpcb 144 745 0 729 5 3 2 4 0 8 1 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 182 0 176 1 0 1 1 0 8 0 arp 96 18 0 6 1 0 1 1 0 8 0 ipq 40 2 0 1 1 0 1 1 0 8 0 ipqe 40 3 0 2 1 0 1 1 0 8 0 inpcb 328 639 0 627 6 2 4 4 0 8 2 ip6q 72 2 0 0 1 0 1 1 0 8 0 ip6af 40 6 0 1 1 0 1 1 0 8 0 nd6 104 20 0 4 1 0 1 1 0 8 0 pkpcb 40 9 0 9 3 2 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 0 1 1 0 8 1 ppxss 1072 77 0 77 1 0 1 1 0 8 1 pppxif 1384 5 0 5 1 0 1 1 0 8 1 pfstscr 40 3 0 2 1 0 1 1 0 8 0 pfrktable 1344 2 0 2 2 1 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 4 0 2 1 0 1 1 0 8 0 pfstate 384 2 0 1 1 0 1 1 0 8 0 pfrule 1344 39 0 39 2 1 1 1 0 8 1 rttmr 136 2 0 2 2 1 1 1 0 8 1 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 580 0 152 30 3 27 30 0 8 0 art_table 40 584 0 152 5 0 5 5 0 8 0 art_node 32 133 0 58 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 5 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 33 0 23 1 0 1 1 0 8 0 shmpl 112 103 0 5 3 0 3 3 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 2987 0 1492 95 0 95 95 0 8 0 ffsino 256 2987 0 1492 95 0 95 95 0 8 0 nchpl 144 4290 0 3749 63 40 23 63 0 8 0 rtmask 32 6 0 6 2 1 1 1 0 8 1 uvmvnodes 80 3322 0 0 68 0 68 68 0 8 0 vnodes 216 3322 0 0 185 0 185 185 0 8 0 namei 1024 15541 0 15541 3 2 1 2 0 8 1 kstatmem 264 80 0 58 2 0 2 2 0 8 0 scsiplug 72 3 0 3 2 1 1 1 0 8 1 scxspl 216 16260 0 16260 10 8 2 8 1 8 2 plimitpl 152 351 0 335 1 0 1 1 0 8 0 sigapl 424 1200 0 1130 10 1 9 9 0 8 1 knotepl 120 34263 0 33975 29 13 16 16 0 8 7 kqueuepl 184 365 0 355 4 3 1 4 0 8 0 pipepl 304 202 0 173 3 0 3 3 0 8 0 fdescpl 448 1158 0 1129 5 1 4 5 0 8 0 filepl 120 6956 0 6728 13 3 10 12 0 8 2 lockfpl 104 299 0 297 1 0 1 1 0 8 0 lockfspl 48 137 0 135 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 47 0 31 1 0 1 1 0 8 0 ucredpl 104 1118 0 1105 1 0 1 1 0 8 0 zombiepl 144 1269 0 1265 1 0 1 1 0 8 0 processpl 1152 1200 0 1130 7 1 6 6 0 8 0 procpl 664 2370 0 2296 9 1 8 8 0 8 0 sosppl 168 7 0 7 2 1 1 1 0 8 1 sockpl 552 1572 0 1540 12 5 7 8 0 8 4 mcl64k 65536 33 0 33 2 1 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 28 0 28 3 2 1 1 0 8 1 mcl4k 4096 3450 0 3400 15 8 7 14 0 8 0 mcl2k 2048 1366 0 1356 9 5 4 7 0 8 2 mtagpl 96 10 0 5 1 0 1 1 0 8 0 mbufpl 256 12234 0 12063 26 5 21 23 0 8 7 bufpl 280 5749 0 125 402 0 402 402 0 8 0 anonpl 24 189999 0 186802 67 28 39 59 0 187 1 amapchunkpl 152 33130 0 32673 43 18 25 33 0 158 5 amappl16 200 3269 0 3239 20 16 4 15 0 8 0 amappl15 192 3 0 3 1 1 0 1 0 8 0 amappl14 184 108 0 98 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 1 0 1 0 8 0 amappl12 168 1785 0 1756 3 1 2 3 0 8 0 amappl11 160 73 0 62 1 0 1 1 0 8 0 amappl10 152 4 0 3 1 0 1 1 0 8 0 amappl9 144 257 0 257 1 1 0 1 0 8 0 amappl8 136 25 0 24 1 0 1 1 0 8 0 amappl7 128 100 0 89 1 0 1 1 0 8 0 amappl6 120 183 0 180 1 0 1 1 0 8 0 amappl5 112 134 0 127 1 0 1 1 0 8 0 amappl4 104 272 0 257 1 0 1 1 0 8 0 amappl3 96 5439 0 5349 3 0 3 3 0 8 0 amappl2 88 1403 0 1326 2 0 2 2 0 8 0 amappl1 80 11214 0 10664 14 1 13 13 0 8 0 amappl 88 8821 0 8666 5 0 5 5 0 92 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 6 0 6 1 1 0 1 0 8 0 dma128 128 255 0 255 3 2 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 105 0 5 2 0 2 2 0 8 0 uaddrrnd 24 1158 0 1129 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1158 0 1129 1 0 1 1 0 8 0 vmmpekpl 168 10088 0 10053 2 0 2 2 0 8 0 vmmpepl 168 76521 0 74660 98 11 87 95 0 357 0 vmsppl 368 1157 0 1129 4 1 3 4 0 8 0 rwobjpl 40 24513 0 20248 44 0 44 44 0 8 0 pdppl 4096 2322 0 2258 104 36 68 80 0 8 4 pvpl 32 518115 0 509109 141 43 98 131 0 265 5 pmappl 216 1157 0 1129 3 1 2 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 405 0 67 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(ffffffff83337890) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379b84,ffffffff8335c625,84,ffffffff833d1e30) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(21,21) at rtmap_grow+0x1f2 rtable_add(20) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(20) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(20,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800010fd6ae8,8020699f,ffff80003a565060,ffff80002a7f4020) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff80002a7f4020,ffff80003a565230,ffff80003a565180) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003a565230) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003a565230) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x350727144f0, 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(ffffffff83337890) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379b84,ffffffff8335c625,84,ffffffff833d1e30) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(21,21) at rtmap_grow+0x1f2 rtable_add(20) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(20) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(20,ffff800001464000) at if_createrdomain+0x40 sys/net/if.c:1952 ifioctl(ffff800010fd6ae8,8020699f,ffff80003a565060,ffff80002a7f4020) at ifioctl+0x1c06 sys/net/if.c:2301 sys_ioctl(ffff80002a7f4020,ffff80003a565230,ffff80003a565180) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003a565230) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003a565230) at syscall+0x962 sys/arch/amd64/amd64/trap.c:746 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x350727144f0, count: -10