panic: free: size too small 8 <= 32 / 2 (0xffff80000159cce0) type rtable Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *123140 77648 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83508ceb) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff80000159cce0,5,8) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff700610415e8) at rtfree+0x32e sys/net/route.c:641 rt_ifa_purge(ffff80000159fa00) at rt_ifa_purge+0x1a0 sys/net/route.c:1481 in6_unlink_ifa(ffff80000159fa00,ffff8000015e3800) at in6_unlink_ifa+0x83f sys/netinet6/in6.c:938 in6_ifdetach(ffff8000015e3800) at in6_ifdetach+0x9e sys/netinet6/in6_ifattach.c:416 if_detach(ffff8000015e3800) at if_detach+0x333 sys/net/if.c:1314 tun_clone_destroy(ffff8000015e3800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80003c8e1b40) at if_clone_destroy+0x1d5 sys/net/if.c:1479 sys_ioctl(ffff80003c8f1ca8,ffff80003c8e1d10,ffff80003c8e1c60) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c8e1d10) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8e1d10) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcca9b095480, count: 2 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 small 8 <= 32 / 2 (0xffff80000159cce0) 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(ffffffff83508ceb) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff80000159cce0,5,8) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff700610415e8) at rtfree+0x32e sys/net/route.c:641 rt_ifa_purge(ffff80000159fa00) at rt_ifa_purge+0x1a0 sys/net/route.c:1481 in6_unlink_ifa(ffff80000159fa00,ffff8000015e3800) at in6_unlink_ifa+0x83f sys/netinet6/in6.c:938 in6_ifdetach(ffff8000015e3800) at in6_ifdetach+0x9e sys/netinet6/in6_ifattach.c:416 if_detach(ffff8000015e3800) at if_detach+0x333 sys/net/if.c:1314 tun_clone_destroy(ffff8000015e3800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80003c8e1b40) at if_clone_destroy+0x1d5 sys/net/if.c:1479 sys_ioctl(ffff80003c8f1ca8,ffff80003c8e1d10,ffff80003c8e1c60) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c8e1d10) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8e1d10) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcca9b095480, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c8e1780 rbx 0x20 rdx 0xffff8000015ee9c0 rcx 0 rax 0xffff80003c8f1ca8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xbf11686c9b0111e2 r11 0x1e27017d63da5fed r12 0 r13 0x8 r14 0 r15 0x1 rip 0xffffffff81125285 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c8e1770 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=123140 pid=77648 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=75, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c8f02b8,0xffff80003c8f0030 process=0xffff80003a8c84a0 user=0xffff80003c8dc000, vmspace=0xfffff700706cf458 estcpu=25, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 16371 53485 24357 0 2 0x40 0 syz-executor 8175 157075 7964 0 2 0 0 syz-executor 69368 318692 49096 0 2 0 0 syz-executor 50898 291298 90129 0 2 0 0 syz-executor 50898 303919 90129 0 3 0 0x4000080 fifor syz-executor 50898 325002 90129 0 3 0 0x4000080 fsleep syz-executor 43646 456728 61836 0 2 0x10 0 syz-executor 43646 305758 61836 0 2 0x10 0x4000000 syz-executor 43646 331127 61836 0 2 0x10 0x4000000 syz-executor 77648 391865 49049 0 2 0 0xc80 syz-executor *77648 123140 49049 0 7 0 0x4000000 syz-executor 24357 221048 44053 0 3 0x82 0 ppwait syz-executor 61836 357398 44053 0 2 0x2 0xc80 syz-executor 22938 217219 0 0 3 0x14000 0x200 acct acct 24505 129763 44053 0 2 0x2 0 syz-executor 71170 450284 44053 0 2 0x2 0 syz-executor 49049 474219 44053 0 2 0x2 0xc80 syz-executor 7964 135755 44053 0 2 0x2 0xc80 syz-executor 90129 49794 44053 0 2 0x2 0xc80 syz-executor 49096 421286 44053 0 2 0x2 0xc80 syz-executor 44053 311291 13984 0 3 0x2 0x80 kqread syz-executor 13984 36759 96938 0 3 0x100002 0x88 sigsusp ksh 96938 210641 87255 0 3 0x10 0x88 kqread sshd-session 87255 85495 13505 0 3 0x12 0x80 kqread sshd-session 47853 474581 1 0 3 0x100003 0x80 ttyin getty 13505 208519 1 0 3 0 0x88 kqread sshd 22362 475882 18869 73 3 0x1100010 0x80 kqread syslogd 18869 261870 1 0 3 0x100002 0x80 sbwait syslogd 45901 141150 1 0 3 0x100000 0x80 kqread resolvd 44585 42210 56389 77 3 0x100012 0x80 kqread dhcpleased 35790 305374 56389 77 3 0x100012 0x80 kqread dhcpleased 56389 6301 1 0 3 0 0x80 kqread dhcpleased 40336 448249 0 0 3 0x14000 0x200 bored smr 64276 242736 0 0 2 0x14000 0x200 zerothread 97386 124734 0 0 3 0x14000 0x200 aiodoned aiodoned 14457 116310 0 0 3 0x14000 0x200 syncer update 93174 234941 0 0 3 0x14000 0x200 cleaner cleaner 43755 486371 0 0 3 0x14000 0x200 reaper reaper 78521 58034 0 0 3 0x14000 0x200 pgdaemon pagedaemon 98267 27734 0 0 3 0x14000 0x200 bored viomb 23 347802 0 0 3 0x14000 0x40000200 acpi0 acpi0 44871 291957 0 0 3 0x14000 0x200 bored softnet0 85872 217298 0 0 2 0x14000 0x200 systqmp 1018 107235 0 0 3 0x14000 0x200 bored systq 41703 308837 0 0 2 0x14000 0x40000200 softclock 66458 279086 0 0 3 0x14000 0x40000200 idle0 1 252058 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 11037 12234K 12243K 166960K 12232 0 pcb 18 13K 13K 166960K 44 0 rtable 185 5K 6K 166960K 607 0 pf 30 13K 17K 166960K 55 0 ifaddr 35 6K 7K 166960K 80 0 ifgroup 46 2K 2K 166960K 91 0 sysctl 2 1K 9K 166960K 7 0 counters 32 17K 17K 166960K 43 0 ioctlops 0 0K 4K 166960K 59 0 iov 0 0K 4K 166960K 4 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1295 81K 82K 166960K 1520 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 10 0K 1K 166960K 11 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 97K 166960K 362 0 proc 60 59K 124K 166960K 744 0 subproc 72 4K 4K 166960K 153 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 17 0 in_multi 72 4K 6K 166960K 189 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 5 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 478 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 188 142K 155K 166960K 4538 0 UVM aobj 5 2K 4K 166960K 6 0 pinsyscall 37 74K 96K 166960K 1681 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 2K 166960K 53 0 temp 35 9114K 9134K 166960K 7562 0 kqueue 13 20K 26K 166960K 46 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 52 0 49 1 0 1 1 0 8 0 rtentry 136 206 0 122 4 0 4 4 0 8 0 unpcb 144 99 0 80 1 0 1 1 0 8 0 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 46 0 40 2 0 2 2 0 8 1 arp 96 36 0 23 1 0 1 1 0 8 0 ipq 40 2 0 1 1 0 1 1 0 8 0 ipqe 40 4 0 3 1 0 1 1 0 8 0 inpcb 328 271 0 259 4 0 4 4 0 8 2 nd6 112 51 0 33 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 17 0 9 1 0 1 1 0 8 0 pfstscr 40 6 0 4 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 6 0 4 1 0 1 1 0 8 0 pfstate 384 3 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 836 0 447 30 0 30 30 0 8 2 art_table 40 837 0 447 5 0 5 5 0 8 0 art_node 32 206 0 124 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 72 8 0 0 1 0 1 1 0 8 0 shmpl 120 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1748 0 269 93 0 93 93 0 8 0 ffsino 256 1748 0 269 93 0 93 93 0 8 0 nchpl 144 2075 0 357 64 0 64 64 0 8 0 vnodes 216 1959 0 0 109 0 109 109 0 8 0 namei 1024 8039 0 8038 2 0 2 2 0 8 1 vcpupl 3968 16 0 16 2 0 2 2 0 8 2 vmpool 808 1 0 1 1 0 1 1 0 8 1 kstatmem 264 43 0 22 2 0 2 2 0 8 0 scxspl 216 6858 0 6858 3 0 3 3 1 8 3 plimitpl 152 65 0 47 1 0 1 1 0 8 0 sigapl 424 641 0 599 6 0 6 6 0 8 0 knotepl 120 6052 0 6005 9 0 9 9 0 8 5 kqueuepl 184 257 0 247 4 0 4 4 0 8 3 pipepl 304 158 0 131 3 0 3 3 0 8 0 fdescpl 448 627 0 599 5 0 5 5 0 8 1 filepl 120 2679 0 2459 10 0 10 10 0 8 2 lockfpl 104 48 0 46 1 0 1 1 0 8 0 lockfspl 48 21 0 19 1 0 1 1 0 8 0 sessionpl 144 32 0 24 1 0 1 1 0 8 0 pgrppl 48 49 0 33 1 0 1 1 0 8 0 ucredpl 104 262 0 250 1 0 1 1 0 8 0 zombiepl 144 599 0 599 1 0 1 1 0 8 1 processpl 1160 641 0 599 4 0 4 4 0 8 0 procpl 664 823 0 776 6 0 6 6 0 8 1 sockpl 552 424 0 390 5 0 5 5 0 8 2 mcl64k 65536 11 0 11 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl9k128 9344 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 7 0 7 1 0 1 1 0 8 1 mcl4k 4096 2676 0 2625 14 0 14 14 0 8 7 mcl2k 2048 382 0 380 1 0 1 1 0 8 0 mextrefs 64 122 0 121 1 0 1 1 0 8 0 mtagpl 96 5 0 5 1 0 1 1 0 8 1 mbufpl 256 5996 0 5862 11 0 11 11 0 8 1 bufpl 272 2480 0 102 159 0 159 159 0 8 0 anonpl 24 99867 0 96997 45 0 45 45 0 187 15 amapchunkpl 152 12646 0 12274 30 0 30 30 0 158 11 amappl16 200 1297 0 1281 14 3 11 14 0 8 8 amappl15 192 7 0 7 1 0 1 1 0 8 1 amappl14 184 509 0 508 1 0 1 1 0 8 0 amappl13 176 129 0 119 1 0 1 1 0 8 0 amappl12 168 892 0 867 2 0 2 2 0 8 0 amappl11 160 10 0 9 1 0 1 1 0 8 0 amappl10 152 71 0 61 1 0 1 1 0 8 0 amappl9 144 269 0 269 1 0 1 1 0 8 1 amappl8 136 128 0 126 1 0 1 1 0 8 0 amappl7 128 155 0 144 1 0 1 1 0 8 0 amappl6 120 268 0 267 1 0 1 1 0 8 0 amappl5 112 94 0 87 1 0 1 1 0 8 0 amappl4 104 295 0 277 1 0 1 1 0 8 0 amappl3 96 2258 0 2186 3 0 3 3 0 8 0 amappl2 88 721 0 651 2 0 2 2 0 8 0 amappl1 80 11585 0 11043 14 0 14 14 0 8 2 amappl 88 3689 0 3563 5 0 5 5 0 92 1 uvmvnodes 80 98 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 5 0 1 1 0 1 1 0 8 0 uaddrrnd 24 627 0 599 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 627 0 599 1 0 1 1 0 8 0 vmmpekpl 168 6933 0 6887 3 0 3 3 0 8 0 vmmpepl 168 48650 0 46986 91 0 91 91 0 357 12 vmsppl 368 626 0 599 4 0 4 4 0 8 1 rwobjpl 40 16436 0 15537 13 0 13 13 0 8 1 pdppl 4096 1262 0 1200 116 46 70 82 0 8 8 pvpl 32 271793 0 264102 112 0 112 112 0 265 25 pmappl 216 627 0 600 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 542 0 46 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(ffffffff83508ceb) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff80000159cce0,5,8) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff700610415e8) at rtfree+0x32e sys/net/route.c:641 rt_ifa_purge(ffff80000159fa00) at rt_ifa_purge+0x1a0 sys/net/route.c:1481 in6_unlink_ifa(ffff80000159fa00,ffff8000015e3800) at in6_unlink_ifa+0x83f sys/netinet6/in6.c:938 in6_ifdetach(ffff8000015e3800) at in6_ifdetach+0x9e sys/netinet6/in6_ifattach.c:416 if_detach(ffff8000015e3800) at if_detach+0x333 sys/net/if.c:1314 tun_clone_destroy(ffff8000015e3800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80003c8e1b40) at if_clone_destroy+0x1d5 sys/net/if.c:1479 sys_ioctl(ffff80003c8f1ca8,ffff80003c8e1d10,ffff80003c8e1c60) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c8e1d10) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8e1d10) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcca9b095480, count: -13 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83508ceb) at panic+0x1cf sys/kern/subr_prf.c:198 free(ffff80000159cce0,5,8) at free+0x690 sys/kern/kern_malloc.c:387 rtfree(fffff700610415e8) at rtfree+0x32e sys/net/route.c:641 rt_ifa_purge(ffff80000159fa00) at rt_ifa_purge+0x1a0 sys/net/route.c:1481 in6_unlink_ifa(ffff80000159fa00,ffff8000015e3800) at in6_unlink_ifa+0x83f sys/netinet6/in6.c:938 in6_ifdetach(ffff8000015e3800) at in6_ifdetach+0x9e sys/netinet6/in6_ifattach.c:416 if_detach(ffff8000015e3800) at if_detach+0x333 sys/net/if.c:1314 tun_clone_destroy(ffff8000015e3800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343 if_clone_destroy(ffff80003c8e1b40) at if_clone_destroy+0x1d5 sys/net/if.c:1479 sys_ioctl(ffff80003c8f1ca8,ffff80003c8e1d10,ffff80003c8e1c60) at sys_ioctl+0x660 sys/kern/sys_generic.c:-1 syscall(ffff80003c8e1d10) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c8e1d10) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcca9b095480, count: -13