[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <94eb2c0bfe1ee3b038055cf18dce@google.com>
Date: Wed, 01 Nov 2017 13:17:00 -0700
From: syzbot
<bot+9a592b2d4f3c5d4c93adef9de16ded0105530914@...kaller.appspotmail.com>
To: bhaktipriya96@...il.com, borntraeger@...ibm.com,
cornelia.huck@...ibm.com, david@...hat.com, hpa@...or.com,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
mingo@...hat.com, pbonzini@...hat.com, rkrcmar@...hat.com,
syzkaller-bugs@...glegroups.com, tglx@...utronix.de, x86@...nel.org
Subject: KASAN: use-after-free Read in irq_bypass_register_consumer
Hello,
syzkaller hit the following crash on
aae4e7a8bc44722fe70d58920a36916b1043195e
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.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: use-after-free in irq_bypass_register_consumer+0x4f0/0x500
virt/lib/irqbypass.c:198
Read of size 8 at addr ffff8801cf1d9178 by task syzkaller948360/3420
CPU: 1 PID: 3420 Comm: syzkaller948360 Not tainted 4.13.0-rc4+ #23
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 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+0x7f/0x260 mm/kasan/report.c:252
kasan_report_error mm/kasan/report.c:351 [inline]
kasan_report+0x24e/0x340 mm/kasan/report.c:409
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430
irq_bypass_register_consumer+0x4f0/0x500 virt/lib/irqbypass.c:198
kvm_irqfd_assign arch/x86/kvm/../../../virt/kvm/eventfd.c:417 [inline]
kvm_irqfd+0x137a/0x1d50 arch/x86/kvm/../../../virt/kvm/eventfd.c:572
kvm_vm_ioctl+0x1079/0x1c40 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3029
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:0x4460d9
RSP: 002b:00007f24ae19adc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004460d9
RDX: 000000002000d000 RSI: 000000004020ae76 RDI: 000000000000002b
RBP: 0000000000000086 R08: 00007f24ae19b700 R09: 00007f24ae19b700
R10: 00007f24ae19b700 R11: 0000000000000202 R12: 0000000000000000
R13: 00007ffe1847ef3f R14: 00007f24ae19b9c0 R15: 0000000000000000
Allocated by task 3420:
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xaa/0xd0 mm/kasan/kasan.c:551
kmem_cache_alloc_trace+0x101/0x6f0 mm/slab.c:3627
kmalloc include/linux/slab.h:493 [inline]
kzalloc include/linux/slab.h:666 [inline]
kvm_irqfd_assign arch/x86/kvm/../../../virt/kvm/eventfd.c:296 [inline]
kvm_irqfd+0x16c/0x1d50 arch/x86/kvm/../../../virt/kvm/eventfd.c:572
kvm_vm_ioctl+0x1079/0x1c40 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3029
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 24:
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0x6e/0xc0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3503 [inline]
kfree+0xd3/0x260 mm/slab.c:3820
irqfd_shutdown+0x13c/0x1a0 arch/x86/kvm/../../../virt/kvm/eventfd.c:148
process_one_work+0xbf3/0x1bc0 kernel/workqueue.c:2097
worker_thread+0x223/0x1860 kernel/workqueue.c:2231
kthread+0x35e/0x430 kernel/kthread.c:231
ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:425
The buggy address belongs to the object at ffff8801cf1d9000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 376 bytes inside of
512-byte region [ffff8801cf1d9000, ffff8801cf1d9200)
The buggy address belongs to the page:
page:ffffea000654e778 count:1 mapcount:0 mapping:ffff8801cf1d9000 index:0x0
flags: 0x200000000000100(slab)
raw: 0200000000000100 ffff8801cf1d9000 0000000000000000 0000000100000006
raw: ffffea000654e648 ffffea0006560c48 ffff8801dbc00600
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8801cf1d9000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8801cf1d9080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ffff8801cf1d9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8801cf1d9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8801cf1d9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
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" (123373 bytes)
Download attachment "raw.log" of type "application/octet-stream" (11023 bytes)
View attachment "repro.txt" of type "text/plain" (796 bytes)
Download attachment "repro.c" of type "application/octet-stream" (3302 bytes)
Powered by blists - more mailing lists