malloc: free list modified: free

4 views
Skip to first unread message

syzbot

unread,
Oct 19, 2019, 5:26:08 PM10/19/19
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: b1a12106 Don't check that the ipv6 source address of a nei..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=14bfb3cf600000
kernel config: https://syzkaller.appspot.com/x/.config?x=26ca0a9c07f16a3a
dashboard link: https://syzkaller.appspot.com/bug?extid=d25845d43b459ea307aa

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+d25845...@syzkaller.appspotmail.com

panic: Data modified on freelist: word 4 of object 0xffff800000b95100 size
0xc0 previous type free (0xdeafbe00 != 0xdeafbead)

Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
410391 2061 0 0 0 0 syz-executor.1
*255579 2061 0 0 0x4000000 1K syz-executor.1
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(c0,5,9) at malloc+0xa23 sys/kern/kern_malloc.c:331
rtm_report(fffffd806f537000,4,35d33fc7,0) at rtm_report+0x2d9
sys/net/rtsock.c:654
route_output(fffffd807de7d000,fffffd80719a0c58,0,0) at route_output+0x6b9
sys/net/rtsock.c:824
route_usrreq(fffffd80719a0c58,9,fffffd807de7d000,0,0,ffff800020aceef0) at
route_usrreq+0x363 sys/net/rtsock.c:275
sosend(fffffd80719a0c58,0,ffff800023b89010,0,0,0) at sosend+0x645
sys/kern/uipc_socket.c:524
sendit(ffff800020aceef0,5,ffff800023b890f0,0,ffff800023b891d0) at
sendit+0x52b sys/kern/uipc_syscalls.c:662
sys_sendto(ffff800020aceef0,ffff800023b89188,ffff800023b891d0) at
sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
syscall(ffff800023b89250) at syscall+0x4a4 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800023b89250) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,ffffffffffffffd8,0,6,9bbd1766010) at Xsyscall+0x128
end of kernel
end trace frame: 0x9bde8b6da80, count: 4
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{1}>
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
Data modified on freelist: word 4 of object 0xffff800000b95100 size 0xc0
previous type free (0xdeafbe00 != 0xdeafbead)

