panic: Data modified on freelist: word 4 of object ADDR size 0x84 previous type free (ADDR != ADDR)

3 views
Skip to first unread message

syzbot

unread,
Oct 12, 2019, 4:33:07 PM10/12/19
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: b8f72638 i386: apm(4), esm(4): tsleep(9) -> tsleep_nsec(9)..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1508866f600000
kernel config: https://syzkaller.appspot.com/x/.config?x=26ca0a9c07f16a3a
dashboard link: https://syzkaller.appspot.com/bug?extid=5f43a916780eff0b386f

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+5f43a9...@syzkaller.appspotmail.com

panic: Data modified on freelist: word 4 of object 0xffff800000b22600 size
0x84 previous type free (0x20ab0290 != 0xdead4110)

Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*519064 85788 0 0x2004 0x4000000 0 syz-executor.1
501404 51032 0 0x14000 0x200 1 smr
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
malloc(84,3f,1) at malloc+0xa23 sys/kern/kern_malloc.c:331
sys_execve(ffff800020a5e280,ffff800021b59638,ffff800021b59680) at
sys_execve+0xdf sys/kern/kern_exec.c:286
syscall(ffff800021b59700) at syscall+0x4a4 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800021b59700) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,fffffffffffffed5,0,3,f5373e0a010) at Xsyscall+0x128
end of kernel
end trace frame: 0xf558e8ea530, count: 9
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{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
Data modified on freelist: word 4 of object 0xffff800000b22600 size 0x84
previous type free (0x20ab0290 != 0xdead4110)

ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
malloc(84,3f,1) at malloc+0xa23 sys/kern/kern_malloc.c:331
sys_execve(ffff800020a5e280,ffff800021b59638,ffff800021b59680) at
sys_execve+0xdf sys/kern/kern_exec.c:286
syscall(ffff800021b59700) at syscall+0x4a4 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800021b59700) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,fffffffffffffed5,0,3,f5373e0a010) at Xsyscall+0x128
end of kernel
end trace frame: 0xf558e8ea530, count: -6
ddb{0}> show registers
rdi 0xffffffff812a6277 db_enter+0x17
rsi 0x7606 __ALIGN_SIZE+0x6606
rbp 0xffff800021b58ff0
rbx 0xffff800021b590a0
rdx 0x7607 __ALIGN_SIZE+0x6607
rcx 0xffff800021b66000
rax 0xffff800021b66000
r8 0xffffffff814600ef kprintf+0x16f
r9 0x1
r10 0x25
r11 0x360d54e7dc8721ef
r12 0x3000000008
r13 0xffff800021b59000
r14 0x100
r15 0x1
rip 0xffffffff812a6278 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800021b58fe0
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor.1) pid=519064 stat=onproc
flags process=2004<INEXEC,SINGLEUNWIND> proc=4000000<THREAD>
pri=32, usrpri=79, nice=20
forw=0xffffffffffffffff, list=0xffff800020ab0780,0xffff800020ab02a0
process=0xffff800020adc000 user=0xffff800021b54000,
vmspace=0xfffffd807f00b170
estcpu=36, cpticks=2, pctcpu=0.0
user=0, sys=2, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
85788 506175 73300 0 4 0x82004 syz-executor.1
*85788 519064 73300 0 7 0x4002004 syz-executor.1
85788 15995 73300 0 4 0x4082004 syz-executor.1
85788 476944 73300 0 4 0x4082004 syz-executor.1
85788 45846 73300 0 4 0x4082004 syz-executor.1
86584 512100 0 0 3 0x14200 acct acct
52660 369152 90794 0 2 0x2 syz-executor.0
96293 364456 0 0 3 0x14200 bored sosplice
73300 94858 90794 0 3 0x82 nanosleep syz-executor.1
90794 470574 1831 0 3 0x82 thrsleep syz-fuzzer
90794 98957 1831 0 3 0x4000082 nanosleep syz-fuzzer
90794 33994 1831 0 3 0x4000082 thrsleep syz-fuzzer
90794 8117 1831 0 3 0x4000082 thrsleep syz-fuzzer
90794 140221 1831 0 3 0x4000082 thrsleep syz-fuzzer
90794 252963 1831 0 3 0x4000082 thrsleep syz-fuzzer
90794 131234 1831 0 3 0x4000082 kqread syz-fuzzer
90794 155526 1831 0 3 0x4000082 thrsleep syz-fuzzer
90794 25022 1831 0 3 0x4000082 thrsleep syz-fuzzer
90794 152668 1831 0 3 0x4000082 thrsleep syz-fuzzer
1831 119680 79490 0 3 0x10008a pause ksh
79490 144501 89544 0 3 0x92 select sshd
85911 62 1 0 3 0x100083 ttyin getty
89544 257138 1 0 3 0x80 select sshd
23897 40951 98144 74 3 0x100092 bpf pflogd
98144 178015 1 0 3 0x80 netio pflogd
29168 417905 87266 73 3 0x100090 kqread syslogd
87266 43003 1 0 3 0x100082 netio syslogd
22766 207130 1 77 3 0x100090 poll dhclient
67565 176166 1 0 3 0x80 poll dhclient
23942 460632 0 0 2 0x14200 zerothread
91297 327585 0 0 3 0x14200 aiodoned aiodoned
30311 132438 0 0 3 0x14200 syncer update
13806 117631 0 0 3 0x14200 cleaner cleaner
54192 16379 0 0 3 0x14200 reaper reaper
82488 387076 0 0 3 0x14200 pgdaemon pagedaemon
78753 248129 0 0 3 0x14200 bored crynlk
32497 322523 0 0 3 0x14200 bored crypto
25485 262728 0 0 3 0x40014200 acpi0 acpi0
46510 291943 0 0 3 0x40014200 idle1
81724 401903 0 0 3 0x14200 bored softnet
5339 85060 0 0 3 0x14200 bored systqmp
97004 145912 0 0 3 0x14200 bored systq
63026 314289 0 0 3 0x40014200 bored softclock
9658 399345 0 0 3 0x40014200 idle0
51032 501404 0 0 7 0x14200 smr
1 168787 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
CPU 0:
exclusive mutex
/syzkaller/managers/multicore/kernel/sys/kern/kern_malloc.c:104 r = 0
(0xffffffff8251ebe0)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 mtx_enter_try+0x102
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 malloc+0x23b sys/kern/kern_malloc.c:209
#4 sys_execve+0xdf sys/kern/kern_exec.c:286
#5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#6 Xsyscall+0x128
Process 85788 (syz-executor.1) thread 0xffff800020a5e280 (519064)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8263bf20)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227
#2 mi_switch+0x392 sys/kern/sched_bsd.c:441
#3 sleep_finish+0x113 sys/kern/kern_synch.c:373
#4 tsleep+0x198 sleep_finish_timeout sys/kern/kern_synch.c:397 [inline]
#4 tsleep+0x198 sleep_finish_all sys/kern/kern_synch.c:183 [inline]
#4 tsleep+0x198 sys/kern/kern_synch.c:152
#5 single_thread_set+0x391 single_thread_wait sys/kern/kern_sig.c:2058
[inline]
#5 single_thread_set+0x391 sys/kern/kern_sig.c:2049
#6 sys_execve+0x55 sys/kern/kern_exec.c:269
#7 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#7 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#8 Xsyscall+0x128
exclusive mutex
/syzkaller/managers/multicore/kernel/sys/kern/kern_malloc.c:104 r = 0
(0xffffffff8251ebe0)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 mtx_enter_try+0x102
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 malloc+0x23b sys/kern/kern_malloc.c:209
#4 sys_execve+0xdf sys/kern/kern_exec.c:286
#5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#6 Xsyscall+0x128
Process 51032 (smr) thread 0xffff800020a118b0 (501404)
shared rwlock smr r = 0 (0xffffffff824e99d0)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 smr_thread+0x242 sys/kern/kern_smr.c:119
#2 proc_trampoline+0x1c
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9555 6560K 7587K 78643K 13406 0 0
pcb 13 8K 8K 78643K 170 0 0
rtable 81 8K 8K 78643K 517 0 0
ifaddr 65 14K 14K 78643K 189 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 4K 78643K 1487 0 0
iov 0 0K 16K 78643K 121 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1231 77K 78K 78643K 1978 0 0
UFS quota 1 32K 32K 78643K 1 0 0
UFS mount 5 36K 36K 78643K 5 0 0
shm 2 1K 5K 78643K 4 0 0
VM map 2 1K 1K 78643K 4 0 0
sem 12 0K 1K 78643K 196 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1808 196K 290K 78643K 12765 0 0
file desc 5 13K 25K 78643K 553 0 0
sigio 0 0K 0K 78643K 8 0 0
proc 60 63K 83K 78643K 538 0 0
subproc 32 2K 2K 78643K 51 0 0
NFS srvsock 1 0K 0K 78643K 1 0 0
NFS daemon 1 16K 16K 78643K 1 0 0
ip_moptions 0 0K 0K 78643K 137 0 0
in_multi 13 0K 2K 78643K 89 0 0
ether_multi 1 0K 0K 78643K 9 0 0
mrt 0 0K 0K 78643K 5 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 54 238K 238K 78643K 54 0 0
exec 0 0K 1K 78643K 312 0 0
pfkey data 0 0K 0K 78643K 1 0 0
pagedep 1 8K 8K 78643K 1 0 0
inodedep 1 32K 32K 78643K 1 0 0
newblk 1 0K 0K 78643K 1 0 0
VM swap 7 26K 26K 78643K 7 0 0
UVM amap 119 22K 38K 78643K 2934 0 0
UVM aobj 34 2K 2K 78643K 36 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
ip6_options 0 0K 0K 78643K 124 0 0
NDP 15 0K 0K 78643K 52 0 0
temp 193 3560K 3625K 78643K 20587 0 0
kqueue 0 0K 0K 78643K 4 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg
Idle
arp 64 8 0 6 1 0 1 1 0
8 0
plcache 128 20 0 0 1 0 1 1 0
8 0
rtpcb 80 49 0 47 1 0 1 1 0
8 0
rtentry 112 71 0 45 2 0 2 2 0
8 0
unpcb 120 359 0 339 1 0 1 1 0
8 0
syncache 264 12 0 12 3 2 1 1 0
8 1
tcpqe 32 60 0 60 1 1 0 1 0
8 0
tcpcb 544 363 0 358 3 1 2 2 0
8 1
inpcb 280 864 0 857 5 3 2 2 0
8 1
rttmr 72 2 0 2 2 1 1 1 0
8 1
nd6 48 6 0 6 1 1 0 1 0
8 0
pkpcb 40 6 0 6 2 2 0 1 0
8 0
ppxss 1128 19 0 19 4 3 1 1 0
8 1
pffrag 232 11 0 11 3 3 0 1 0
482 0
pffrnode 88 11 0 11 3 3 0 1 0
8 0
pffrent 40 323 0 323 3 3 0 1 0
8 0
pfosfp 40 846 0 423 5 0 5 5 0
8 0
pfosfpen 112 1428 0 714 21 0 21 21 0
8 0
pfstitem 24 67 0 18 1 0 1 1 0
8 0
pfstkey 112 67 0 18 2 0 2 2 0
8 0
pfstate 328 67 0 18 5 0 5 5 0
8 0
pfrule 1360 21 0 16 2 1 1 2 0
8 0
art_heap8 4096 4 0 2 4 2 2 3 0
8 0
art_heap4 256 292 0 164 14 5 9 14 0
8 0
art_table 32 296 0 166 2 0 2 2 0
8 0
art_node 16 68 0 44 1 0 1 1 0
8 0
sysvmsgpl 40 21 0 15 1 0 1 1 0
8 0
semapl 112 194 0 184 1 0 1 1 0
8 0
shmpl 112 34 0 2 1 0 1 1 0
8 0
dirhash 1024 17 0 0 3 0 3 3 0
8 0
dino1pl 128 2343 0 934 46 0 46 46 0
8 0
ffsino 272 2343 0 934 96 1 95 95 0
8 0
nchpl 144 3438 0 1825 61 0 61 61 0
8 0
uvmvnodes 72 3017 0 0 55 0 55 55 0
8 0
vnodes 208 3017 0 0 159 0 159 159 0
8 0
namei 1024 10584 0 10584 1 0 1 1 0
8 1
percpumem 16 30 0 0 1 0 1 1 0
8 0
vmpool 552 2 0 2 2 1 1 1 0
8 1
scsiplug 64 2 0 2 1 1 0 1 0
8 0
scxspl 192 9780 0 9780 9 8 1 7 0
8 1
plimitpl 152 53 0 45 1 0 1 1 0
8 0
sigapl 432 750 0 735 3 1 2 3 0
8 0
futexpl 56 12697 0 12697 1 0 1 1 0
8 1
knotepl 112 138 0 119 1 0 1 1 0
8 0
kqueuepl 104 188 0 186 1 0 1 1 0
8 0
pipepl 112 534 0 515 4 3 1 2 0
8 0
fdescpl 488 751 0 735 3 0 3 3 0
8 0
filepl 152 6001 0 5888 9 3 6 6 0
8 1
lockfpl 104 180 0 178 1 0 1 1 0
8 0
lockfspl 48 62 0 60 1 0 1 1 0
8 0
sessionpl 112 19 0 8 1 0 1 1 0
8 0
pgrppl 48 21 0 10 1 0 1 1 0
8 0
ucredpl 96 715 0 706 1 0 1 1 0
8 0
zombiepl 144 735 0 735 1 0 1 1 0
8 1
processpl 896 768 0 735 4 0 4 4 0
8 0
procpl 632 2092 0 2046 5 0 5 5 0
8 1
srpgc 64 4 0 4 1 1 0 1 0
8 0
sosppl 128 4 0 4 2 2 0 1 0
8 0
sockpl 384 1300 0 1271 8 4 4 5 0
8 1
mcl64k 65536 8 0 0 1 0 1 1 0
8 0
mcl16k 16384 10 0 0 2 0 2 2 0
8 0
mcl12k 12288 4 0 0 1 0 1 1 0
8 0
mcl9k 9216 6 0 0 1 0 1 1 0
8 0
mcl8k 8192 4 0 0 1 0 1 1 0
8 0
mcl4k 4096 11 0 0 2 0 2 2 0
8 0
mcl2k2 2112 2 0 0 1 0 1 1 0
8 0
mcl2k 2048 161 0 0 20 0 20 20 0
8 0
mtagpl 80 27 0 0 1 0 1 1 0
8 0
mbufpl 256 293 0 0 16 0 16 16 0
8 0
bufpl 256 9657 0 2609 441 0 441 441 0
8 0
anonpl 16 100636 0 81995 90 6 84 89 0
124 7
amapchunkpl 152 4510 0 4348 11 0 11 11 0
158 3
amappl16 192 4327 0 3324 75 21 54 63 0
8 3
amappl15 184 9 0 8 2 1 1 1 0
8 0
amappl14 176 36 0 34 1 0 1 1 0
8 0
amappl13 168 73 0 72 1 0 1 1 0
8 0
amappl12 160 11 0 9 1 0 1 1 0
8 0
amappl11 152 313 0 296 1 0 1 1 0
8 0
amappl10 144 196 0 189 1 0 1 1 0
8 0
amappl9 136 631 0 625 1 0 1 1 0
8 0
amappl8 128 196 0 164 2 0 2 2 0
8 0
amappl7 120 224 0 219 1 0 1 1 0
8 0
amappl6 112 328 0 315 1 0 1 1 0
8 0
amappl5 104 147 0 133 1 0 1 1 0
8 0
amappl4 96 1045 0 1011 2 1 1 2 0
8 0
amappl3 88 131 0 126 1 0 1 1 0
8 0
amappl2 80 5099 0 5028 3 1 2 3 0
8 0
amappl1 72 26360 0 25911 26 16 10 20 0
8 0
amappl 80 2369 0 2318 2 0 2 2 0
84 0
dma4096 4096 1 0 1 1 1 0 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 17 0 17 1 1 0 1 0
8 0
aobjpl 64 35 0 2 1 0 1 1 0
8 0
uaddrrnd 24 753 0 735 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 753 0 735 1 0 1 1 0
8 0
vmmpekpl 168 10423 0 10390 2 0 2 2 0
8 0
vmmpepl 168 100297 0 98124 145 39 106 133 0
357 7
vmsppl 368 750 0 735 2 0 2 2 0
8 0
pdppl 4096 1513 0 1474 6 0 6 6 0
8 0
pvpl 32 285520 0 263656 212 10 202 208 0 265
24
pmappl 232 752 0 737 3 2 1 2 0
8 0
extentpl 40 41 0 26 1 0 1 1 0
8 0
phpool 112 616 0 12 18 0 18 18 0
8 0


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

Anton Lindqvist

unread,
Oct 13, 2019, 10:21:28 AM10/13/19
to syzbot, syzkaller-o...@googlegroups.com
Will likely occur again, next time with a normalized title.

#syz invalid
Reply all
Reply to author
Forward
0 new messages