panic: free: size too large 100 > 16 (0xffff800000c40950) type rtable Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83501d0b) at panic+0x1e5 sys/kern/subr_prf.c:198 free(ffff800000c40950,5,64) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff5806a8da640) at rtfree+0x367 sys/net/route.c:646 rt_ifa_dellocal(ffff800001619f00) at rt_ifa_dellocal+0x211 sys/net/route.c:1452 in_purgeaddr(ffff800001619f00) at in_purgeaddr+0x1c5 sys/netinet/in.c:754 in_ifdetach(ffff8000015ea800) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff8000015ea800) at if_detach+0x2fe sys/net/if.c:1311 tun_clone_destroy(ffff8000015ea800) at tun_clone_destroy+0x2ce sys/net/if_tun.c:343 if_clone_destroy(ffff80002eb7e9f0) at if_clone_destroy+0x205 sys/net/if.c:1479 tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002eb7eab0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff5806e2d16e8,7,fffff580097fd680,ffff80002a22afa8) at VOP_CLOSE+0x132 sys/kern/vfs_vops.c:156 vn_closefile(fffff5806d07cc18,ffff80002a22afa8) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff5806d07cc18,ffff80002a22afa8) at vn_closefile+0x12b sys/kern/vfs_vnops.c:621 end trace frame: 0xffff80002eb7ebd0, count: 0 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: free: size too large 100 > 16 (0xffff800000c40950) type rtable ddb{0}> show kasan No such command ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83501d0b) at panic+0x1e5 sys/kern/subr_prf.c:198 free(ffff800000c40950,5,64) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff5806a8da640) at rtfree+0x367 sys/net/route.c:646 rt_ifa_dellocal(ffff800001619f00) at rt_ifa_dellocal+0x211 sys/net/route.c:1452 in_purgeaddr(ffff800001619f00) at in_purgeaddr+0x1c5 sys/netinet/in.c:754 in_ifdetach(ffff8000015ea800) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff8000015ea800) at if_detach+0x2fe sys/net/if.c:1311 tun_clone_destroy(ffff8000015ea800) at tun_clone_destroy+0x2ce sys/net/if_tun.c:343 if_clone_destroy(ffff80002eb7e9f0) at if_clone_destroy+0x205 sys/net/if.c:1479 tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002eb7eab0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff5806e2d16e8,7,fffff580097fd680,ffff80002a22afa8) at VOP_CLOSE+0x132 sys/kern/vfs_vops.c:156 vn_closefile(fffff5806d07cc18,ffff80002a22afa8) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff5806d07cc18,ffff80002a22afa8) at vn_closefile+0x12b sys/kern/vfs_vnops.c:621 fdrop(fffff5806d07cc18,ffff80002a22afa8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff5806d07cc18,ffff80002a22afa8) at closef+0x192 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a22afa8) at fdfree+0x116 sys/kern/kern_descrip.c:1196 exit1(ffff80002a22afa8,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a22afa8,ffff80002eb7ee20,ffff80002eb7ed70) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002eb7ee20) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002eb7ee20) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7813df1a4280, count: -21 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002eb7e660 rbx 0xffffffff839a3e0f cpu_info_full_primary+0x2e0f rdx 0 rcx 0xffff80002a22afa8 rax 0xffffffff839a2ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb68ceca6515cf045 r11 0x8e9ba87c8ccd616d r12 0xffffffff839a3c10 cpu_info_full_primary+0x2c10 r13 0 r14 0 r15 0x1 rip 0xffffffff831c3075 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002eb7e650 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=223535 pid=54481 tcnt=0 stat=onproc flags process=18 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=1 forw=0xffffffffffffffff, list=0xffff80002a22b4d8,0xffff80002a22a7f0 process=0xffff800045fef508 user=0xffff80002eb79000, vmspace=0xfffff58076fe75d0 estcpu=36, cpticks=9, pctcpu=0.6, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 56088 158441 65277 0 3 0x2 0 clonelk ifconfig 65277 392917 48620 0 3 0x100002 0x88 sigsusp sh 48620 353630 64590 0 3 0 0x80 wait syz-executor 64590 288005 54790 0 3 0x2 0x80 wait syz-executor 73123 152890 99480 0 3 0x2 0 clonelk ifconfig 99480 116326 17606 0 3 0x100002 0x88 sigsusp sh 17606 441810 848 0 3 0 0x80 wait syz-executor 848 62432 54790 0 3 0x2 0x80 wait syz-executor 66195 415523 54790 0 3 0x2 0x80 wait syz-executor 4827 267212 22043 0 3 0 0 clonelk syz-executor 22043 94500 54790 0 3 0x2 0x80 wait syz-executor 74529 170631 54790 0 3 0x2 0x80 wait syz-executor 42813 58107 54790 0 3 0x2 0x80 wait syz-executor 37492 286560 54790 0 3 0x2 0x80 wait syz-executor 72659 468120 54790 0 3 0x2 0x80 wait syz-executor 54790 113225 68623 0 3 0x2 0x80 kqread syz-executor 68623 325116 1414 0 3 0x100002 0x88 sigsusp ksh 1414 150837 37803 0 3 0x10 0x88 kqread sshd-session 37803 183004 1091 0 3 0x12 0x80 kqread sshd-session 48324 18338 1 0 3 0x100003 0x80 ttyin getty 1091 482934 1 0 3 0 0x88 kqread sshd 22346 204693 72676 73 3 0x1100010 0x80 kqread syslogd 72676 96051 1 0 3 0x100002 0x80 sbwait syslogd 83535 364470 1 0 3 0x100000 0x80 kqread resolvd 63092 222353 80768 77 3 0x100012 0x80 kqread dhcpleased 50599 262808 80768 77 3 0x100012 0x80 kqread dhcpleased 80768 457782 1 0 3 0 0x80 kqread dhcpleased 9755 222695 0 0 3 0x14000 0x200 bored smr 91699 50365 0 0 3 0x14000 0x200 pgzero zerothread 19653 399371 0 0 3 0x14000 0x200 aiodoned aiodoned 79767 187587 0 0 3 0x14000 0x200 syncer update 187 425982 0 0 3 0x14000 0x200 cleaner cleaner 76387 394796 0 0 3 0x14000 0x200 reaper reaper 3319 212251 0 0 3 0x14000 0x200 pgdaemon pagedaemon 28836 375173 0 0 3 0x14000 0x200 bored viomb 24440 115006 0 0 3 0x14000 0x40000200 acpi0 acpi0 31687 264034 0 0 7 0x14000 0x40000200 idle1 12145 223747 0 0 3 0x14000 0x200 bored softnet1 94970 38877 0 0 3 0x14000 0x200 bored softnet0 5507 32760 0 0 3 0x14000 0x200 smrbar systqmp 21301 361624 0 0 3 0x14000 0x200 bored systq 93736 23881 0 0 3 0x14000 0x200 tmoslp softclockmp 28145 357225 0 0 3 0x14000 0x40000200 tmoslp softclock 90013 222029 0 0 3 0x14000 0x40000200 idle0 1 65859 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex /syzkaller/managers/setuid/kernel/sys/kern/kern_malloc.c:96 r = 0 (0xffffffff839dbf38) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter+0x4b4 sys/kern/kern_lock.c:487 #2 free+0x9f sys/kern/kern_malloc.c:393 #3 rtfree+0x367 sys/net/route.c:646 #4 rt_ifa_dellocal+0x211 sys/net/route.c:1452 #5 in_purgeaddr+0x1c5 sys/netinet/in.c:754 #6 in_ifdetach+0x7e sys/netinet/in.c:1015 #7 if_detach+0x2fe sys/net/if.c:1311 #8 tun_clone_destroy+0x2ce sys/net/if_tun.c:343 #9 if_clone_destroy+0x205 sys/net/if.c:1479 #10 tun_dev_close+0x1d9 sys/net/if_tun.c:526 #11 spec_close+0x417 sys/kern/spec_vnops.c:-1 #12 VOP_CLOSE+0x132 sys/kern/vfs_vops.c:156 #13 vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:298 [inline] #13 vn_closefile+0x12b sys/kern/vfs_vnops.c:621 #14 fdrop+0x121 sys/kern/kern_descrip.c:1281 #15 closef+0x192 sys/kern/kern_descrip.c:1265 #16 fdfree+0x116 sys/kern/kern_descrip.c:1196 #17 exit1+0x595 sys/kern/kern_exit.c:215 #18 sys_exit+0x1a sys/kern/kern_exit.c:-1 Process 5507 (systqmp) thread 0xffff800045ffe298 (32760) shared rwlock systqmp r = 0 (0xffffffff83956a88) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 taskq_thread+0x12a sys/kern/kern_task.c:442 #2 proc_trampoline+0x10 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11073 12016K 12034K 166960K 12182 0 pcb 17 12K 12K 166960K 17 0 rtable 166 4K 6K 166960K 415 0 pf 25 16K 16K 166960K 35 0 ifaddr 30 5K 7K 166960K 52 0 ifgroup 38 1K 2K 166960K 58 0 sysctl 2 1K 9K 166960K 6 0 counters 64 36K 37K 166960K 74 0 ioctlops 0 0K 4K 166960K 33 0 iov 0 0K 20K 166960K 40 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1287 81K 81K 166960K 1509 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 5 0K 0K 166960K 5 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 22 81K 121K 166960K 255 0 proc 72 131K 147K 166960K 573 0 subproc 72 4K 4K 166960K 117 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 22 0 in_multi 66 4K 6K 166960K 126 0 ether_multi 1 0K 0K 166960K 3 0 mrt 0 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 259 1155K 1155K 166960K 259 0 exec 0 0K 1K 166960K 437 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 194 168K 189K 166960K 3804 0 UVM aobj 5 2K 2K 166960K 5 0 pinsyscall 43 86K 114K 166960K 1419 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 5 0 NDP 10 0K 1K 166960K 33 0 temp 36 9122K 9142K 166960K 4298 0 kqueue 13 20K 22K 166960K 40 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 28 0 0 1 0 1 1 0 8 0 rtpcb 120 43 0 40 1 0 1 1 0 8 0 rtentry 176 133 0 58 5 0 5 5 0 8 0 unpcb 144 76 0 61 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 33 0 29 1 0 1 1 0 8 0 arp 136 22 0 10 1 0 1 1 0 8 0 inpcb 328 144 0 135 2 0 2 2 0 8 0 nd6 152 30 0 15 1 0 1 1 0 8 0 kcovpl 48 13 0 5 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 541 0 220 29 0 29 29 0 8 6 art_table 40 542 0 220 5 0 5 5 0 8 0 art_node 32 133 0 53 1 0 1 1 0 8 0 semapl 72 3 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1743 0 273 92 0 92 92 0 8 0 ffsino 296 1743 0 273 114 0 114 114 0 8 0 nchpl 144 2023 0 323 64 0 64 64 0 8 1 vnodes 216 1869 0 0 104 0 104 104 0 8 0 namei 1024 7368 0 7368 3 1 2 2 0 8 2 percpumem 16 53 0 5 1 0 1 1 0 8 0 kstatmem 264 29 0 10 2 0 2 2 0 8 0 scxspl 216 6623 0 6623 4 3 1 3 1 8 1 plimitpl 152 57 0 33 2 0 2 2 0 8 0 sigapl 424 543 0 493 7 0 7 7 0 8 0 knotepl 120 303 0 0 10 0 10 10 0 8 0 kqueuepl 224 44 0 35 1 0 1 1 0 8 0 pipepl 344 145 0 118 4 0 4 4 0 8 0 fdescpl 528 527 0 493 3 0 3 3 0 8 0 filepl 160 2342 0 2139 14 0 14 14 0 8 3 lockfpl 104 12 0 10 1 0 1 1 0 8 0 lockfspl 48 7 0 5 1 0 1 1 0 8 0 sessionpl 144 31 0 15 1 0 1 1 0 8 0 pgrppl 48 49 0 25 1 0 1 1 0 8 0 ucredpl 104 635 0 619 1 0 1 1 0 8 0 zombiepl 144 498 0 493 1 0 1 1 0 8 0 processpl 1232 543 0 493 5 0 5 5 0 8 0 procpl 664 677 0 627 6 0 6 6 0 8 0 sockpl 752 266 0 239 4 0 4 4 0 8 0 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 115 0 0 15 0 15 15 0 8 0 mcl2k 2048 33 0 0 5 0 5 5 0 8 0 mextrefs 64 31 0 0 1 0 1 1 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 301 0 0 19 0 19 19 0 8 0 bufpl 272 2302 0 102 147 0 147 147 0 8 0 anonpl 32 9334 0 0 76 0 76 76 0 247 0 amapchunkpl 152 10938 0 10585 34 0 34 34 0 158 13 amappl16 200 2169 0 2158 14 0 14 14 0 8 12 amappl15 192 5 0 5 2 1 1 1 0 8 1 amappl14 184 439 0 436 1 0 1 1 0 8 0 amappl13 176 119 0 109 1 0 1 1 0 8 0 amappl12 168 769 0 741 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 1 0 1 0 8 0 amappl10 152 82 0 72 1 0 1 1 0 8 0 amappl9 144 281 0 280 1 0 1 1 0 8 0 amappl8 136 105 0 102 1 0 1 1 0 8 0 amappl7 128 149 0 138 1 0 1 1 0 8 0 amappl6 120 180 0 173 1 0 1 1 0 8 0 amappl5 112 92 0 85 1 0 1 1 0 8 0 amappl4 104 307 0 291 1 0 1 1 0 8 0 amappl3 96 1839 0 1772 4 1 3 3 0 8 0 amappl2 88 634 0 565 2 0 2 2 0 8 0 amappl1 80 10760 0 10198 14 0 14 14 0 8 0 amappl 88 3063 0 2935 5 0 5 5 0 92 0 uvmvnodes 80 96 0 0 2 0 2 2 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 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 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 527 0 493 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 527 0 493 1 0 1 1 0 8 0 vmmpekpl 168 6184 0 6146 3 0 3 3 0 8 0 vmmpepl 168 43262 0 41521 100 0 100 100 0 357 11 vmsppl 488 526 0 493 7 1 6 6 0 8 0 rwobjpl 80 15769 0 14865 25 0 25 25 0 8 3 pdppl 4096 1061 0 986 109 24 85 95 0 8 10 pvpl 32 16584 0 0 134 0 134 134 0 265 0 pmappl 256 526 0 493 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 434 0 28 12 0 12 12 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(ffffffff83501d0b) at panic+0x1e5 sys/kern/subr_prf.c:198 free(ffff800000c40950,5,64) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff5806a8da640) at rtfree+0x367 sys/net/route.c:646 rt_ifa_dellocal(ffff800001619f00) at rt_ifa_dellocal+0x211 sys/net/route.c:1452 in_purgeaddr(ffff800001619f00) at in_purgeaddr+0x1c5 sys/netinet/in.c:754 in_ifdetach(ffff8000015ea800) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff8000015ea800) at if_detach+0x2fe sys/net/if.c:1311 tun_clone_destroy(ffff8000015ea800) at tun_clone_destroy+0x2ce sys/net/if_tun.c:343 if_clone_destroy(ffff80002eb7e9f0) at if_clone_destroy+0x205 sys/net/if.c:1479 tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002eb7eab0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff5806e2d16e8,7,fffff580097fd680,ffff80002a22afa8) at VOP_CLOSE+0x132 sys/kern/vfs_vops.c:156 vn_closefile(fffff5806d07cc18,ffff80002a22afa8) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff5806d07cc18,ffff80002a22afa8) at vn_closefile+0x12b sys/kern/vfs_vnops.c:621 fdrop(fffff5806d07cc18,ffff80002a22afa8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff5806d07cc18,ffff80002a22afa8) at closef+0x192 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a22afa8) at fdfree+0x116 sys/kern/kern_descrip.c:1196 exit1(ffff80002a22afa8,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a22afa8,ffff80002eb7ee20,ffff80002eb7ed70) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002eb7ee20) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002eb7ee20) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7813df1a4280, count: -21 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff80002999dff0) 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(ffff80002999dff0) at sched_idle+0x371 sys/kern/kern_sched.c:192 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff80002999dff0) 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(ffff80002999dff0) at sched_idle+0x371 sys/kern/kern_sched.c:192 end trace frame: 0x0, count: -5