ddb{1}> 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(c0,5,9) at malloc+0xa23 sys/kern/kern_malloc.c:331
rtm_report(fffffd806f537000,4,35d33fc7,0) at rtm_report+0x2d9
sys/net/rtsock.c:654
route_output(fffffd807de7d000,fffffd80719a0c58,0,0) at route_output+0x6b9
sys/net/rtsock.c:824
route_usrreq(fffffd80719a0c58,9,fffffd807de7d000,0,0,ffff800020aceef0) at
route_usrreq+0x363 sys/net/rtsock.c:275
sosend(fffffd80719a0c58,0,ffff800023b89010,0,0,0) at sosend+0x645
sys/kern/uipc_socket.c:524
sendit(ffff800020aceef0,5,ffff800023b890f0,0,ffff800023b891d0) at
sendit+0x52b sys/kern/uipc_syscalls.c:662
sys_sendto(ffff800020aceef0,ffff800023b89188,ffff800023b891d0) at
sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
syscall(ffff800023b89250) at syscall+0x4a4 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800023b89250) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,ffffffffffffffd8,0,6,9bbd1766010) at Xsyscall+0x128
end of kernel
end trace frame: 0x9bde8b6da80, count: -11
ddb{1}> show registers
rdi 0xffffffff820cd6c7 db_enter+0x17
rsi 0x77a3 __ALIGN_SIZE+0x67a3
rbp 0xffff800023b88a50
rbx 0xffff800023b88b00
rdx 0x77a4 __ALIGN_SIZE+0x67a4
rcx 0xffff800020d5e000
rax 0xffff800020d5e000
r8 0xffffffff814de02f kprintf+0x16f
r9 0x1
r10 0x25
r11 0x1b529f9b86730333
r12 0x3000000008
r13 0xffff800023b88a60
r14 0x100
r15 0x1
rip 0xffffffff820cd6c8 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800023b88a40
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.1) pid=255579 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=86, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff800020acea00,0xffffffff82642078
process=0xffff800020add180 user=0xffff800023b84000,
vmspace=0xfffffd807f00a730
estcpu=36, cpticks=3, pctcpu=0.0
user=0, sys=3, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
2061 410391 55175 0 7 0 syz-executor.1
* 2061 255579 55175 0 7 0x4000000 syz-executor.1
55175 391911 61246 0 3 0x82 nanosleep syz-executor.1
50413 483187 1 0 3 0x100083 ttyin getty
1832 285097 61246 0 3 0x82 nanosleep syz-executor.0
68104 366307 0 0 3 0x14200 acct acct
83606 5289 0 0 3 0x14200 bored sosplice
61246 39127 18192 0 3 0x82 thrsleep syz-fuzzer
61246 189552 18192 0 3 0x4000082 nanosleep syz-fuzzer
61246 149346 18192 0 3 0x4000082 thrsleep syz-fuzzer
61246 84160 18192 0 3 0x4000082 thrsleep syz-fuzzer
61246 192363 18192 0 3 0x4000082 thrsleep syz-fuzzer
61246 424304 18192 0 3 0x4000082 kqread syz-fuzzer
61246 357164 18192 0 3 0x4000082 nanosleep syz-fuzzer
61246 399612 18192 0 3 0x4000082 thrsleep syz-fuzzer
61246 470313 18192 0 3 0x4000082 thrsleep syz-fuzzer
61246 328931 18192 0 3 0x4000082 thrsleep syz-fuzzer
18192 164461 30051 0 3 0x10008a pause ksh
30051 226659 67041 0 3 0x92 select sshd
67041 429075 1 0 3 0x80 select sshd
54266 429953 12464 74 3 0x100092 bpf pflogd
12464 390036 1 0 3 0x80 netio pflogd
80171 201773 59324 73 3 0x100090 kqread syslogd
59324 300209 1 0 3 0x100082 netio syslogd
67398 446962 1 77 3 0x100090 poll dhclient
65137 457055 1 0 3 0x80 poll dhclient
99878 435862 0 0 3 0x14200 pgzero zerothread
99410 386487 0 0 3 0x14200 aiodoned aiodoned
79835 494477 0 0 3 0x14200 syncer update
48666 517603 0 0 3 0x14200 cleaner cleaner
50389 486461 0 0 3 0x14200 reaper reaper
25071 44035 0 0 3 0x14200 pgdaemon pagedaemon
28164 32804 0 0 3 0x14200 bored crynlk
52875 450869 0 0 3 0x14200 bored crypto
13516 185176 0 0 3 0x40014200 acpi0 acpi0
42017 477246 0 0 3 0x40014200 idle1
5692 276527 0 0 3 0x14200 bored softnet
30199 202797 0 0 3 0x14200 bored systqmp
89472 220424 0 0 3 0x14200 bored systq
73616 413006 0 0 3 0x40014200 bored softclock
42664 239210 0 0 3 0x40014200 idle0
40680 360677 0 0 3 0x14200 bored smr
1 189979 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
CPU 1:
exclusive mutex
/syzkaller/managers/multicore/kernel/sys/kern/kern_malloc.c:104 r = 0
(0xffffffff825049d0)
#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 rtm_report+0x2d9 sys/net/rtsock.c:654
#5 route_output+0x6b9 sys/net/rtsock.c:824
#6 route_usrreq+0x363 sys/net/rtsock.c:275
#7 sosend+0x645 sys/kern/uipc_socket.c:524
#8 sendit+0x52b sys/kern/uipc_syscalls.c:662
#9 sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
#10 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#10 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#11 Xsyscall+0x128
Process 2061 (syz-executor.1) thread 0xffff800020aceef0 (255579)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82622388)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 solock+0x66 sys/kern/uipc_socket2.c:292
#2 sosend+0x51b sys/kern/uipc_socket.c:512
#3 sendit+0x52b sys/kern/uipc_syscalls.c:662
#4 sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
#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
exclusive mutex
/syzkaller/managers/multicore/kernel/sys/kern/kern_malloc.c:104 r = 0
(0xffffffff825049d0)
#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 rtm_report+0x2d9 sys/net/rtsock.c:654
#5 route_output+0x6b9 sys/net/rtsock.c:824
#6 route_usrreq+0x363 sys/net/rtsock.c:275
#7 sosend+0x645 sys/kern/uipc_socket.c:524
#8 sendit+0x52b sys/kern/uipc_syscalls.c:662
#9 sys_sendto+0x80 sys/kern/uipc_syscalls.c:527
#10 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#10 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#11 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9628 6475K 8895K 78643K 52377 0 0
pcb 13 10K 12K 78643K 2270 0 0
rtable 128 14K 16K 78643K 11038 0 0
ifaddr 107 27K 29K 78643K 1898 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 4K 78643K 1994 0 0
iov 0 0K 32K 78643K 2267 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1222 77K 78K 78643K 14201 0 0
UFS quota 1 32K 32K 78643K 1 0 0
UFS mount 5 36K 36K 78643K 5 0 0
shm 2 1K 9K 78643K 163 0 0
VM map 80 40K 40K 78643K 114 0 0
sem 12 0K 1K 78643K 1988 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1808 196K 290K 78643K 12765 0 0
file desc 5 13K 25K 78643K 9635 0 0
sigio 0 0K 0K 78643K 101 0 0
proc 62 63K 95K 78643K 4103 0 0
subproc 32 2K 2K 78643K 1216 0 0
NFS srvsock 1 0K 0K 78643K 1 0 0
NFS daemon 1 16K 16K 78643K 1 0 0
ip_moptions 2 0K 1K 78643K 6047 0 0
in_multi 38 2K 3K 78643K 2349 0 0
ether_multi 1 0K 0K 78643K 120 0 0
mrt 1 0K 0K 78643K 61 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 102 450K 450K 78643K 102 0 0
exec 0 0K 1K 78643K 2109 0 0
pfkey data 0 0K 4K 78643K 8 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 261 725K 735K 78643K 35340 0 0
UVM aobj 130 4K 4K 78643K 142 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
ip6_options 0 0K 1K 78643K 2317 0 0
NDP 25 0K 1K 78643K 604 0 0
temp 264 3561K 4201K 78643K 341669 0 0
kqueue 0 0K 0K 78643K 76 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg
Idle
arp 64 215 0 208 1 0 1 1 0
8 0
plcache 128 20 0 0 1 0 1 1 0
8 0
rtpcb 80 4241 0 4238 1 0 1 1 0
8 0
rtentry 112 1139 0 1094 2 0 2 2 0
8 0
unpcb 120 6326 0 6311 3 2 1 2 0
8 0
syncache 264 43 0 43 17 17 0 1 0
8 0
sackhl 24 1 0 1 1 1 0 1 0
8 0
tcpqe 32 21 0 21 9 9 0 1 0
8 0
tcpcb 544 4772 0 4766 24 22 2 13 0
8 1
inpcb 280 19774 0 19761 19 17 2 9 0
8 1
rttmr 72 16 0 16 2 2 0 1 0
8 0
ip6q 72 9 0 9 7 7 0 1 0
8 0
ip6af 40 19 0 19 5 5 0 1 0
8 0
nd6 48 169 0 166 6 5 1 1 0
8 0
pkpcb 40 100 0 100 21 20 1 1 0
8 1
swfcl 56 10 0 0 1 0 1 1 0
8 0
ppxss 1128 259 0 259 22 21 1 1 0
8 1
pffrag 232 269 0 269 22 21 1 1 0
482 1
pffrnode 88 269 0 269 22 21 1 1 0
8 1
pffrent 40 7522 0 7522 21 20 1 1 0
8 1
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 735 0 670 1 0 1 1 0
8 0
pfstkey 112 737 0 672 3 1 2 3 0
8 0
pfstate 328 737 0 672 9 3 6 7 0
8 0
pfrule 1360 21 0 16 2 1 1 2 0
8 0
art_heap8 4096 21 0 20 19 18 1 3 0
8 0
art_heap4 256 4747 0 4496 61 43 18 19 0
8 0
art_table 32 4768 0 4516 9 6 3 3 0
8 0
art_node 16 1127 0 1085 1 0 1 1 0
8 0
sysvmsgpl 40 24 0 17 1 0 1 1 0
8 0
semupl 112 2 0 2 1 1 0 1 0
8 0
semapl 112 1984 0 1974 1 0 1 1 0
8 0
shmpl 112 140 0 12 4 0 4 4 0
8 0
dirhash 1024 17 0 0 3 0 3 3 0
8 0
dino1pl 128 15737 0 14269 49 1 48 48 0
8 0
ffsino 272 15737 0 14269 99 0 99 99 0
8 0
nchpl 144 29748 0 29287 61 41 20 61 0
8 0
uvmvnodes 72 7769 0 0 142 0 142 142 0
8 0
vnodes 208 7769 0 0 409 0 409 409 0
8 0
namei 1024 111450 0 111450 1 0 1 1 0
8 1
percpumem 16 30 0 0 1 0 1 1 0
8 0
vcpupl 1984 79 0 1 10 0 10 10 0
8 0
vmpool 552 112 0 34 7 1 6 6 0
8 0
scsiplug 64 14 0 14 9 9 0 1 0
8 0
scxspl 192 103849 0 103849 61 58 3 7 0
8 3
plimitpl 152 852 0 844 1 0 1 1 0
8 0
sigapl 432 9631 0 9616 4 2 2 3 0
8 0
futexpl 56 229938 0 229938 1 0 1 1 0
8 1
knotepl 112 2866 0 2847 8 7 1 2 0
8 0
kqueuepl 104 2652 0 2650 4 3 1 4 0
8 0
pipepl 112 7434 0 7415 22 20 2 2 0
8 1
fdescpl 488 9632 0 9616 3 0 3 3 0
8 0
filepl 152 92547 0 92444 54 47 7 13 0
8 2
lockfpl 104 3409 0 3408 1 0 1 1 0
8 0
lockfspl 48 1156 0 1155 1 0 1 1 0
8 0
sessionpl 112 90 0 79 1 0 1 1 0
8 0
pgrppl 48 189 0 178 1 0 1 1 0
8 0
ucredpl 96 9303 0 9294 1 0 1 1 0
8 0
zombiepl 144 9622 0 9621 2 1 1 1 0
8 0
processpl 896 9655 0 9621 4 0 4 4 0
8 0
procpl 632 30941 0 30897 5 0 5 5 0
8 0
srpgc 64 110 0 110 29 28 1 1 0
8 1
sosppl 128 156 0 156 27 27 0 1 0
8 0
sockpl 384 30610 0 30582 58 53 5 14 0
8 2
mcl64k 65536 354 0 0 39 15 24 34 0
8 0
mcl16k 16384 28 0 0 4 1 3 3 0
8 0
mcl12k 12288 33 0 0 2 0 2 2 0
8 0
mcl9k 9216 31 0 0 2 0 2 2 0
8 0
mcl8k 8192 17 0 0 3 0 3 3 0
8 0
mcl4k 4096 41 0 0 4 1 3 3 0
8 0
mcl2k2 2112 10 0 0 1 0 1 1 0
8 0
mcl2k 2048 186 0 0 20 5 15 20 0
8 0
mtagpl 80 76 0 0 1 0 1 1 0
8 0
mbufpl 256 1046 0 0 36 0 36 36 0
8 0
bufpl 256 41255 0 33483 486 0 486 486 0
8 0
anonpl 16 1234823 0 1214610 311 221 90 104 0
124 0
amapchunkpl 152 73973 0 73789 164 149 15 22 0
158 4
amappl16 192 52861 0 51592 333 265 68 76 0
8 4
amappl15 184 2848 0 2848 11 11 0 1 0
8 0
amappl14 176 1734 0 1728 1 0 1 1 0
8 0
amappl13 168 1043 0 1042 7 6 1 1 0
8 0
amappl12 160 923 0 919 2 1 1 1 0
8 0
amappl11 152 531 0 516 1 0 1 1 0
8 0
amappl10 144 1352 0 1345 1 0 1 1 0
8 0
amappl9 136 3009 0 3001 1 0 1 1 0
8 0
amappl8 128 2612 0 2549 4 1 3 3 0
8 0
amappl7 120 1564 0 1554 1 0 1 1 0
8 0
amappl6 112 419 0 397 1 0 1 1 0
8 0
amappl5 104 1643 0 1630 1 0 1 1 0
8 0
amappl4 96 10232 0 10199 1 0 1 1 0
8 0
amappl3 88 2073 0 2060 1 0 1 1 0
8 0
amappl2 80 73386 0 73294 4 1 3 3 0
8 0
amappl1 72 229928 0 229493 25 14 11 20 0
8 0
amappl 80 32506 0 32417 3 0 3 3 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 141 0 12 3 0 3 3 0
8 0
uaddrrnd 24 9744 0 9616 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 9744 0 9616 1 0 1 1 0
8 0
vmmpekpl 168 78826 0 78773 5 2 3 3 0
8 0
vmmpepl 168 1256400 0 1253732 394 233 161 165 0 357
38
vmsppl 368 9631 0 9616 2 0 2 2 0
8 0
pdppl 4096 19495 0 19378 18 3 15 16 0
8 0
pvpl 32 3200314 0 3180201 561 375 186 220 0
265 0
pmappl 232 9743 0 9650 7 1 6 6 0
8 0
extentpl 40 41 0 26 1 0 1 1 0
8 0
phpool 112 823 0 111 21 0 21 21 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.

syzbot

unread,
Aug 26, 2020, 5:45:10 PM8/26/20
to syzkaller-o...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages