Hello,
syzkaller hit the following crash on
9829d9f31f6c0e4984545e03032f14ccca6eeb68
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.
CC: [
air...@linux.ie air...@redhat.com alexande...@amd.com
christia...@amd.com daniel...@ffwll.ch dh.he...@gmail.com
dri-...@lists.freedesktop.org kra...@redhat.com
linux-...@vger.kernel.org michel....@amd.com
virtual...@lists.linux-foundation.org yamada....@socionext.com]
==================================================================
BUG: KASAN: double-free or invalid-free in cirrus_ttm_tt_create+0xc0/0xe0
drivers/gpu/drm/cirrus/cirrus_ttm.c:213
CPU: 0 PID: 10969 Comm: syz-executor4 Not tainted 4.13.0-next-20170904+ #14
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:3503 [inline]
kfree+0xca/0x250 mm/slab.c:3820
cirrus_ttm_tt_create+0xc0/0xe0 drivers/gpu/drm/cirrus/cirrus_ttm.c:213
ttm_bo_add_ttm+0x2e1/0x420 drivers/gpu/drm/ttm/ttm_bo.c:248
ttm_bo_validate+0x52b/0x6e0 drivers/gpu/drm/ttm/ttm_bo.c:1129
ttm_bo_init_reserved+0xe3f/0x1350 drivers/gpu/drm/ttm/ttm_bo.c:1230
ttm_bo_init+0x59/0x170 drivers/gpu/drm/ttm/ttm_bo.c:1265
cirrus_bo_create+0x31d/0x450 drivers/gpu/drm/cirrus/cirrus_ttm.c:343
cirrus_gem_create+0xcc/0x1b0 drivers/gpu/drm/cirrus/cirrus_main.c:237
cirrus_dumb_create+0x171/0x310 drivers/gpu/drm/cirrus/cirrus_main.c:258
drm_mode_create_dumb_ioctl+0x238/0x2c0
drivers/gpu/drm/drm_dumb_buffers.c:91
drm_ioctl_kernel+0x1e7/0x2e0 drivers/gpu/drm/drm_ioctl.c:735
drm_ioctl+0x72e/0xa50 drivers/gpu/drm/drm_ioctl.c:831
vfs_ioctl fs/ioctl.c:45 [inline]
do_vfs_ioctl+0x1b1/0x1530 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:0x447299
RSP: 002b:00007f509fe3cc08 EFLAGS: 00000296 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000000001f RCX: 0000000000447299
RDX: 000000002048aff7 RSI: fffffffffffff4b2 RDI: 000000000000001f
RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 00000000ffffffff
R13: 00000000000038c0 R14: 00000000006e6980 R15: 0000000000fff000
Allocated by task 10969:
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+0xad/0xe0 mm/kasan/kasan.c:551
kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3627
kmalloc include/linux/slab.h:493 [inline]
kzalloc include/linux/slab.h:666 [inline]
cirrus_ttm_tt_create+0x56/0xe0 drivers/gpu/drm/cirrus/cirrus_ttm.c:208
ttm_bo_add_ttm+0x2e1/0x420 drivers/gpu/drm/ttm/ttm_bo.c:248
ttm_bo_validate+0x52b/0x6e0 drivers/gpu/drm/ttm/ttm_bo.c:1129
ttm_bo_init_reserved+0xe3f/0x1350 drivers/gpu/drm/ttm/ttm_bo.c:1230
ttm_bo_init+0x59/0x170 drivers/gpu/drm/ttm/ttm_bo.c:1265
cirrus_bo_create+0x31d/0x450 drivers/gpu/drm/cirrus/cirrus_ttm.c:343
cirrus_gem_create+0xcc/0x1b0 drivers/gpu/drm/cirrus/cirrus_main.c:237
cirrus_dumb_create+0x171/0x310 drivers/gpu/drm/cirrus/cirrus_main.c:258
drm_mode_create_dumb_ioctl+0x238/0x2c0
drivers/gpu/drm/drm_dumb_buffers.c:91
drm_ioctl_kernel+0x1e7/0x2e0 drivers/gpu/drm/drm_ioctl.c:735
drm_ioctl+0x72e/0xa50 drivers/gpu/drm/drm_ioctl.c:831
vfs_ioctl fs/ioctl.c:45 [inline]
do_vfs_ioctl+0x1b1/0x1530 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 10969:
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+0x71/0xc0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3503 [inline]
kfree+0xca/0x250 mm/slab.c:3820
cirrus_ttm_backend_destroy+0x1d/0x20
drivers/gpu/drm/cirrus/cirrus_ttm.c:194
ttm_tt_destroy.part.7+0x12a/0x180 drivers/gpu/drm/ttm/ttm_tt.c:184
ttm_tt_destroy drivers/gpu/drm/ttm/ttm_tt.c:171 [inline]
ttm_tt_init+0x230/0x2c0 drivers/gpu/drm/ttm/ttm_tt.c:202
cirrus_ttm_tt_create+0x9a/0xe0 drivers/gpu/drm/cirrus/cirrus_ttm.c:212
ttm_bo_add_ttm+0x2e1/0x420 drivers/gpu/drm/ttm/ttm_bo.c:248
ttm_bo_validate+0x52b/0x6e0 drivers/gpu/drm/ttm/ttm_bo.c:1129
ttm_bo_init_reserved+0xe3f/0x1350 drivers/gpu/drm/ttm/ttm_bo.c:1230
ttm_bo_init+0x59/0x170 drivers/gpu/drm/ttm/ttm_bo.c:1265
cirrus_bo_create+0x31d/0x450 drivers/gpu/drm/cirrus/cirrus_ttm.c:343
cirrus_gem_create+0xcc/0x1b0 drivers/gpu/drm/cirrus/cirrus_main.c:237
cirrus_dumb_create+0x171/0x310 drivers/gpu/drm/cirrus/cirrus_main.c:258
drm_mode_create_dumb_ioctl+0x238/0x2c0
drivers/gpu/drm/drm_dumb_buffers.c:91
drm_ioctl_kernel+0x1e7/0x2e0 drivers/gpu/drm/drm_ioctl.c:735
drm_ioctl+0x72e/0xa50 drivers/gpu/drm/drm_ioctl.c:831
vfs_ioctl fs/ioctl.c:45 [inline]
do_vfs_ioctl+0x1b1/0x1530 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 ffff88003e95a180
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 0 bytes inside of
96-byte region [ffff88003e95a180, ffff88003e95a1e0)
The buggy address belongs to the page:
page:ffffea0000fa5680 count:1 mapcount:0 mapping:ffff88003e95a000 index:0x0
flags: 0x100000000000100(slab)
raw: 0100000000000100 ffff88003e95a000 0000000000000000 0000000100000020
raw: ffffea0000ec79e0 ffffea0000fa4ce0 ffff88003e8004c0 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88003e95a080: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
ffff88003e95a100: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
> ffff88003e95a180: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff88003e95a200: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff88003e95a280: fb fb fb fb fb fb fb fb fb fb fb fb 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
syzk...@googlegroups.com.
Please credit me with: Reported-by: syzbot <
syzk...@googlegroups.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.
To upstream this report, please reply with:
#syz upstream