panic: free: size too large 40 > 16 (0xffff800000c55a60) 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(ffffffff834c8626) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55a60,5,28) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff9006d6f49a8) at rtfree+0x34e sys/net/route.c:646 rt_ifa_dellocal(ffff80000160c600) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452 in_purgeaddr(ffff80000160c600) at in_purgeaddr+0x1c5 sys/netinet/in.c:754 in_ifdetach(ffff800001586800) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff800001586800) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff800001586800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a8076b0) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a807770) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff9007a621898,7,fffff90007ffd000,ffff80002a7a0548) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 end trace frame: 0xffff80002a807890, 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 40 > 16 (0xffff800000c55a60) 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(ffffffff834c8626) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55a60,5,28) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff9006d6f49a8) at rtfree+0x34e sys/net/route.c:646 rt_ifa_dellocal(ffff80000160c600) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452 in_purgeaddr(ffff80000160c600) at in_purgeaddr+0x1c5 sys/netinet/in.c:754 in_ifdetach(ffff800001586800) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff800001586800) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff800001586800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a8076b0) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a807770) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff9007a621898,7,fffff90007ffd000,ffff80002a7a0548) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff9006d62cda8,ffff80002a7a0548) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff9006d62cda8,ffff80002a7a0548) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a7a0548) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a7a0548,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a7a0548,ffff80002a807ad0,ffff80002a807a20) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a807ad0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a807ad0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73acd1bcfa00, count: -21 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a807330 rbx 0x10 rdx 0 rcx 0 rax 0xffff80002a7a0548 r8 0x101010101010101 r9 0x8080808080808080 r10 0x55ccc66ec802d211 r11 0x36f1ae6ce073c3f9 r12 0 r13 0x28 r14 0 r15 0x1 rip 0xffffffff83139585 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a807320 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=385808 pid=7681 tcnt=0 stat=onproc flags process=a proc=2000 runpri=32, usrpri=69, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003a4f2fb8,0xffff80003a4f34f8 process=0xffff80002a744908 user=0xffff80002a802000, vmspace=0xfffff9007a9072e8 estcpu=19, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 75082 187673 15276 0 2 0 0xc80 syz-executor 75082 29070 15276 0 3 0 0x4000080 piperd syz-executor 75082 335551 15276 0 3 0 0x4000000 clonelk syz-executor 75082 436304 15276 0 3 0 0x4000000 clonelk syz-executor 75082 305621 15276 0 3 0 0x4000080 fsleep syz-executor 66112 98242 73247 0 3 0x2 0 clonelk ifconfig 73247 8467 41374 0 3 0x100002 0x88 sigsusp sh 41374 10039 61237 0 3 0x2 0x80 wait syz-executor 40403 349390 1 0 3 0x100003 0x80 ttyin getty 29955 449370 61237 0 3 0x2 0x80 piperd syz-executor 28162 112656 61237 0 3 0x2 0x80 piperd syz-executor 68413 165719 61237 0 3 0x2 0x80 piperd syz-executor 79484 106087 61237 0 2 0x10000002 0 syz-executor 15276 466781 61237 0 3 0x2 0x80 nanoslp syz-executor 61237 378468 1 0 3 0x2 0x80 wait syz-executor 88045 175054 0 0 3 0x14000 0x200 bored smr 49555 256323 0 0 2 0x14000 0x200 zerothread 74740 508352 0 0 3 0x14000 0x200 aiodoned aiodoned 61463 470248 0 0 3 0x14000 0x200 syncer update 54607 325819 0 0 3 0x14000 0x200 cleaner cleaner 17802 83889 0 0 3 0x14000 0x200 reaper reaper 78302 398045 0 0 3 0x14000 0x200 pgdaemon pagedaemon 59044 367001 0 0 3 0x14000 0x200 bored viomb 63458 503771 0 0 3 0x14000 0x40000200 acpi0 acpi0 49955 260553 0 0 2 0x14000 0x200 softnet0 93810 302367 0 0 2 0x14000 0x200 systqmp 27895 332503 0 0 3 0x14000 0x200 bored systq 93754 462493 0 0 3 0x14000 0x40000200 tmoslp softclock 3726 319418 0 0 3 0x14000 0x40000200 idle0 1 484041 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 11028 12099K 12640K 166960K 12623 0 pcb 18 12K 12K 166960K 53 0 rtable 239 8K 9K 166960K 1574 0 pf 31 13K 17K 166960K 144 0 ifaddr 34 6K 7K 166960K 194 0 ifgroup 46 2K 2K 166960K 220 0 sysctl 3 1K 9K 166960K 8 0 counters 32 17K 18K 166960K 77 0 ioctlops 0 0K 4K 166960K 135 0 iov 1 1K 16K 166960K 8 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1393 88K 88K 166960K 2091 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 8 0 VM map 2 1K 1K 166960K 2 0 sem 14 0K 0K 166960K 17 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 12 45K 224K 166960K 893 0 proc 27 33K 108K 166960K 1492 0 subproc 72 4K 4K 166960K 387 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 27 0 in_multi 76 5K 6K 166960K 478 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 27 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 103 466K 466K 166960K 103 0 exec 0 0K 1K 166960K 834 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 93 82K 167K 166960K 7906 0 UVM aobj 11 2K 2K 166960K 11 0 pinsyscall 15 30K 94K 166960K 2882 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 6 0 NDP 10 0K 2K 166960K 138 0 temp 37 9106K 9170K 166960K 25157 0 kqueue 3 4K 25K 166960K 70 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 120 0 120 1 0 1 1 0 8 1 rtentry 136 524 0 439 4 0 4 4 0 8 0 unpcb 144 311 0 311 3 0 3 3 0 8 3 syncache 336 9 0 9 1 0 1 1 0 8 1 tcpcb 736 130 0 129 7 0 7 7 0 8 6 arp 96 86 0 74 1 0 1 1 0 8 0 ipq 40 4 0 0 1 0 1 1 0 8 0 ipqe 40 5 0 1 1 0 1 1 0 8 0 inpcb 328 453 0 449 7 0 7 7 0 8 6 ip6q 80 33 0 32 1 0 1 1 0 8 0 ip6af 40 65 0 64 1 0 1 1 0 8 0 nd6 112 127 0 109 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 43 0 35 1 0 1 1 0 8 0 ppxss 1072 4 0 4 1 0 1 1 0 8 1 pppxif 1416 1 0 1 1 0 1 1 0 8 1 pfstscr 40 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 4 0 4 1 0 1 1 0 8 1 pfsrclim 320 1 0 1 1 0 1 1 0 8 1 pfanchor 1288 2 0 2 1 0 1 1 0 8 1 pfstitem 24 4 0 0 1 0 1 1 0 8 0 pfstkey 128 6 0 2 1 0 1 1 0 8 0 pfstate 384 3 0 1 1 0 1 1 0 8 0 pfrule 1360 5 0 5 1 0 1 1 0 8 1 rttmr 136 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 1978 0 1608 32 1 31 32 0 8 5 art_table 40 1981 0 1608 6 0 6 6 0 8 0 art_node 32 523 0 445 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 3 1 0 1 1 0 8 1 semupl 112 5 0 5 1 0 1 1 0 8 1 semapl 72 15 0 3 1 0 1 1 0 8 0 shmpl 112 8 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2100 0 569 96 0 96 96 0 8 0 ffsino 256 2100 0 569 96 0 96 96 0 8 0 nchpl 144 2656 0 805 69 0 69 69 0 8 0 vnodes 216 2769 0 0 154 0 154 154 0 8 0 namei 1024 14060 0 14060 4 0 4 4 0 8 4 pfiaddrpl 120 1 0 1 1 0 1 1 0 8 1 kstatmem 264 109 0 88 2 0 2 2 0 8 0 scxspl 216 10810 0 10810 8 0 8 8 1 8 8 plimitpl 152 98 0 88 1 0 1 1 0 8 0 sigapl 424 1109 0 1080 6 0 6 6 0 8 0 knotepl 120 8167 0 8146 9 0 9 9 0 8 6 kqueuepl 184 82 0 80 1 0 1 1 0 8 0 pipepl 304 243 0 215 3 0 3 3 0 8 0 fdescpl 448 1096 0 1081 5 0 5 5 0 8 2 filepl 120 4851 0 4694 11 0 11 11 0 8 4 lockfpl 104 74 0 74 1 0 1 1 0 8 1 lockfspl 48 34 0 34 1 0 1 1 0 8 1 sessionpl 144 134 0 131 1 0 1 1 0 8 0 pgrppl 48 182 0 171 1 0 1 1 0 8 0 ucredpl 104 543 0 540 1 0 1 1 0 8 0 zombiepl 144 1083 0 1080 1 0 1 1 0 8 0 processpl 1152 1109 0 1080 4 0 4 4 0 8 0 procpl 664 1577 0 1544 6 0 6 6 0 8 1 sockpl 552 897 0 893 7 0 7 7 0 8 6 mcl64k 65536 107 0 106 1 0 1 1 0 8 0 mcl8k 8192 5 0 5 1 0 1 1 0 8 1 mcl4k 4096 2802 0 2738 16 1 15 16 0 8 7 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 844 0 843 4 0 4 4 0 8 3 mextrefs 64 237 0 237 1 0 1 1 0 8 1 mtagpl 96 5 0 5 1 0 1 1 0 8 1 mbufpl 256 9393 0 9257 18 0 18 18 0 8 4 bufpl 272 3948 0 103 257 0 257 257 0 8 0 anonpl 24 149798 0 148577 42 0 42 42 0 187 20 amapchunkpl 152 22362 0 22141 26 0 26 26 0 158 11 amappl16 200 2176 0 2167 14 4 10 14 0 8 8 amappl15 192 5 0 5 1 0 1 1 0 8 1 amappl14 184 824 0 823 1 0 1 1 0 8 0 amappl13 176 219 0 218 1 0 1 1 0 8 0 amappl12 168 1471 0 1458 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 0 1 1 0 8 1 amappl10 152 58 0 58 1 0 1 1 0 8 1 amappl9 144 293 0 293 1 0 1 1 0 8 1 amappl8 136 232 0 231 1 0 1 1 0 8 0 amappl7 128 217 0 215 1 0 1 1 0 8 0 amappl6 120 492 0 490 1 0 1 1 0 8 0 amappl5 112 94 0 93 1 0 1 1 0 8 0 amappl4 104 401 0 399 1 0 1 1 0 8 0 amappl3 96 4157 0 4121 3 0 3 3 0 8 0 amappl2 88 1081 0 1062 2 0 2 2 0 8 0 amappl1 80 15480 0 15379 13 0 13 13 0 8 6 amappl 88 6597 0 6519 5 0 5 5 0 92 1 uvmvnodes 80 100 0 0 3 0 3 3 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 19 0 18 1 0 1 1 0 8 0 aobjpl 72 10 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1096 0 1081 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1096 0 1081 1 0 1 1 0 8 0 vmmpekpl 168 10277 0 10220 3 0 3 3 0 8 0 vmmpepl 168 78981 0 78422 88 0 88 88 0 357 55 vmsppl 368 1095 0 1081 4 0 4 4 0 8 1 rwobjpl 40 24574 0 24192 13 0 13 13 0 8 2 pdppl 4096 2198 0 2162 112 66 46 80 0 8 10 pvpl 32 422551 0 419556 101 0 101 101 0 265 57 pmappl 216 1095 0 1081 3 0 3 3 0 8 1 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 664 0 68 18 0 18 18 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(ffffffff834c8626) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55a60,5,28) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff9006d6f49a8) at rtfree+0x34e sys/net/route.c:646 rt_ifa_dellocal(ffff80000160c600) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452 in_purgeaddr(ffff80000160c600) at in_purgeaddr+0x1c5 sys/netinet/in.c:754 in_ifdetach(ffff800001586800) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff800001586800) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff800001586800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a8076b0) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a807770) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff9007a621898,7,fffff90007ffd000,ffff80002a7a0548) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff9006d62cda8,ffff80002a7a0548) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff9006d62cda8,ffff80002a7a0548) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a7a0548) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a7a0548,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a7a0548,ffff80002a807ad0,ffff80002a807a20) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a807ad0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a807ad0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73acd1bcfa00, 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(ffffffff834c8626) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff800000c55a60,5,28) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff9006d6f49a8) at rtfree+0x34e sys/net/route.c:646 rt_ifa_dellocal(ffff80000160c600) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452 in_purgeaddr(ffff80000160c600) at in_purgeaddr+0x1c5 sys/netinet/in.c:754 in_ifdetach(ffff800001586800) at in_ifdetach+0x7e sys/netinet/in.c:1015 if_detach(ffff800001586800) at if_detach+0x322 sys/net/if.c:1311 tun_clone_destroy(ffff800001586800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80002a8076b0) at if_clone_destroy+0x1d5 sys/net/if.c:1479 tun_dev_close(5d01,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526 spec_close(ffff80002a807770) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff9007a621898,7,fffff90007ffd000,ffff80002a7a0548) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff9006d62cda8,ffff80002a7a0548) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff9006d62cda8,ffff80002a7a0548) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff9006d62cda8,ffff80002a7a0548) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80002a7a0548) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80002a7a0548,43,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80002a7a0548,ffff80002a807ad0,ffff80002a807a20) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80002a807ad0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a807ad0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73acd1bcfa00, count: -21 ddb>