panic: free: size too large 100 > 16 (0xffff800000c57740) 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(ffffffff834c7d84) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c57740,5,64) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffffd806cd30c40) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000160cd00,800100,ffff80000160cd68,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_remove_prefix sys/netinet/in.c:810 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_ifscrub sys/netinet/in.c:636 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 sys/netinet/in.c:751 in_ifdetach(ffff8000015e5000) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff8000015e5000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff8000015e5000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a815630) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d02,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a8156f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8075ea06e8,7,fffffd8007ffd618,ffff80002a761c98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 end trace frame: 0xffff80002a815810, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: free: size too large 100 > 16 (0xffff800000c57740) type rtable ddb> show kasan No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834c7d84) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c57740,5,64) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffffd806cd30c40) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000160cd00,800100,ffff80000160cd68,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_remove_prefix sys/netinet/in.c:810 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_ifscrub sys/netinet/in.c:636 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 sys/netinet/in.c:751 in_ifdetach(ffff8000015e5000) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff8000015e5000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff8000015e5000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a815630) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d02,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a8156f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8075ea06e8,7,fffffd8007ffd618,ffff80002a761c98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffffd806d15e440,ffff80002a761c98) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffffd806d15e440,ffff80002a761c98) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a761c98) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a761c98,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a761c98,ffff80002a815a50,ffff80002a8159a0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a815a50) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a815a50) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7adda99baa80, count: -21 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a8151a0 rbx 0x10 rdx 0 rcx 0 rax 0xffff80002a761c98 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb4999c5f3002007f r11 0xcce42391016b33b5 r12 0 r13 0x64 r14 0 r15 0x1 rip 0xffffffff829aa025 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a815190 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=23783 pid=87519 tcnt=0 stat=onproc flags process=a proc=2000 runpri=32, usrpri=60, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=1 forw=0xffffffffffffffff, list=0xffff80002a761a00,0xffff80002a736a78 process=0xffff80002a78c490 user=0xffff80002a810000, vmspace=0xfffffd8073445008 estcpu=10, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 71537 401753 50877 0 3 0x2 0x80 piperd syz-executor 10027 115726 50877 0 3 0x2 0x80 piperd syz-executor 36469 492810 50877 0 3 0x2 0x80 piperd syz-executor 12306 132143 50877 0 3 0x2 0x80 piperd syz-executor 26579 3983 50877 0 3 0x2 0x80 piperd syz-executor 27464 234762 50877 0 3 0x2 0x80 piperd syz-executor 15686 351460 50877 0 3 0x2 0x80 piperd syz-executor 50877 51033 96797 0 3 0x2 0x80 wait syz-executor 96797 110671 1550 0 3 0x100002 0x88 sigsusp ksh 1550 185322 69594 0 3 0x10 0x88 kqread sshd-session 69594 20063 89192 0 3 0x12 0x80 kqread sshd-session 82119 477080 1 0 3 0x100003 0x80 ttyin getty 89192 481857 1 0 3 0 0x88 kqread sshd 70851 467278 97907 73 3 0x1100010 0x80 kqread syslogd 97907 50900 1 0 3 0x100002 0x80 sbwait syslogd 23531 53643 1 0 3 0x100000 0x80 kqread resolvd 55423 41280 71246 77 3 0x100012 0x80 kqread dhcpleased 29948 366139 71246 77 3 0x100012 0x80 kqread dhcpleased 71246 483365 1 0 3 0 0x80 kqread dhcpleased 25645 316419 0 0 3 0x14000 0x200 bored smr 4363 224673 0 0 3 0x14000 0x200 pgzero zerothread 58604 481715 0 0 3 0x14000 0x200 aiodoned aiodoned 73830 290821 0 0 3 0x14000 0x200 syncer update 19764 102657 0 0 3 0x14000 0x200 cleaner cleaner 95431 252101 0 0 3 0x14000 0x200 reaper reaper 30613 20930 0 0 3 0x14000 0x200 pgdaemon pagedaemon 84141 209849 0 0 3 0x14000 0x200 bored viomb 98935 181579 0 0 3 0x14000 0x40000200 acpi0 acpi0 51888 122702 0 0 3 0x14000 0x200 bored softnet0 15543 408625 0 0 2 0x14000 0x200 systqmp 79596 292830 0 0 3 0x14000 0x200 bored systq 53963 419079 0 0 3 0x14000 0x40000200 tmoslp softclock 8032 99769 0 0 3 0x14000 0x40000200 idle0 1 291910 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11027 12102K 12654K 166960K 12426 0 pcb 17 16K 18K 166960K 103 0 rtable 244 7K 8K 166960K 434 0 pf 31 13K 13K 166960K 35 0 ifaddr 42 7K 7K 166960K 52 0 ifgroup 50 2K 2K 166960K 58 0 sysctl 3 1K 9K 166960K 7 0 counters 33 17K 17K 166960K 35 0 ioctlops 0 0K 4K 166960K 34 0 iov 0 0K 16K 166960K 1 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1423 89K 90K 166960K 1539 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 5 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1734 201K 291K 166960K 11964 0 file desc 10 33K 93K 166960K 196 0 proc 58 59K 108K 166960K 558 0 subproc 72 4K 4K 166960K 90 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 8 0 in_multi 99 6K 6K 166960K 123 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 49 228K 228K 166960K 49 0 exec 0 0K 1K 166960K 440 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 160 149K 159K 166960K 3346 0 UVM aobj 4 2K 2K 166960K 4 0 pinsyscall 31 62K 94K 166960K 1348 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 8 0 NDP 13 0K 2K 166960K 33 0 temp 33 9106K 9126K 166960K 4093 0 kqueue 13 20K 26K 166960K 31 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 45 0 42 1 0 1 1 0 8 0 rtentry 136 134 0 23 4 0 4 4 0 8 0 unpcb 144 319 0 304 4 0 4 4 0 8 3 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 241 0 237 16 0 16 16 0 8 15 arp 96 23 0 4 1 0 1 1 0 8 0 inpcb 328 389 0 382 15 0 15 15 0 8 14 nd6 112 30 0 6 1 0 1 1 0 8 0 kcovpl 48 10 0 2 1 0 1 1 0 8 0 pfstscr 40 2 0 2 1 0 1 1 0 8 1 pfstkey 128 1 0 1 1 0 1 1 0 8 1 pfstate 384 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 541 0 88 32 0 32 32 0 8 3 art_table 40 543 0 88 6 0 6 6 0 8 0 art_node 32 134 0 33 1 0 1 1 0 8 0 semapl 72 3 0 0 1 0 1 1 0 8 0 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1634 0 167 92 0 92 92 0 8 0 ffsino 256 1634 0 167 92 0 92 92 0 8 0 nchpl 144 1867 0 170 64 0 64 64 0 8 0 vnodes 216 1878 0 0 105 0 105 105 0 8 0 namei 1024 7344 0 7344 3 0 3 3 0 8 3 kstatmem 264 27 0 4 2 0 2 2 0 8 0 scxspl 216 6584 0 6584 4 0 4 4 1 8 4 plimitpl 152 37 0 21 1 0 1 1 0 8 0 sigapl 424 487 0 452 6 0 6 6 0 8 1 knotepl 120 3625 0 3578 10 0 10 10 0 8 8 kqueuepl 184 33 0 24 1 0 1 1 0 8 0 pipepl 304 128 0 101 3 0 3 3 0 8 0 fdescpl 448 474 0 452 5 0 5 5 0 8 2 filepl 120 2434 0 2232 14 0 14 14 0 8 6 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 26 0 18 1 0 1 1 0 8 0 pgrppl 48 36 0 20 1 0 1 1 0 8 0 ucredpl 104 110 0 99 1 0 1 1 0 8 0 zombiepl 144 453 0 452 1 0 1 1 0 8 0 processpl 1152 487 0 452 4 0 4 4 0 8 0 procpl 664 545 0 510 5 0 5 5 0 8 2 sosppl 176 2 0 2 1 0 1 1 0 8 1 sockpl 552 753 0 728 15 0 15 15 0 8 13 mcl64k 65536 2 0 2 1 0 1 1 0 8 1 mcl16k 16384 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 5 0 5 1 0 1 1 0 8 1 mcl4k 4096 2527 0 2471 13 0 13 13 0 8 5 mcl2k 2048 177 0 177 4 0 4 4 0 8 4 mextrefs 64 80 0 80 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4851 0 4712 16 0 16 16 0 8 2 bufpl 272 2390 0 102 153 0 153 153 0 8 0 anonpl 24 81992 0 79396 20 0 20 20 0 187 0 amapchunkpl 152 8940 0 8668 20 0 20 20 0 158 4 amappl16 200 1067 0 1054 4 0 4 4 0 8 3 amappl15 192 60 0 60 1 0 1 1 0 8 1 amappl14 184 431 0 430 1 0 1 1 0 8 0 amappl13 176 120 0 110 1 0 1 1 0 8 0 amappl12 168 721 0 700 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 0 1 1 0 8 1 amappl10 152 58 0 48 1 0 1 1 0 8 0 amappl9 144 278 0 278 1 0 1 1 0 8 1 amappl8 136 120 0 119 1 0 1 1 0 8 0 amappl7 128 143 0 132 1 0 1 1 0 8 0 amappl6 120 168 0 167 1 0 1 1 0 8 0 amappl5 112 91 0 84 1 0 1 1 0 8 0 amappl4 104 278 0 261 1 0 1 1 0 8 0 amappl3 96 1664 0 1613 3 0 3 3 0 8 0 amappl2 88 580 0 519 2 0 2 2 0 8 0 amappl1 80 10509 0 9988 13 0 13 13 0 8 1 amappl 88 2617 0 2519 4 0 4 4 0 92 0 uvmvnodes 80 96 0 0 2 0 2 2 0 8 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 474 0 452 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 474 0 452 1 0 1 1 0 8 0 vmmpekpl 168 5823 0 5785 2 0 2 2 0 8 0 vmmpepl 168 39490 0 38113 80 0 80 80 0 357 6 vmsppl 368 473 0 452 4 0 4 4 0 8 1 rwobjpl 40 14194 0 13345 11 0 11 11 0 8 0 pdppl 4096 954 0 904 94 26 68 80 0 8 18 pvpl 32 216041 0 209439 74 0 74 74 0 265 5 pmappl 216 473 0 452 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 536 0 26 15 0 15 15 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(ffffffff834c7d84) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c57740,5,64) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffffd806cd30c40) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000160cd00,800100,ffff80000160cd68,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_remove_prefix sys/netinet/in.c:810 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_ifscrub sys/netinet/in.c:636 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 sys/netinet/in.c:751 in_ifdetach(ffff8000015e5000) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff8000015e5000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff8000015e5000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a815630) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d02,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a8156f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8075ea06e8,7,fffffd8007ffd618,ffff80002a761c98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffffd806d15e440,ffff80002a761c98) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffffd806d15e440,ffff80002a761c98) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a761c98) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a761c98,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a761c98,ffff80002a815a50,ffff80002a8159a0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a815a50) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a815a50) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7adda99baa80, count: -21 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834c7d84) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c57740,5,64) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffffd806cd30c40) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000160cd00,800100,ffff80000160cd68,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_remove_prefix sys/netinet/in.c:810 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 in_ifscrub sys/netinet/in.c:636 [inline] in_purgeaddr(ffff80000160cd00) at in_purgeaddr+0x129 sys/netinet/in.c:751 in_ifdetach(ffff8000015e5000) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff8000015e5000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff8000015e5000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a815630) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d02,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a8156f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8075ea06e8,7,fffffd8007ffd618,ffff80002a761c98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd806d15e440,ffff80002a761c98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffffd806d15e440,ffff80002a761c98) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffffd806d15e440,ffff80002a761c98) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a761c98) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a761c98,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a761c98,ffff80002a815a50,ffff80002a8159a0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a815a50) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a815a50) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7adda99baa80, count: -21