panic: free: size too large 51 > 16 (0xffff800000c55c50) 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(ffffffff834c413d) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55c50,5,33) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(ffffef006d31e090) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000159f800,400004,ffff80000159f878,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d in_ifscrub sys/netinet/in.c:-1 [inline] in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d sys/netinet/in.c:751 in_ifdetach(ffff80000170a000) at in_ifdetach+0x16e sys/netinet/in.c:1030 if_detach(ffff80000170a000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff80000170a000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a7d5780) at if_clone_destroy+0x1d5 sys/net/if.c:1480 tun_dev_close(5d03,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a7d5840) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006f913388,7,ffffef0007ffd6e8,ffff80002a7367d0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 end trace frame: 0xffff80002a7d5960, 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 51 > 16 (0xffff800000c55c50) 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(ffffffff834c413d) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55c50,5,33) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(ffffef006d31e090) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000159f800,400004,ffff80000159f878,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d in_ifscrub sys/netinet/in.c:-1 [inline] in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d sys/netinet/in.c:751 in_ifdetach(ffff80000170a000) at in_ifdetach+0x16e sys/netinet/in.c:1030 if_detach(ffff80000170a000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff80000170a000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a7d5780) at if_clone_destroy+0x1d5 sys/net/if.c:1480 tun_dev_close(5d03,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a7d5840) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006f913388,7,ffffef0007ffd6e8,ffff80002a7367d0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffef006ae4e5b0,ffff80002a7367d0) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffef006ae4e5b0,ffff80002a7367d0) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a7367d0) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a7367d0,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a7367d0,ffff80002a7d5ba0,ffff80002a7d5af0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a7d5ba0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7d5ba0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b88a5a9d1a0, count: -21 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a7d52e0 rbx 0x10 rdx 0 rcx 0 rax 0xffff80002a7367d0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x801a24eda518bf3b r11 0x276093dfad7a275b r12 0 r13 0x33 r14 0 r15 0x1 rip 0xffffffff8136c9d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a7d52d0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=353224 pid=33427 tcnt=0 stat=onproc flags process=a proc=2000 runpri=32, usrpri=78, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003c900fb0,0xffff80002a736d10 process=0xffff80003c8dad68 user=0xffff80002a7d0000, vmspace=0xffffef006d1af2f0 estcpu=28, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 54338 30109 335 0 3 0x2 0 clonelk ifconfig 335 349870 45665 0 3 0x100002 0x88 sigsusp sh 45665 497452 79325 0 3 0x2 0x80 wait syz-executor 54037 18249 79325 0 3 0x2 0x80 piperd syz-executor 92608 45319 1 0 3 0x100003 0x80 ttyin getty 79325 409266 98467 0 3 0x2 0x80 nanoslp syz-executor 98467 300538 34937 0 3 0x100002 0x88 sigsusp ksh 34937 99674 53014 0 3 0x10 0x88 kqread sshd-session 53014 358170 78670 0 3 0x12 0x80 kqread sshd-session 78670 368473 1 0 3 0 0x88 kqread sshd 25084 13425 22395 73 3 0x1100010 0x80 kqread syslogd 22395 328223 1 0 3 0x100002 0x80 sbwait syslogd 1815 474920 1 0 3 0x100000 0x80 kqread resolvd 84256 363323 82359 77 3 0x100012 0x80 kqread dhcpleased 95226 178304 82359 77 3 0x100012 0x80 kqread dhcpleased 82359 203860 1 0 3 0 0x80 kqread dhcpleased 51355 282256 0 0 3 0x14000 0x200 bored smr 85604 135483 0 0 3 0x14000 0x200 pgzero zerothread 62976 154634 0 0 3 0x14000 0x200 aiodoned aiodoned 7621 237877 0 0 3 0x14000 0x200 syncer update 66071 58786 0 0 3 0x14000 0x200 cleaner cleaner 1620 297324 0 0 3 0x14000 0x200 reaper reaper 64696 75869 0 0 3 0x14000 0x200 pgdaemon pagedaemon 26817 442085 0 0 3 0x14000 0x200 bored viomb 11011 518499 0 0 3 0x14000 0x40000200 acpi0 acpi0 40653 245295 0 0 3 0x14000 0x200 bored softnet0 20407 447108 0 0 2 0x14000 0x200 systqmp 84925 338267 0 0 3 0x14000 0x200 bored systq 30404 227678 0 0 3 0x14000 0x40000200 tmoslp softclock 88480 520970 0 0 3 0x14000 0x40000200 idle0 1 392506 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 11057 12111K 12237K 166960K 12379 0 pcb 17 12K 12K 166960K 50 0 rtable 186 6K 8K 166960K 1556 0 pf 27 12K 653K 166960K 263 0 ifaddr 36 6K 7K 166960K 211 0 ifgroup 42 1K 2K 166960K 221 0 sysctl 2 1K 9K 166960K 7 0 counters 31 17K 17K 166960K 78 0 ioctlops 0 0K 4K 166960K 229 0 iov 0 0K 16K 166960K 6 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1358 85K 86K 166960K 1980 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 11 0K 0K 166960K 12 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 11 37K 89K 166960K 895 0 proc 67 67K 108K 166960K 1619 0 subproc 63 3K 4K 166960K 432 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 13 0 in_multi 77 5K 6K 166960K 534 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 21 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 253 1129K 1129K 166960K 253 0 exec 0 0K 1K 166960K 890 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 161 142K 168K 166960K 7794 0 UVM aobj 7 2K 3K 166960K 8 0 pinsyscall 32 64K 92K 166960K 3017 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 3 0 NDP 15 0K 2K 166960K 150 0 temp 31 9110K 9174K 166960K 10627 0 kqueue 13 20K 30K 166960K 66 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 128 0 125 1 0 1 1 0 8 0 rtentry 136 546 0 464 4 0 4 4 0 8 0 unpcb 144 107 0 92 1 0 1 1 0 8 0 syncache 336 6 0 6 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 736 53 0 47 2 0 2 2 0 8 1 arp 96 98 0 82 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 333 0 323 3 1 2 2 0 8 1 ip6q 80 2 0 1 1 0 1 1 0 8 0 ip6af 40 3 0 2 1 0 1 1 0 8 0 nd6 112 143 0 125 1 0 1 1 0 8 0 kcovpl 48 48 0 41 1 0 1 1 0 8 0 ppxss 1072 5 0 5 1 0 1 1 0 8 1 pfanchor 1288 2 0 0 1 0 1 1 0 8 0 pfstkey 128 1 0 1 1 1 0 1 0 8 0 pfstate 384 1 0 1 1 1 0 1 0 8 0 pfrule 1360 1 0 1 1 1 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 2222 0 1856 32 4 28 29 0 8 2 art_table 40 2224 0 1856 5 0 5 5 0 8 0 art_node 32 546 0 473 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 72 9 0 0 1 0 1 1 0 8 0 shmpl 120 5 0 1 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1906 0 352 98 0 98 98 0 8 0 ffsino 256 1906 0 352 98 0 98 98 0 8 0 nchpl 144 2346 0 499 69 0 69 69 0 8 0 vnodes 216 2565 0 0 143 0 143 143 0 8 0 namei 1024 12608 0 12608 5 3 2 3 0 8 2 kstatmem 264 113 0 94 2 0 2 2 0 8 0 scxspl 216 18212 0 18212 15 7 8 8 1 8 8 plimitpl 152 171 0 156 1 0 1 1 0 8 0 sigapl 424 1111 0 1075 7 1 6 6 0 8 1 knotepl 120 10458 0 10411 16 7 9 10 0 8 6 kqueuepl 184 70 0 61 1 0 1 1 0 8 0 pipepl 304 247 0 220 3 0 3 3 0 8 0 fdescpl 448 1098 0 1075 5 1 4 5 0 8 0 filepl 120 3952 0 3767 10 2 8 10 0 8 1 lockfpl 104 60 0 58 1 0 1 1 0 8 0 lockfspl 48 30 0 28 1 0 1 1 0 8 0 sessionpl 144 75 0 67 1 0 1 1 0 8 0 pgrppl 48 124 0 109 1 0 1 1 0 8 0 ucredpl 104 349 0 338 1 0 1 1 0 8 0 zombiepl 144 1080 0 1075 1 0 1 1 0 8 0 processpl 1160 1111 0 1075 4 0 4 4 0 8 0 procpl 664 1471 0 1435 7 2 5 6 0 8 0 sockpl 552 569 0 541 3 0 3 3 0 8 0 mcl64k 65536 4 0 3 2 1 1 1 0 8 0 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl8k 8192 7 0 7 2 1 1 1 0 8 1 mcl4k 4096 2681 0 2629 14 6 8 14 0 8 0 mcl2k 2048 962 0 961 7 2 5 5 0 8 4 mextrefs 64 248 0 248 2 1 1 1 0 8 1 mtagpl 96 8 0 8 2 1 1 1 0 8 1 mbufpl 256 9074 0 9003 23 5 18 18 0 8 7 bufpl 272 12929 0 6713 415 0 415 415 0 8 0 anonpl 24 184737 0 182137 65 28 37 65 0 187 10 amapchunkpl 152 23249 0 22980 47 19 28 47 0 158 12 amappl16 200 3606 0 3599 22 15 7 18 0 8 6 amappl15 192 3 0 3 1 1 0 1 0 8 0 amappl14 184 881 0 879 1 0 1 1 0 8 0 amappl13 176 206 0 196 1 0 1 1 0 8 0 amappl12 168 1539 0 1518 2 0 2 2 0 8 0 amappl11 160 49 0 49 1 1 0 1 0 8 0 amappl10 152 66 0 56 1 0 1 1 0 8 0 amappl9 144 268 0 268 1 1 0 1 0 8 0 amappl8 136 253 0 251 1 0 1 1 0 8 0 amappl7 128 216 0 204 1 0 1 1 0 8 0 amappl6 120 538 0 535 1 0 1 1 0 8 0 amappl5 112 119 0 112 1 0 1 1 0 8 0 amappl4 104 381 0 365 1 0 1 1 0 8 0 amappl3 96 3902 0 3849 3 0 3 3 0 8 0 amappl2 88 1068 0 1004 2 0 2 2 0 8 0 amappl1 80 15803 0 15293 13 1 12 13 0 8 0 amappl 88 6402 0 6303 5 1 4 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 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 7 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1098 0 1075 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1098 0 1075 1 0 1 1 0 8 0 vmmpekpl 168 10190 0 10145 3 0 3 3 0 8 0 vmmpepl 168 80905 0 79538 92 11 81 90 0 357 10 vmsppl 368 1097 0 1075 4 1 3 4 0 8 0 rwobjpl 40 26221 0 25363 13 0 13 13 0 8 0 pdppl 4096 2202 0 2150 130 66 64 78 0 8 12 pvpl 32 460691 0 453963 152 39 113 152 0 265 37 pmappl 216 1097 0 1075 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 848 0 95 22 0 22 22 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(ffffffff834c413d) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55c50,5,33) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(ffffef006d31e090) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000159f800,400004,ffff80000159f878,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d in_ifscrub sys/netinet/in.c:-1 [inline] in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d sys/netinet/in.c:751 in_ifdetach(ffff80000170a000) at in_ifdetach+0x16e sys/netinet/in.c:1030 if_detach(ffff80000170a000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff80000170a000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a7d5780) at if_clone_destroy+0x1d5 sys/net/if.c:1480 tun_dev_close(5d03,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a7d5840) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006f913388,7,ffffef0007ffd6e8,ffff80002a7367d0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffef006ae4e5b0,ffff80002a7367d0) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffef006ae4e5b0,ffff80002a7367d0) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a7367d0) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a7367d0,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a7367d0,ffff80002a7d5ba0,ffff80002a7d5af0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a7d5ba0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7d5ba0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b88a5a9d1a0, 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(ffffffff834c413d) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55c50,5,33) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(ffffef006d31e090) at rtfree+0x34e sys/net/route.c:646 rt_ifa_del(ffff80000159f800,400004,ffff80000159f878,0) at rt_ifa_del+0x44b sys/net/route.c:-1 in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d in_ifscrub sys/netinet/in.c:-1 [inline] in_purgeaddr(ffff80000159f800) at in_purgeaddr+0x19d sys/netinet/in.c:751 in_ifdetach(ffff80000170a000) at in_ifdetach+0x16e sys/netinet/in.c:1030 if_detach(ffff80000170a000) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff80000170a000) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a7d5780) at if_clone_destroy+0x1d5 sys/net/if.c:1480 tun_dev_close(5d03,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a7d5840) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006f913388,7,ffffef0007ffd6e8,ffff80002a7367d0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006ae4e5b0,ffff80002a7367d0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffef006ae4e5b0,ffff80002a7367d0) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffef006ae4e5b0,ffff80002a7367d0) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a7367d0) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a7367d0,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a7367d0,ffff80002a7d5ba0,ffff80002a7d5af0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a7d5ba0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7d5ba0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7b88a5a9d1a0, count: -21