syzbot


BUG: Double free or freeing an invalid pointer (2)

Status: fixed on 2018/02/20 22:33
Fix commit: 91cebf98cd94 kernel/relay.c: revert "kernel/relay.c: fix potential memory leak"
First crash: 2542d, last: 2542d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 BUG: Double free or freeing an invalid pointer syz 70 2660d 2677d 1/3 fixed on 2017/08/12 08:42

Sample crash report:
==================================================================
BUG: Double free or freeing an invalid pointer
Unexpected shadow byte: 0xFB
CPU: 1 PID: 3278 Comm: syzkaller107477 Not tainted 4.9.67-gf26d3c7 #106
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801c51478c0 ffffffff81d906e9 ffff8801da001280 ffff8801c98b0a00
 ffff8801c98b0c00 ffffffff8137a7d3 0000000000000282 ffff8801c51478e8
 ffffffff8153a2cc 00000000fffffffb ffff8801da001280 ffff8801c98b0a00
Call Trace:
 [<ffffffff81d906e9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d906e9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff8153a2cc>] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160
 [<ffffffff8153ab03>] kasan_report_double_free+0x53/0x80 mm/kasan/report.c:181
 [<ffffffff81539ebd>] kasan_slab_free+0x9d/0xc0 mm/kasan/kasan.c:562
 [<ffffffff81536a50>] slab_free_hook mm/slub.c:1355 [inline]
 [<ffffffff81536a50>] slab_free_freelist_hook mm/slub.c:1377 [inline]
 [<ffffffff81536a50>] slab_free mm/slub.c:2958 [inline]
 [<ffffffff81536a50>] kfree+0xf0/0x2f0 mm/slub.c:3878
 [<ffffffff8137a7d3>] relay_open+0x603/0x860 kernel/relay.c:614
 [<ffffffff813bc539>] do_blk_trace_setup+0x3e9/0x950 kernel/trace/blktrace.c:501
 [<ffffffff813bcb80>] blk_trace_setup+0xe0/0x1a0 kernel/trace/blktrace.c:545
 [<ffffffff813bd06e>] blk_trace_ioctl+0x1de/0x300 kernel/trace/blktrace.c:654
 [<ffffffff81d33eb0>] blkdev_ioctl+0xb00/0x1a60 block/ioctl.c:576
 [<ffffffff8162845e>] block_ioctl+0xde/0x120 fs/block_dev.c:1688
 [<ffffffff815aa59a>] vfs_ioctl fs/ioctl.c:43 [inline]
 [<ffffffff815aa59a>] do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679
 [<ffffffff815ab5bf>] SYSC_ioctl fs/ioctl.c:694 [inline]
 [<ffffffff815ab5bf>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685
 [<ffffffff838a9985>] entry_SYSCALL_64_fastpath+0x23/0xc6
Object at ffff8801c98b0a00, in cache kmalloc-512 size: 512
Allocated:
PID = 3278
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
 save_stack+0x43/0xd0 mm/kasan/kasan.c:495
 set_track mm/kasan/kasan.c:507 [inline]
 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598
 kmem_cache_alloc_trace+0xfb/0x2a0 mm/slub.c:2742
 kmalloc include/linux/slab.h:490 [inline]
 kzalloc include/linux/slab.h:636 [inline]
 relay_open+0x91/0x860 kernel/relay.c:576
 do_blk_trace_setup+0x3e9/0x950 kernel/trace/blktrace.c:501
 blk_trace_setup+0xe0/0x1a0 kernel/trace/blktrace.c:545
 blk_trace_ioctl+0x1de/0x300 kernel/trace/blktrace.c:654
 blkdev_ioctl+0xb00/0x1a60 block/ioctl.c:576
 block_ioctl+0xde/0x120 fs/block_dev.c:1688
 vfs_ioctl fs/ioctl.c:43 [inline]
 do_vfs_ioctl+0x1aa/0x1140 fs/ioctl.c:679
 SYSC_ioctl fs/ioctl.c:694 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685
 entry_SYSCALL_64_fastpath+0x23/0xc6
Freed:
PID = 3278
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
 save_stack+0x43/0xd0 mm/kasan/kasan.c:495
 set_track mm/kasan/kasan.c:507 [inline]
 kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571
 slab_free_hook mm/slub.c:1355 [inline]
 slab_free_freelist_hook mm/slub.c:1377 [inline]
 slab_free mm/slub.c:2958 [inline]
 kfree+0xf0/0x2f0 mm/slub.c:3878
 relay_destroy_channel+0x16/0x20 kernel/relay.c:199

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/12/07 01:38 https://android.googlesource.com/kernel/common android-4.9 f26d3c76d376 5d643f8e .config console log report syz C ci-android-49-kasan-gce
* Struck through repros no longer work on HEAD.