panic: free: size too large 100 > 16 (0xffff800000c57c40) 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(ffffffff834c06a2) at panic+0x1cf sys/kern/subr_prf.c:198
free(ffff800000c57c40,5,64) at free+0x690 sys/kern/kern_malloc.c:387
rtfree(fffff3800df8b1a0) at rtfree+0x34e sys/net/route.c:646
rt_ifa_dellocal(ffff800001603c00) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452
in_purgeaddr(ffff800001603c00) at in_purgeaddr+0x1c5 sys/netinet/in.c:754
in_ifdetach(ffff8000015f4800) at in_ifdetach+0x7e sys/netinet/in.c:1015
if_detach(ffff8000015f4800) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f4800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a885910) at if_clone_destroy+0x1d5 sys/net/if.c:1479
tun_dev_close(5d06,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a8859d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff3806fb68898,7,fffff38007ffd548,ffff80002a736f98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
end trace frame: 0xffff80002a885af0, 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 (0xffff800000c57c40) 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(ffffffff834c06a2) at panic+0x1cf sys/kern/subr_prf.c:198
free(ffff800000c57c40,5,64) at free+0x690 sys/kern/kern_malloc.c:387
rtfree(fffff3800df8b1a0) at rtfree+0x34e sys/net/route.c:646
rt_ifa_dellocal(ffff800001603c00) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452
in_purgeaddr(ffff800001603c00) at in_purgeaddr+0x1c5 sys/netinet/in.c:754
in_ifdetach(ffff8000015f4800) at in_ifdetach+0x7e sys/netinet/in.c:1015
if_detach(ffff8000015f4800) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f4800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a885910) at if_clone_destroy+0x1d5 sys/net/if.c:1479
tun_dev_close(5d06,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a8859d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff3806fb68898,7,fffff38007ffd548,ffff80002a736f98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffff3807c1e79e8,ffff80002a736f98) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffff3807c1e79e8,ffff80002a736f98) at closef+0x190 sys/kern/kern_descrip.c:1265
fdfree(ffff80002a736f98) at fdfree+0x115 sys/kern/kern_descrip.c:1196
exit1(ffff80002a736f98,1,0,1) at exit1+0x595 sys/kern/kern_exit.c:215
sys_exit(ffff80002a736f98,ffff80002a885d30,ffff80002a885c80) at sys_exit+0x1a sys/kern/kern_exit.c:-1
syscall(ffff80002a885d30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a885d30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7558aa1ebbc0, count: -21
ddb> show registers
rdi 0
rsi 0x1
rbp 0xffff80002a885590
rbx 0x10
rdx 0
rcx 0
rax 0xffff80002a736f98
r8 0x101010101010101
r9 0x8080808080808080
r10 0x5db9692a918d81f8
r11 0x993e4331ea8f93f0
r12 0
r13 0x64
r14 0
r15 0x1
rip 0xffffffff832a51f5 db_enter+0x25
cs 0x8
rflags 0x246
rsp 0xffff80002a885580
ss 0x10
db_enter+0x25: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor) tid=249751 pid=16071 tcnt=0 stat=onproc
flags process=a<EXEC,EXITING> proc=2000<WEXIT>
runpri=32, usrpri=51, slppri=32, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=1
forw=0xffffffffffffffff, list=0xffff80002a737c90,0xffff80002a7362b0
process=0xffff80002a79ed10 user=0xffff80002a880000, vmspace=0xfffff3807c2745c8
estcpu=1, cpticks=2, pctcpu=0.0, user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND
34674 370881 10911 0 4 0x2000 0x80000 syz-executor
34674 204108 10911 0 4 0x2000 0x4080000 syz-executor
34674 407159 10911 0 2 0x2000 0x4080000 syz-executor
34674 250551 10911 0 4 0x2000 0x4080000 syz-executor
34674 98920 10911 0 4 0x2000 0x4080000 syz-executor
34674 192567 10911 0 3 0x2000 0x4000000 suspend syz-executor
4425 82753 18193 0 2 0 0 syz-executor
4425 308381 18193 0 3 0 0x4000080 msgwait syz-executor
4425 266701 18193 0 3 0 0x4000080 msgwait syz-executor
37713 221598 98137 0 3 0x2 0x80 nanoslp syz-executor
10911 777 98137 0 3 0x2 0x80 nanoslp syz-executor
18193 490353 98137 0 3 0x2 0x80 nanoslp syz-executor
98137 319656 29710 0 3 0x2 0x80 wait syz-executor
29710 57181 13642 0 3 0x100002 0x88 sigsusp ksh
13642 149226 4321 0 3 0x10 0x88 kqread sshd-session
4321 438324 56652 0 3 0x12 0x80 kqread sshd-session
45310 503149 1 0 3 0x100003 0x80 ttyin getty
56652 341644 1 0 3 0 0x88 kqread sshd
25984 135380 6273 73 3 0x1100010 0x80 kqread syslogd
6273 476498 1 0 3 0x100002 0x80 sbwait syslogd
77518 460342 1 0 3 0x100000 0x80 kqread resolvd
36004 413035 1612 77 3 0x100012 0x80 kqread dhcpleased
63317 2704 1612 77 3 0x100012 0x80 kqread dhcpleased
1612 36295 1 0 3 0 0x80 kqread dhcpleased
26504 240451 0 0 3 0x14000 0x200 bored smr
58664 217035 0 0 2 0x14000 0x200 zerothread
28462 181284 0 0 3 0x14000 0x200 aiodoned aiodoned
58500 470957 0 0 3 0x14000 0x200 syncer update
37770 265726 0 0 3 0x14000 0x200 cleaner cleaner
61006 461931 0 0 3 0x14000 0x200 reaper reaper
2375 317929 0 0 3 0x14000 0x200 pgdaemon pagedaemon
39844 1153 0 0 3 0x14000 0x200 bored viomb
61868 174312 0 0 3 0x14000 0x40000200 acpi0 acpi0
58881 56825 0 0 3 0x14000 0x200 bored softnet0
75169 317234 0 0 3 0x14000 0x200 smrbar systqmp
47385 236793 0 0 3 0x14000 0x200 bored systq
33704 484378 0 0 3 0x14000 0x40000200 tmoslp softclock
79354 208030 0 0 3 0x14000 0x40000200 idle0
1 23122 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 11024 12100K 12118K 166960K 12115 0
pcb 17 12K 12K 166960K 17 0
rtable 210 5K 6K 166960K 355 0
pf 28 12K 12K 166960K 30 0
ifaddr 38 6K 7K 166960K 44 0
ifgroup 46 2K 2K 166960K 50 0
sysctl 2 1K 9K 166960K 6 0
counters 32 17K 17K 166960K 33 0
ioctlops 0 0K 4K 166960K 36 0
iov 0 0K 0K 166960K 1 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1291 81K 81K 166960K 1363 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 1K 166960K 2 0
VM map 2 1K 1K 166960K 2 0
sem 2 0K 0K 166960K 2 0
dirhash 12 2K 2K 166960K 12 0
ACPI 1734 201K 291K 166960K 11964 0
file desc 12 41K 89K 166960K 147 0
proc 59 59K 83K 166960K 503 0
subproc 63 3K 4K 166960K 72 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
in_multi 88 6K 6K 166960K 99 0
ether_multi 1 0K 0K 166960K 1 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 43 201K 201K 166960K 43 0
exec 0 0K 1K 166960K 370 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 185 141K 157K 166960K 3012 0
UVM aobj 4 2K 2K 166960K 4 0
pinsyscall 33 66K 91K 166960K 1259 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
NDP 12 0K 1K 166960K 27 0
temp 33 9106K 9113K 166960K 4674 0
kqueue 13 20K 22K 166960K 30 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 39 0 36 1 0 1 1 0 8 0
rtentry 136 111 0 14 4 0 4 4 0 8 0
unpcb 144 42 0 27 1 0 1 1 0 8 0
syncache 336 4 0 4 1 0 1 1 0 8 1
tcpcb 736 12 0 8 1 0 1 1 0 8 0
arp 96 18 0 2 1 0 1 1 0 8 0
ipq 40 1 0 0 1 0 1 1 0 8 0
ipqe 40 65 0 64 1 0 1 1 0 8 0
inpcb 328 66 0 59 1 0 1 1 0 8 0
nd6 112 24 0 3 1 0 1 1 0 8 0
pkpcb 40 1 0 1 1 0 1 1 0 8 1
kcovpl 48 8 0 1 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 452 0 44 29 0 29 29 0 8 1
art_table 40 453 0 44 5 0 5 5 0 8 0
art_node 32 111 0 20 1 0 1 1 0 8 0
sysvmsgpl 40 2 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 1573 0 113 92 0 92 92 0 8 0
ffsino 256 1578 0 118 92 0 92 92 0 8 0
nchpl 144 1794 0 97 64 0 64 64 0 8 0
vnodes 216 1664 0 0 93 0 93 93 0 8 0
namei 1024 5362 0 5362 1 0 1 1 0 8 1
kstatmem 264 23 0 2 2 0 2 2 0 8 0
scxspl 216 5994 0 5994 3 0 3 3 1 8 3
plimitpl 152 32 0 15 1 0 1 1 0 8 0
sigapl 424 445 0 407 6 0 6 6 0 8 1
knotepl 120 2059 0 2014 2 0 2 2 0 8 0
kqueuepl 184 26 0 16 1 0 1 1 0 8 0
pipepl 304 127 0 100 3 0 3 3 0 8 0
fdescpl 448 432 0 408 5 0 5 5 0 8 1
filepl 120 1525 0 1330 7 0 7 7 0 8 0
lockfpl 104 13 0 10 1 0 1 1 0 8 0
lockfspl 48 7 0 4 1 0 1 1 0 8 0
sessionpl 144 23 0 15 1 0 1 1 0 8 0
pgrppl 48 32 0 16 1 0 1 1 0 8 0
ucredpl 104 107 0 96 1 0 1 1 0 8 0
zombiepl 144 413 0 407 1 0 1 1 0 8 0
processpl 1152 445 0 407 4 0 4 4 0 8 0
procpl 664 469 0 424 5 0 5 5 0 8 0
sockpl 552 148 0 123 3 0 3 3 0 8 1
mcl8k 8192 5 0 5 1 0 1 1 0 8 1
mcl4k 4096 2525 0 2472 14 0 14 14 0 8 6
mcl2k 2048 211 0 209 1 0 1 1 0 8 0
mextrefs 64 38 0 38 1 0 1 1 0 8 1
mtagpl 96 4 0 4 1 0 1 1 0 8 1
mbufpl 256 4384 0 4293 9 0 9 9 0 8 1
bufpl 272 2275 0 102 145 0 145 145 0 8 0
anonpl 24 79263 0 76519 20 0 20 20 0 187 2
amapchunkpl 152 7903 0 7542 17 0 17 17 0 158 0
amappl16 200 1116 0 1101 4 0 4 4 0 8 3
amappl15 192 5 0 5 1 0 1 1 0 8 1
amappl14 184 440 0 439 1 0 1 1 0 8 0
amappl13 176 116 0 106 1 0 1 1 0 8 0
amappl12 168 676 0 652 2 0 2 2 0 8 0
amappl11 160 4 0 4 1 0 1 1 0 8 1
amappl10 152 56 0 46 1 0 1 1 0 8 0
amappl9 144 271 0 271 1 0 1 1 0 8 1
amappl8 136 101 0 100 1 0 1 1 0 8 0
amappl7 128 158 0 147 1 0 1 1 0 8 0
amappl6 120 146 0 144 1 0 1 1 0 8 0
amappl5 112 94 0 86 1 0 1 1 0 8 0
amappl4 104 266 0 249 1 0 1 1 0 8 0
amappl3 96 1469 0 1387 3 0 3 3 0 8 0
amappl2 88 528 0 474 2 0 2 2 0 8 0
amappl1 80 10154 0 9633 13 0 13 13 0 8 1
amappl 88 2309 0 2184 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 432 0 408 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 432 0 408 1 0 1 1 0 8 0
vmmpekpl 168 5534 0 5502 2 0 2 2 0 8 0
vmmpepl 168 36551 0 35043 76 0 76 76 0 357 1
vmsppl 368 431 0 408 4 0 4 4 0 8 1
rwobjpl 40 13560 0 12683 10 0 10 10 0 8 0
pdppl 4096 870 0 816 92 30 62 78 0 8 8
pvpl 32 201328 0 194198 65 0 65 65 0 265 0
pmappl 216 431 0 408 2 0 2 2 0 8 0
extentpl 40 46 0 28 1 0 1 1 0 8 0
phpool 112 494 0 30 14 0 14 14 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(ffffffff834c06a2) at panic+0x1cf sys/kern/subr_prf.c:198
free(ffff800000c57c40,5,64) at free+0x690 sys/kern/kern_malloc.c:387
rtfree(fffff3800df8b1a0) at rtfree+0x34e sys/net/route.c:646
rt_ifa_dellocal(ffff800001603c00) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452
in_purgeaddr(ffff800001603c00) at in_purgeaddr+0x1c5 sys/netinet/in.c:754
in_ifdetach(ffff8000015f4800) at in_ifdetach+0x7e sys/netinet/in.c:1015
if_detach(ffff8000015f4800) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f4800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a885910) at if_clone_destroy+0x1d5 sys/net/if.c:1479
tun_dev_close(5d06,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a8859d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff3806fb68898,7,fffff38007ffd548,ffff80002a736f98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffff3807c1e79e8,ffff80002a736f98) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffff3807c1e79e8,ffff80002a736f98) at closef+0x190 sys/kern/kern_descrip.c:1265
fdfree(ffff80002a736f98) at fdfree+0x115 sys/kern/kern_descrip.c:1196
exit1(ffff80002a736f98,1,0,1) at exit1+0x595 sys/kern/kern_exit.c:215
sys_exit(ffff80002a736f98,ffff80002a885d30,ffff80002a885c80) at sys_exit+0x1a sys/kern/kern_exit.c:-1
syscall(ffff80002a885d30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a885d30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7558aa1ebbc0, 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(ffffffff834c06a2) at panic+0x1cf sys/kern/subr_prf.c:198
free(ffff800000c57c40,5,64) at free+0x690 sys/kern/kern_malloc.c:387
rtfree(fffff3800df8b1a0) at rtfree+0x34e sys/net/route.c:646
rt_ifa_dellocal(ffff800001603c00) at rt_ifa_dellocal+0x1ea sys/net/route.c:1452
in_purgeaddr(ffff800001603c00) at in_purgeaddr+0x1c5 sys/netinet/in.c:754
in_ifdetach(ffff8000015f4800) at in_ifdetach+0x7e sys/netinet/in.c:1015
if_detach(ffff8000015f4800) at if_detach+0x322 sys/net/if.c:1311
tun_clone_destroy(ffff8000015f4800) at tun_clone_destroy+0x2a2 sys/net/if_tun.c:343
if_clone_destroy(ffff80002a885910) at if_clone_destroy+0x1d5 sys/net/if.c:1479
tun_dev_close(5d06,7) at tun_dev_close+0x1d9 sys/net/if_tun.c:526
spec_close(ffff80002a8859d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffff3806fb68898,7,fffff38007ffd548,ffff80002a736f98) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffff3807c1e79e8,ffff80002a736f98) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffff3807c1e79e8,ffff80002a736f98) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffff3807c1e79e8,ffff80002a736f98) at closef+0x190 sys/kern/kern_descrip.c:1265
fdfree(ffff80002a736f98) at fdfree+0x115 sys/kern/kern_descrip.c:1196
exit1(ffff80002a736f98,1,0,1) at exit1+0x595 sys/kern/kern_exit.c:215
sys_exit(ffff80002a736f98,ffff80002a885d30,ffff80002a885c80) at sys_exit+0x1a sys/kern/kern_exit.c:-1
syscall(ffff80002a885d30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a885d30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7558aa1ebbc0, count: -21