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 *377031 19138 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83419bd8) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83455330,ffffffff83431729,84,ffffffff834a4e3c) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(c,21) at rtmap_grow+0x1f2 rtable_add(b) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(b) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(b,ffff8000015fe800) at if_createrdomain+0x40 sys/net/if.c:2046 ifioctl(ffff800001639a78,8020699f,ffff80003c9039e0,ffff80003b4f3788) at ifioctl+0x1be2 sys/net/if.c:2395 sys_ioctl(ffff80003b4f3788,ffff80003c903bb0,ffff80003c903b00) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c903bb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c903bb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6dda399ef60, 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(ffffffff83419bd8) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83455330,ffffffff83431729,84,ffffffff834a4e3c) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(c,21) at rtmap_grow+0x1f2 rtable_add(b) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(b) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(b,ffff8000015fe800) at if_createrdomain+0x40 sys/net/if.c:2046 ifioctl(ffff800001639a78,8020699f,ffff80003c9039e0,ffff80003b4f3788) at ifioctl+0x1be2 sys/net/if.c:2395 sys_ioctl(ffff80003b4f3788,ffff80003c903bb0,ffff80003c903b00) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c903bb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c903bb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6dda399ef60, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c903710 rbx 0x21 rdx 0 rcx 0 rax 0xffff80003b4f3788 r8 0x101010101010101 r9 0x8080808080808080 r10 0x7261b73a3ef2b11e r11 0x8e250e6bf7ceea5d r12 0 r13 0x6 r14 0 r15 0x1 rip 0xffffffff81389065 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c903700 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=377031 pid=19138 tcnt=3 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=0xffff80003b4f2a90,0xffffffff83a31328 process=0xffff80002f0bc018 user=0xffff80003c8fe000, vmspace=0xfffffd8076f922f0 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 19138 90606 59570 0 3 0x80 fsleep syz-executor 19138 394296 59570 0 2 0x4000000 syz-executor *19138 377031 59570 0 7 0x4000000 syz-executor 52335 106233 51237 0 3 0x80 fsleep syz-executor 52335 244465 51237 0 3 0x4000080 piperd syz-executor 59570 351617 72908 0 2 0xc82 syz-executor 80760 405105 47931 0 3 0x80 fsleep syz-executor 80760 97266 47931 0 3 0x4000080 fifor syz-executor 49345 38252 3482 0 3 0x80 fsleep syz-executor 49345 108345 3482 0 3 0x4000080 ttyout syz-executor 24111 164064 89241 0 3 0x80 fsleep syz-executor 24111 389384 89241 0 3 0x4000080 msgwait syz-executor 28117 361506 99383 0 3 0x80 fsleep syz-executor 28117 356851 99383 0 3 0x4000080 rest syz-executor 15137 487946 0 0 3 0x14200 acct acct 49729 490318 0 0 3 0x14280 nfsidl nfsio 2925 313991 0 0 3 0x14280 nfsidl nfsio 94146 409615 0 0 3 0x14280 nfsidl nfsio 68233 171547 0 0 3 0x14280 nfsidl nfsio 24833 497254 0 0 3 0x14280 nfsidl nfsio 26435 302606 0 0 3 0x14280 nfsidl nfsio 22601 372734 0 0 3 0x14280 nfsidl nfsio 73899 327370 0 0 3 0x14280 nfsidl nfsio 45238 425133 0 0 3 0x14280 nfsidl nfsio 92471 130690 0 0 3 0x14280 nfsidl nfsio 54825 370186 0 0 3 0x14280 nfsidl nfsio 14999 455267 0 0 3 0x14280 nfsidl nfsio 91736 80532 0 0 3 0x14280 nfsidl nfsio 17046 373144 0 0 3 0x14280 nfsidl nfsio 83353 290361 0 0 3 0x14280 nfsidl nfsio 92336 10808 0 0 3 0x14280 nfsidl nfsio 57662 421662 0 0 3 0x14280 nfsidl nfsio 75032 227464 0 0 3 0x14280 nfsidl nfsio 1063 288010 0 0 3 0x14280 nfsidl nfsio 25596 33179 0 0 3 0x14280 nfsidl nfsio 13021 169008 72908 0 2 0xc82 syz-executor 89241 46188 72908 0 2 0xc82 syz-executor 3482 41900 72908 0 3 0x82 nanoslp syz-executor 99383 20201 72908 0 2 0xc82 syz-executor 55182 11317 72908 0 2 0xc82 syz-executor 51237 227984 72908 0 3 0x82 nanoslp syz-executor 47931 389589 72908 0 3 0x82 nanoslp syz-executor 72908 446504 45065 0 3 0x82 kqread syz-executor 45065 317510 6286 0 3 0x10008a sigsusp ksh 6286 450518 37552 0 3 0x98 kqread sshd-session 37552 90649 30807 0 3 0x92 kqread sshd-session 5232 129411 1 0 3 0x100083 ttyin getty 30807 147366 1 0 3 0x88 kqread sshd 56525 271048 26347 73 3 0x1100090 kqread syslogd 26347 218461 1 0 3 0x100082 sbwait syslogd 29266 246169 1 0 3 0x100080 kqread resolvd 99552 315192 90238 77 3 0x100092 kqread dhcpleased 67460 200867 90238 77 3 0x100092 kqread dhcpleased 90238 413253 1 0 3 0x80 kqread dhcpleased 77319 446382 0 0 3 0x14200 bored smr 12283 516906 0 0 2 0x14200 zerothread 9748 118246 0 0 3 0x14200 aiodoned aiodoned 72036 1931 0 0 3 0x14200 syncer update 7336 464264 0 0 3 0x14200 cleaner cleaner 84345 289505 0 0 3 0x14200 reaper reaper 93732 339957 0 0 3 0x14200 pgdaemon pagedaemon 81936 4847 0 0 3 0x14200 bored viomb 88137 130208 0 0 3 0x40014200 acpi0 acpi0 68510 29863 0 0 3 0x14200 bored softnet0 83967 192863 0 0 3 0x14200 smrbar systqmp 55872 394093 0 0 3 0x14200 bored systq 36955 344466 0 0 3 0x40014200 tmoslp softclock 21063 280814 0 0 3 0x40014200 idle0 1 448201 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 11050 12244K 16263K 166960K 12638 0 pcb 20 16K 18K 166960K 227 0 rtable 231 7K 7K 166960K 449 0 pf 33 13K 17K 166960K 93 0 ifaddr 43 7K 7K 166960K 65 0 ifgroup 52 2K 2K 166960K 84 0 sysctl 3 1K 9K 166960K 16 0 counters 34 17K 18K 166960K 49 0 ioctlops 0 0K 4K 166960K 111 0 iov 0 0K 24K 166960K 52 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1298 82K 82K 166960K 1780 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 24 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 228K 166960K 653 0 sigio 0 0K 0K 166960K 6 0 proc 60 59K 83K 166960K 583 0 subproc 72 4K 4K 166960K 82 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 204 0 in_multi 99 7K 7K 166960K 126 0 ether_multi 1 0K 0K 166960K 4 0 mrt 0 0K 0K 166960K 19 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 421 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 233 165K 169K 166960K 7610 0 UVM aobj 13 2K 2K 166960K 14 0 pinsyscall 39 78K 94K 166960K 1777 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 18 0 NDP 14 0K 2K 166960K 42 0 temp 54 9070K 9135K 166960K 20649 0 kqueue 13 20K 30K 166960K 125 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 142 0 139 3 1 2 2 0 8 1 rtentry 136 136 0 36 4 0 4 4 0 8 0 unpcb 144 636 0 619 8 2 6 6 0 8 5 syncache 336 9 0 9 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 357 0 350 9 2 7 7 0 8 6 arp 96 23 0 5 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 781 0 768 17 7 10 12 0 8 8 nd6 112 28 0 3 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 1 0 1 0 8 0 kcovpl 48 9 0 1 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 1 0 1 0 8 0 ppxss 1072 13 0 12 1 0 1 1 0 8 0 pppxif 1416 2 0 2 1 0 1 1 0 8 1 pffrag 232 4 0 0 1 0 1 1 0 482 0 pffrnode 88 4 0 0 1 0 1 1 0 8 0 pffrent 40 6 0 2 1 0 1 1 0 8 0 pfrktable 1344 1 0 0 1 0 1 1 0 8 0 pfsrclim 320 2 0 1 2 1 1 1 0 8 0 pfanchor 1288 3 0 3 1 0 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 1360 7 0 7 2 1 1 1 0 8 1 rttmr 136 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 550 0 103 29 1 28 29 0 8 0 art_table 40 551 0 103 5 0 5 5 0 8 0 art_node 32 135 0 45 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 7 1 0 1 1 0 8 0 semapl 112 21 0 11 1 0 1 1 0 8 0 shmpl 112 11 0 1 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2462 0 1009 92 0 92 92 0 8 0 ffsino 256 2462 0 1009 92 0 92 92 0 8 0 nchpl 144 3376 0 1679 63 0 63 63 0 8 0 vnodes 216 2804 0 0 156 0 156 156 0 8 0 namei 1024 11031 0 11031 3 2 1 2 0 8 1 kstatmem 264 48 0 24 2 0 2 2 0 8 0 scsiplug 72 4 0 4 2 1 1 1 0 8 1 scxspl 216 11690 0 11690 8 7 1 8 1 8 1 plimitpl 152 203 0 187 1 0 1 1 0 8 0 sigapl 424 956 0 892 8 0 8 8 0 8 0 knotepl 120 23569 0 23522 16 6 10 14 0 8 7 kqueuepl 184 267 0 193 4 0 4 4 0 8 0 pipepl 304 184 0 156 3 0 3 3 0 8 0 fdescpl 448 922 0 892 5 1 4 5 0 8 0 filepl 120 5368 0 5083 13 1 12 12 0 8 1 lockfpl 104 331 0 327 2 0 2 2 0 8 1 lockfspl 48 86 0 82 1 0 1 1 0 8 0 sessionpl 144 70 0 62 1 0 1 1 0 8 0 pgrppl 48 86 0 70 1 0 1 1 0 8 0 ucredpl 104 606 0 595 1 0 1 1 0 8 0 zombiepl 144 1122 0 1120 1 0 1 1 0 8 0 processpl 1152 956 0 892 5 0 5 5 0 8 0 procpl 664 1801 0 1730 7 0 7 7 0 8 0 sosppl 176 2 0 2 2 1 1 1 0 8 1 sockpl 552 1610 0 1577 20 9 11 15 0 8 8 mcl64k 65536 69 0 68 2 1 1 1 0 8 0 mcl16k 16384 4 0 4 2 1 1 1 0 8 1 mcl9k 9216 4 0 4 1 0 1 1 0 8 1 mcl8k 8192 77 0 77 2 1 1 1 0 8 1 mcl4k 4096 3197 0 3146 16 8 8 15 0 8 1 mcl2k 2048 751 0 748 4 1 3 3 0 8 2 mtagpl 96 14 0 5 2 1 1 1 0 8 0 mbufpl 256 9882 0 9706 20 5 15 16 0 8 1 bufpl 280 3765 0 104 262 0 262 262 0 8 0 anonpl 24 120091 0 116801 39 5 34 34 0 187 5 amapchunkpl 152 36425 0 35729 40 5 35 35 0 158 8 amappl16 200 1230 0 1199 5 2 3 5 0 8 0 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 502 0 501 1 0 1 1 0 8 0 amappl13 176 116 0 106 1 0 1 1 0 8 0 amappl12 168 1165 0 1136 2 0 2 2 0 8 0 amappl11 160 42 0 42 1 1 0 1 0 8 0 amappl10 152 61 0 51 1 0 1 1 0 8 0 amappl9 144 269 0 269 1 1 0 1 0 8 0 amappl8 136 104 0 102 1 0 1 1 0 8 0 amappl7 128 142 0 130 1 0 1 1 0 8 0 amappl6 120 172 0 169 1 0 1 1 0 8 0 amappl5 112 97 0 89 1 0 1 1 0 8 0 amappl4 104 264 0 247 1 0 1 1 0 8 0 amappl3 96 4754 0 4637 5 1 4 4 0 8 1 amappl2 88 543 0 488 2 0 2 2 0 8 0 amappl1 80 12083 0 11535 17 2 15 15 0 8 3 amappl 88 6756 0 6587 6 1 5 5 0 92 0 uvmvnodes 80 111 0 0 3 0 3 3 0 8 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 dma512 512 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 255 0 255 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 13 0 1 1 0 1 1 0 8 0 uaddrrnd 24 922 0 892 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 922 0 892 1 0 1 1 0 8 0 vmmpekpl 168 9238 0 9205 2 0 2 2 0 8 0 vmmpepl 168 64605 0 62765 100 8 92 92 0 357 10 vmsppl 368 921 0 892 4 1 3 4 0 8 0 rwobjpl 40 19011 0 18028 13 1 12 12 0 8 1 pdppl 4096 1850 0 1784 112 44 68 82 0 8 2 pvpl 32 377825 0 368700 113 16 97 104 0 265 10 pmappl 216 921 0 892 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 405 0 74 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(ffffffff83419bd8) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83455330,ffffffff83431729,84,ffffffff834a4e3c) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(c,21) at rtmap_grow+0x1f2 rtable_add(b) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(b) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(b,ffff8000015fe800) at if_createrdomain+0x40 sys/net/if.c:2046 ifioctl(ffff800001639a78,8020699f,ffff80003c9039e0,ffff80003b4f3788) at ifioctl+0x1be2 sys/net/if.c:2395 sys_ioctl(ffff80003b4f3788,ffff80003c903bb0,ffff80003c903b00) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c903bb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c903bb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6dda399ef60, 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(ffffffff83419bd8) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83455330,ffffffff83431729,84,ffffffff834a4e3c) at __assert+0x29 sys/kern/subr_prf.c:-1 rtmap_grow(c,21) at rtmap_grow+0x1f2 rtable_add(b) at rtable_add+0x289 rtable_alloc sys/net/rtable.c:370 [inline] rtable_add(b) at rtable_add+0x289 sys/net/rtable.c:223 if_createrdomain(b,ffff8000015fe800) at if_createrdomain+0x40 sys/net/if.c:2046 ifioctl(ffff800001639a78,8020699f,ffff80003c9039e0,ffff80003b4f3788) at ifioctl+0x1be2 sys/net/if.c:2395 sys_ioctl(ffff80003b4f3788,ffff80003c903bb0,ffff80003c903b00) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c903bb0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c903bb0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6dda399ef60, count: -10