executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 22.441009] ================================================================== executing program executing program [ 22.442218] BUG: KASAN: use-after-free in do_blk_trace_setup+0xab4/0xcf0 [ 22.443306] Read of size 8 at addr ffff88006ab62d00 by task syzkaller556741/3013 [ 22.444141] [ 22.444327] CPU: 3 PID: 3013 Comm: syzkaller556741 Not tainted 4.14.0-rc7-next-20171103+ #10 [ 22.445264] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 22.446207] Call Trace: [ 22.446496] dump_stack+0x194/0x257 [ 22.447219] ? arch_local_irq_restore+0x53/0x53 [ 22.447731] ? show_regs_print_info+0x65/0x65 [ 22.448232] ? relay_open_buf.part.10+0x9b0/0x9b0 [ 22.448760] ? do_blk_trace_setup+0xab4/0xcf0 [ 22.449259] print_address_description+0x73/0x250 [ 22.449800] ? do_blk_trace_setup+0xab4/0xcf0 [ 22.450298] kasan_report+0x25b/0x340 [ 22.450720] __asan_report_load8_noabort+0x14/0x20 [ 22.451263] do_blk_trace_setup+0xab4/0xcf0 [ 22.451741] ? blk_tracer_print_line+0x40/0x40 [ 22.452247] ? __might_sleep+0x95/0x190 [ 22.452690] ? kasan_check_write+0x14/0x20 executing program executing program [ 22.453158] ? _copy_from_user+0x99/0x110 [ 22.453943] blk_trace_setup+0xbd/0x180 [ 22.454395] ? do_blk_trace_setup+0xcf0/0xcf0 [ 22.454906] ? avc_has_extended_perms+0xef/0x12c0 [ 22.455456] sg_ioctl+0xc77/0x2da0 [ 22.455849] ? lock_release+0xd70/0xd70 [ 22.456294] ? sg_new_write.isra.20+0x830/0x830 [ 22.456817] ? avc_has_extended_perms+0x7fa/0x12c0 [ 22.457373] ? avc_ss_reset+0x110/0x110 [ 22.457844] ? handle_mm_fault+0x410/0x8d0 [ 22.458309] ? down_read_trylock+0xdb/0x170 [ 22.458781] ? __do_page_fault+0x32d/0xc90 [ 22.459228] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 22.459788] ? __do_page_fault+0x3d6/0xc90 [ 22.460209] ? rcu_note_context_switch+0x710/0x710 [ 22.460690] ? sg_new_write.isra.20+0x830/0x830 [ 22.461143] do_vfs_ioctl+0x1b1/0x1530 [ 22.461516] ? _cond_resched+0x14/0x30 [ 22.462066] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.462644] ? selinux_capable+0x40/0x40 [ 22.463178] ? putname+0xf3/0x130 [ 22.463632] ? do_sys_open+0x320/0x6d0 executing program [ 22.464148] ? security_file_ioctl+0x89/0xb0 [ 22.464876] SyS_ioctl+0x8f/0xc0 [ 22.465269] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.465823] RIP: 0033:0x4396a9 [ 22.466185] RSP: 002b:00007ffccd250068 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 22.467048] RAX: ffffffffffffffda RBX: 00000000006ccac0 RCX: 00000000004396a9 [ 22.468026] RDX: 000000002084cf90 RSI: 00000000c0481273 RDI: 0000000000000004 [ 22.469190] RBP: 0000000000000086 R08: 00000000000000fe R09: 0000000000000000 [ 22.470362] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000038 [ 22.471176] R13: ffffffffffffffff R14: 0000000000401eb0 R15: 0000000000000000 [ 22.472047] [ 22.472239] Allocated by task 3013: [ 22.472655] save_stack+0x43/0xd0 [ 22.473047] kasan_kmalloc+0xad/0xe0 [ 22.473468] kmem_cache_alloc_trace+0x136/0x750 [ 22.474005] do_blk_trace_setup+0x182/0xcf0 [ 22.474492] blk_trace_setup+0xbd/0x180 [ 22.474941] sg_ioctl+0xc77/0x2da0 [ 22.475343] do_vfs_ioctl+0x1b1/0x1530 [ 22.475782] SyS_ioctl+0x8f/0xc0 [ 22.476164] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.476696] [ 22.476884] Freed by task 3020: [ 22.477257] save_stack+0x43/0xd0 [ 22.477703] kasan_slab_free+0x71/0xc0 [ 22.478143] kfree+0xca/0x250 [ 22.478501] blk_trace_free+0xf9/0x130 [ 22.478943] blk_trace_cleanup+0x15/0x30 [ 22.479405] blk_trace_remove+0x55/0x80 [ 22.479854] sg_ioctl+0x5f1/0x2da0 [ 22.480256] do_vfs_ioctl+0x1b1/0x1530 [ 22.480694] SyS_ioctl+0x8f/0xc0 [ 22.481077] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.481608] [ 22.481838] The buggy address belongs to the object at ffff88006ab62cc0 [ 22.481838] which belongs to the cache kmalloc-128 of size 128 [ 22.483246] The buggy address is located 64 bytes inside of [ 22.483246] 128-byte region [ffff88006ab62cc0, ffff88006ab62d40) [ 22.484564] The buggy address belongs to the page: [ 22.485121] page:ffffea0001aad880 count:1 mapcount:0 mapping:ffff88006ab62000 index:0xffff88006ab62000 [ 22.486213] flags: 0x500000000000100(slab) [ 22.486695] raw: 0500000000000100 ffff88006ab62000 ffff88006ab62000 0000000100000014 [ 22.487580] raw: ffffea0001ad3260 ffffea0001acbaa0 ffff88003e800640 0000000000000000 [ 22.488505] page dumped because: kasan: bad access detected [ 22.489478] [ 22.489676] Memory state around the buggy address: [ 22.490262] ffff88006ab62c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.491089] ffff88006ab62c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 22.491958] >ffff88006ab62d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 22.492783] ^ [ 22.493164] ffff88006ab62d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.494035] ffff88006ab62e00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 22.494859] ================================================================== [ 22.495678] Disabling lock debugging due to kernel taint [ 22.496327] Kernel panic - not syncing: panic_on_warn set ... [ 22.496327] [ 22.497163] CPU: 3 PID: 3013 Comm: syzkaller556741 Tainted: G B 4.14.0-rc7-next-20171103+ #10 [ 22.498333] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 22.499308] Call Trace: [ 22.499617] dump_stack+0x194/0x257 [ 22.500052] ? arch_local_irq_restore+0x53/0x53 [ 22.500602] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.501170] ? vsnprintf+0x1ed/0x1900 [ 22.501696] ? do_blk_trace_setup+0xa60/0xcf0 [ 22.502263] panic+0x1e4/0x41c [ 22.502667] ? refcount_error_report+0x214/0x214 [ 22.503214] ? do_blk_trace_setup+0xab4/0xcf0 [ 22.503724] kasan_end_report+0x50/0x50 [ 22.504175] kasan_report+0x144/0x340 [ 22.504611] __asan_report_load8_noabort+0x14/0x20 [ 22.505168] do_blk_trace_setup+0xab4/0xcf0 [ 22.505720] ? blk_tracer_print_line+0x40/0x40 [ 22.506255] ? __might_sleep+0x95/0x190 [ 22.506712] ? kasan_check_write+0x14/0x20 [ 22.507189] ? _copy_from_user+0x99/0x110 [ 22.507660] blk_trace_setup+0xbd/0x180 [ 22.508111] ? do_blk_trace_setup+0xcf0/0xcf0 [ 22.508625] ? avc_has_extended_perms+0xef/0x12c0 [ 22.509174] sg_ioctl+0xc77/0x2da0 [ 22.509615] ? lock_release+0xd70/0xd70 [ 22.510079] ? sg_new_write.isra.20+0x830/0x830 [ 22.510643] ? avc_has_extended_perms+0x7fa/0x12c0 [ 22.511481] ? avc_ss_reset+0x110/0x110 [ 22.511944] ? handle_mm_fault+0x410/0x8d0 [ 22.512421] ? down_read_trylock+0xdb/0x170 [ 22.512979] ? __do_page_fault+0x32d/0xc90 [ 22.513468] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 22.514200] ? __do_page_fault+0x3d6/0xc90 [ 22.514729] ? rcu_note_context_switch+0x710/0x710 [ 22.515311] ? sg_new_write.isra.20+0x830/0x830 [ 22.515893] do_vfs_ioctl+0x1b1/0x1530 [ 22.516393] ? _cond_resched+0x14/0x30 [ 22.516896] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.517464] ? selinux_capable+0x40/0x40 [ 22.517997] ? putname+0xf3/0x130 [ 22.518446] ? do_sys_open+0x320/0x6d0 [ 22.518945] ? security_file_ioctl+0x89/0xb0 [ 22.519516] SyS_ioctl+0x8f/0xc0 [ 22.519954] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.520565] RIP: 0033:0x4396a9 [ 22.521059] RSP: 002b:00007ffccd250068 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 22.522047] RAX: ffffffffffffffda RBX: 00000000006ccac0 RCX: 00000000004396a9 [ 22.522990] RDX: 000000002084cf90 RSI: 00000000c0481273 RDI: 0000000000000004 [ 22.523917] RBP: 0000000000000086 R08: 00000000000000fe R09: 0000000000000000 [ 22.524845] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000038 [ 22.525764] R13: ffffffffffffffff R14: 0000000000401eb0 R15: 0000000000000000 [ 22.529714] Dumping ftrace buffer: [ 22.530123] (ftrace buffer empty) [ 22.530572] Kernel Offset: disabled [ 22.530985] Rebooting in 86400 seconds..