panic: kernel diagnostic assertion "map->limit == rtmap_limit" failed: file "/syzkaller/managers/main/kernel/sys/net/rtable.c", line 131 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *257080 45296 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ae468) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83068728,ffffffff8303977d,83,ffffffff830a9fda) at __assert+0x29 rtmap_grow(1d,21) at rtmap_grow+0x1f3 sys/net/rtable.c:131 rtable_add(1c) at rtable_add+0x279 if_createrdomain(1c,ffff800001594000) at if_createrdomain+0x40 sys/net/if.c:1947 ifioctl(fffffd806d3e4210,8020699f,ffff800035a2f760,ffff80002a48d1d0) at ifioctl+0x19be sys/net/if.c:2296 sys_ioctl(ffff80002a48d1d0,ffff800035a2f940,ffff800035a2f890) at sys_ioctl+0x678 syscall(ffff800035a2f940) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xafff9334bf0, 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 131 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ae468) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83068728,ffffffff8303977d,83,ffffffff830a9fda) at __assert+0x29 rtmap_grow(1d,21) at rtmap_grow+0x1f3 sys/net/rtable.c:131 rtable_add(1c) at rtable_add+0x279 if_createrdomain(1c,ffff800001594000) at if_createrdomain+0x40 sys/net/if.c:1947 ifioctl(fffffd806d3e4210,8020699f,ffff800035a2f760,ffff80002a48d1d0) at ifioctl+0x19be sys/net/if.c:2296 sys_ioctl(ffff80002a48d1d0,ffff800035a2f940,ffff800035a2f890) at sys_ioctl+0x678 syscall(ffff800035a2f940) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xafff9334bf0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800035a2f490 rbx 0x21 rdx 0 rcx 0 rax 0xffff80002a48d1d0 r8 0 r9 0x8080808080808080 r10 0xc6933785615a2ed9 r11 0x29b3b8c79048fe30 r12 0 r13 0x6 r14 0 r15 0x1 rip 0xffffffff8157fd35 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800035a2f480 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=257080 pid=45296 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=86, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a48ccc0,0xffff80002a48d978 process=0xffff8000ffff6f30 user=0xffff800035a2a000, vmspace=0xfffffd8066bbc980 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 45296 97913 91686 0 3 0x80 fsleep syz-executor *45296 257080 91686 0 7 0x4000000 syz-executor 45296 297340 91686 0 2 0x4000000 syz-executor 25177 354591 40064 0 3 0x80 fsleep syz-executor 25177 392960 40064 0 3 0x4000080 ttyopn syz-executor 97546 310598 35711 0 3 0x80 fsleep syz-executor 97546 199223 35711 0 3 0x4000080 bell syz-executor 66645 314424 3826 0 3 0x80 fsleep syz-executor 66645 240281 3826 0 3 0x4000080 ttyin syz-executor 39510 520688 73749 0 3 0x80 fsleep syz-executor 39510 35906 73749 0 3 0x4000080 fsleep syz-executor 39510 67867 73749 0 3 0x4000080 fsleep syz-executor 39510 353030 73749 0 3 0x4000080 fifow syz-executor 11016 81880 49888 0 3 0x80 fsleep syz-executor 11016 1223 49888 0 3 0x4000080 piperd syz-executor 91686 349981 54321 0 3 0x82 nanoslp syz-executor 3826 206897 54321 0 3 0x82 nanoslp syz-executor 64721 505526 54321 0 3 0x82 wait syz-executor 73749 181009 54321 0 2 0x482 syz-executor 35711 512736 54321 0 3 0x82 nanoslp syz-executor 49888 128369 54321 0 2 0x482 syz-executor 51024 263552 54321 0 3 0x82 wait syz-executor 40064 347283 54321 0 2 0x482 syz-executor 81790 484566 61807 0 3 0x82 netio sshd-session 17868 296828 0 0 3 0x14200 bored sosplice 54321 331606 56826 0 3 0x82 kqread syz-executor 56826 199867 82960 0 3 0x10008a sigsusp ksh 82960 188786 25042 0 3 0x98 kqread sshd-session 25042 363986 61807 0 3 0x92 kqread sshd-session 13027 220094 1 0 3 0x100083 ttyin getty 61807 243127 1 0 3 0x88 kqread sshd 75524 405744 53304 73 3 0x1100090 kqread syslogd 53304 440245 1 0 3 0x100082 sbwait syslogd 6213 231175 1 0 3 0x100080 kqread resolvd 58806 236244 90850 77 3 0x100092 kqread dhcpleased 17052 332125 90850 77 3 0x100092 kqread dhcpleased 90850 435771 1 0 3 0x80 kqread dhcpleased 19407 53783 0 0 3 0x14200 bored smr 76467 189778 0 0 2 0x14200 zerothread 56267 352325 0 0 3 0x14200 aiodoned aiodoned 75086 80695 0 0 3 0x14200 syncer update 76495 1075 0 0 3 0x14200 cleaner cleaner 96147 294559 0 0 3 0x14200 reaper reaper 11861 109646 0 0 3 0x14200 pgdaemon pagedaemon 31442 6198 0 0 3 0x14200 bored viomb 62599 340372 0 0 3 0x40014200 acpi0 acpi0 33949 107895 0 0 3 0x14200 bored softnet3 40990 236444 0 0 3 0x14200 bored softnet2 70349 454194 0 0 3 0x14200 bored softnet1 78949 74413 0 0 3 0x14200 bored softnet0 76083 149693 0 0 3 0x14200 bored systqmp 56296 504299 0 0 3 0x14200 bored systq 67892 169995 0 0 3 0x40014200 tmoslp softclock 69673 74329 0 0 3 0x40014200 idle0 1 17098 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 10209 14146K 14595K 166960K 12715 0 pcb 17 14K 16K 166960K 258 0 rtable 236 7K 7K 166960K 1272 0 pf 32 13K 21K 166960K 115 0 ifaddr 43 8K 8K 166960K 163 0 ifgroup 50 2K 2K 166960K 174 0 sysctl 3 0K 0K 166960K 3 0 counters 30 17K 17K 166960K 61 0 ioctlops 0 0K 4K 166960K 168 0 iov 0 0K 28K 166960K 67 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1489 93K 94K 166960K 2411 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 24 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 102 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1690 195K 286K 166960K 12418 0 file desc 18 65K 97K 166960K 1409 0 sigio 0 0K 0K 166960K 14 0 proc 60 59K 124K 166960K 1226 0 subproc 104 6K 6K 166960K 431 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 111 0 in_multi 96 7K 7K 166960K 425 0 ether_multi 1 0K 0K 166960K 9 0 mrt 1 0K 0K 166960K 5 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 217 970K 970K 166960K 217 0 exec 0 0K 1K 166960K 744 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 249 73K 89K 166960K 12989 0 UVM aobj 23 5K 5K 166960K 28 0 pinsyscall 41 82K 96K 166960K 3092 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 50 0 NDP 11 0K 2K 166960K 112 0 temp 78 6816K 6880K 166960K 71675 0 kqueue 13 20K 26K 166960K 165 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 155 0 152 1 0 1 1 0 8 0 rtentry 112 445 0 337 4 0 4 4 0 8 0 unpcb 144 887 0 870 7 5 2 6 0 8 1 syncache 336 9 0 9 3 2 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 808 311 0 301 7 5 2 4 0 8 1 arp 88 78 0 59 1 0 1 1 0 8 0 ipq 40 4 0 3 1 0 1 1 0 8 0 ipqe 40 49 0 47 1 0 1 1 0 8 0 inpcb 336 1273 0 1257 11 9 2 10 0 8 0 nd6 104 112 0 88 1 0 1 1 0 8 0 pkpcb 40 9 0 9 3 2 1 1 0 8 1 kcovpl 48 33 0 25 1 0 1 1 0 8 0 ppxss 1072 3 0 3 2 1 1 1 0 8 1 pfstscr 40 3 0 3 2 1 1 1 0 8 1 pftag 88 2 0 0 1 0 1 1 0 8 0 pfstkey 128 4 0 4 2 1 1 1 0 8 1 pfstate 344 2 0 2 2 1 1 1 0 8 1 pfrule 1344 6 0 6 3 2 1 1 0 8 1 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 1797 0 1380 35 6 29 31 0 8 0 art_table 32 1800 0 1380 4 0 4 4 0 8 0 art_node 16 437 0 345 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 7 1 0 1 1 0 8 0 semapl 112 100 0 90 1 0 1 1 0 8 0 shmpl 112 25 0 5 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 3132 0 1592 97 0 97 97 0 8 0 ffsino 240 3132 0 1592 91 0 91 91 0 8 0 nchpl 144 4645 0 2935 64 0 64 64 0 8 0 uvmvnodes 80 4070 0 0 84 0 84 84 0 8 0 vnodes 216 4070 0 0 227 0 227 227 0 8 0 namei 1024 17083 0 17083 4 3 1 2 0 8 1 kstatmem 264 84 0 62 2 0 2 2 0 8 0 scxspl 216 25391 0 25391 10 9 1 8 1 8 1 plimitpl 152 314 0 298 1 0 1 1 0 8 0 sigapl 424 1642 0 1594 6 0 6 6 0 8 0 futexpl 64 13622 0 13614 1 0 1 1 0 8 0 knotepl 120 43090 0 43042 10 8 2 10 0 8 0 kqueuepl 184 300 0 290 5 2 3 3 0 8 2 pipepl 288 372 0 343 4 1 3 3 0 8 0 fdescpl 432 1625 0 1594 5 1 4 5 0 8 0 filepl 120 8740 0 8484 19 10 9 16 0 8 0 lockfpl 104 306 0 304 1 0 1 1 0 8 0 lockfspl 48 136 0 134 1 0 1 1 0 8 0 sessionpl 144 48 0 39 1 0 1 1 0 8 0 pgrppl 48 87 0 70 1 0 1 1 0 8 0 ucredpl 104 1130 0 1118 1 0 1 1 0 8 0 zombiepl 144 1692 0 1690 3 2 1 1 0 8 0 processpl 1096 1642 0 1594 4 0 4 4 0 8 0 procpl 648 2988 0 2931 8 2 6 6 0 8 1 sosppl 168 4 0 4 2 2 0 1 0 8 0 sockpl 504 2340 0 2304 30 24 6 22 0 8 0 mcl64k 65536 19 0 19 4 3 1 1 0 8 1 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl9k 9216 2 0 2 1 1 0 1 0 8 0 mcl8k 8192 21 0 21 4 3 1 1 0 8 1 mcl4k 4096 8 0 8 3 2 1 1 0 8 1 mcl2k 2048 7545 0 7450 30 17 13 25 0 8 0 mtagpl 96 35 0 23 2 1 1 1 0 8 0 mbufpl 256 18884 0 18657 85 64 21 78 0 8 0 bufpl 280 7726 0 1479 447 0 447 447 0 8 0 anonpl 24 274451 0 270708 127 79 48 58 0 187 21 amapchunkpl 152 42993 0 42441 62 27 35 35 0 158 13 amappl16 200 5838 0 5809 41 31 10 14 0 8 8 amappl15 192 11 0 11 1 1 0 1 0 8 0 amappl14 184 162 0 151 1 0 1 1 0 8 0 amappl13 176 7 0 7 2 2 0 1 0 8 0 amappl12 168 2641 0 2610 3 1 2 3 0 8 0 amappl11 160 46 0 35 1 0 1 1 0 8 0 amappl10 152 11 0 11 1 1 0 1 0 8 0 amappl9 144 112 0 112 1 1 0 1 0 8 0 amappl8 136 25 0 23 1 0 1 1 0 8 0 amappl7 128 210 0 198 1 0 1 1 0 8 0 amappl6 120 430 0 428 1 0 1 1 0 8 0 amappl5 112 228 0 218 1 0 1 1 0 8 0 amappl4 104 366 0 352 1 0 1 1 0 8 0 amappl3 96 8602 0 8477 5 1 4 4 0 8 0 amappl2 88 1028 0 959 2 0 2 2 0 8 0 amappl1 80 13013 0 12410 14 0 14 14 0 8 0 amappl 88 12361 0 12173 5 0 5 5 0 92 0 dma8192 8192 1 0 1 1 1 0 1 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma2048 2048 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 27 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1625 0 1594 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1625 0 1594 1 0 1 1 0 8 0 vmmpekpl 168 13575 0 13520 3 0 3 3 0 8 0 vmmpepl 168 104682 0 102749 109 18 91 94 0 357 6 vmsppl 344 1624 0 1594 5 2 3 4 0 8 0 rwobjpl 24 34776 0 29708 31 0 31 31 0 8 0 pdppl 4096 3256 0 3188 144 76 68 82 0 8 0 pvpl 32 803726 0 792491 434 310 124 243 0 265 30 pmappl 216 1624 0 1594 3 1 2 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 565 0 221 12 0 12 12 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:437 panic(ffffffff830ae468) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83068728,ffffffff8303977d,83,ffffffff830a9fda) at __assert+0x29 rtmap_grow(1d,21) at rtmap_grow+0x1f3 sys/net/rtable.c:131 rtable_add(1c) at rtable_add+0x279 if_createrdomain(1c,ffff800001594000) at if_createrdomain+0x40 sys/net/if.c:1947 ifioctl(fffffd806d3e4210,8020699f,ffff800035a2f760,ffff80002a48d1d0) at ifioctl+0x19be sys/net/if.c:2296 sys_ioctl(ffff80002a48d1d0,ffff800035a2f940,ffff800035a2f890) at sys_ioctl+0x678 syscall(ffff800035a2f940) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xafff9334bf0, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830ae468) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83068728,ffffffff8303977d,83,ffffffff830a9fda) at __assert+0x29 rtmap_grow(1d,21) at rtmap_grow+0x1f3 sys/net/rtable.c:131 rtable_add(1c) at rtable_add+0x279 if_createrdomain(1c,ffff800001594000) at if_createrdomain+0x40 sys/net/if.c:1947 ifioctl(fffffd806d3e4210,8020699f,ffff800035a2f760,ffff80002a48d1d0) at ifioctl+0x19be sys/net/if.c:2296 sys_ioctl(ffff80002a48d1d0,ffff800035a2f940,ffff800035a2f890) at sys_ioctl+0x678 syscall(ffff800035a2f940) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xafff9334bf0, count: -10