[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <089e082d01d08b36a6055cd763ca@google.com>
Date: Tue, 31 Oct 2017 06:04:01 -0700
From: syzbot
<bot+eb8be6216b6b712efe5df541be1ad63a51f70008@...kaller.appspotmail.com>
To: adobriyan@...il.com, akpm@...ux-foundation.org,
dan.carpenter@...cle.com, dave.jiang@...el.com,
linux-kernel@...r.kernel.org, ross.zwisler@...ux.intel.com,
syzkaller-bugs@...glegroups.com, viro@...iv.linux.org.uk
Subject: KASAN: double-free or invalid-free in relay_open
Hello,
syzkaller hit the following crash on
36ef71cae353f88fd6e095e2aaa3e5953af1685d
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.
C reproducer is attached
syzkaller reproducer is attached. See https://goo.gl/kgGztJ
for information about syzkaller reproducers
==================================================================
BUG: KASAN: double-free or invalid-free in relay_open+0x6a1/0xa40
kernel/relay.c:614
CPU: 2 PID: 2990 Comm: syzkaller414652 Not tainted
4.14.0-rc5-next-20171018+ #8
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:16 [inline]
dump_stack+0x194/0x257 lib/dump_stack.c:52
print_address_description+0x73/0x250 mm/kasan/report.c:252
kasan_report_double_free+0x55/0x80 mm/kasan/report.c:333
kasan_slab_free+0xa3/0xc0 mm/kasan/kasan.c:514
__cache_free mm/slab.c:3492 [inline]
kfree+0xca/0x250 mm/slab.c:3807
relay_open+0x6a1/0xa40 kernel/relay.c:614
do_blk_trace_setup+0x4a4/0xcf0 kernel/trace/blktrace.c:517
blk_trace_setup+0xbd/0x180 kernel/trace/blktrace.c:564
sg_ioctl+0xc71/0x2d90 drivers/scsi/sg.c:1089
vfs_ioctl fs/ioctl.c:45 [inline]
do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685
SYSC_ioctl fs/ioctl.c:700 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691
entry_SYSCALL_64_fastpath+0x1f/0xbe
RIP: 0033:0x439149
RSP: 002b:00007ffe878e2f78 EFLAGS: 00000206 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000439149
RDX: 000000002084cf90 RSI: 00000000c0481273 RDI: 0000000000000003
RBP: 0000000000000082 R08: 00000000000000fe R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000401da0 R14: 0000000000401e30 R15: 0000000000000000
Allocated by task 2990:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551
kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3614
kmalloc include/linux/slab.h:502 [inline]
kzalloc include/linux/slab.h:691 [inline]
relay_open+0xf2/0xa40 kernel/relay.c:576
do_blk_trace_setup+0x4a4/0xcf0 kernel/trace/blktrace.c:517
blk_trace_setup+0xbd/0x180 kernel/trace/blktrace.c:564
sg_ioctl+0xc71/0x2d90 drivers/scsi/sg.c:1089
vfs_ioctl fs/ioctl.c:45 [inline]
do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685
SYSC_ioctl fs/ioctl.c:700 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691
entry_SYSCALL_64_fastpath+0x1f/0xbe
Freed by task 2990:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3492 [inline]
kfree+0xca/0x250 mm/slab.c:3807
relay_destroy_channel kernel/relay.c:199 [inline]
kref_put include/linux/kref.h:70 [inline]
relay_open+0x84a/0xa40 kernel/relay.c:612
do_blk_trace_setup+0x4a4/0xcf0 kernel/trace/blktrace.c:517
blk_trace_setup+0xbd/0x180 kernel/trace/blktrace.c:564
sg_ioctl+0xc71/0x2d90 drivers/scsi/sg.c:1089
vfs_ioctl fs/ioctl.c:45 [inline]
do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685
SYSC_ioctl fs/ioctl.c:700 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691
entry_SYSCALL_64_fastpath+0x1f/0xbe
The buggy address belongs to the object at ffff88003c97dd00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 0 bytes inside of
512-byte region [ffff88003c97dd00, ffff88003c97df00)
The buggy address belongs to the page:
page:ffffea0000f25f40 count:1 mapcount:0 mapping:ffff88003c97d080 index:0x0
flags: 0x100000000000100(slab)
raw: 0100000000000100 ffff88003c97d080 0000000000000000 0000000100000006
raw: ffffea0000f25f20 ffffea0000f261e0 ffff88003e800940 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88003c97dc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88003c97dc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> ffff88003c97dd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88003c97dd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88003c97de00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzkaller@...glegroups.com.
Please credit me with: Reported-by: syzbot <syzkaller@...glegroups.com>
syzbot will keep track of this bug report.
Once a fix for this bug is committed, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line.
View attachment "config.txt" of type "text/plain" (124357 bytes)
Download attachment "raw.log" of type "application/octet-stream" (71346 bytes)
View attachment "repro.txt" of type "text/plain" (695 bytes)
Download attachment "repro.c" of type "application/octet-stream" (3186 bytes)
Powered by blists - more mailing lists