audit: type=1400 audit(1555522389.762:36): avc: denied { map } for pid=7125 comm="syz-executor543" path="/root/syz-executor543769209" dev="sda1" ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 ================================================================== BUG: KASAN: use-after-free in do_blk_trace_setup+0xa8f/0xb10 kernel/trace/blktrace.c:561 Read of size 8 at addr ffff888099e76040 by task syz-executor543/7133 CPU: 0 PID: 7133 Comm: syz-executor543 Not tainted 4.14.112 #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x19c lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xaf/0x2b5 mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 do_blk_trace_setup+0xa8f/0xb10 kernel/trace/blktrace.c:561 blk_trace_setup+0xbd/0x140 kernel/trace/blktrace.c:579 sg_ioctl+0x31b/0x27e0 drivers/scsi/sg.c:1127 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7b9/0x1070 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x445069 RSP: 002b:00007ffd2532fa98 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445069 RDX: 0000000020000000 RSI: 00000000c0481273 RDI: 0000000000000003 RBP: 00000000006cf018 R08: 0000000000000004 R09: 00000000004002e0 R10: 000000000000000f R11: 0000000000000246 R12: 0000000000402200 R13: 0000000000402290 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7133: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x152/0x790 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] do_blk_trace_setup+0x120/0xb10 kernel/trace/blktrace.c:495 blk_trace_setup+0xbd/0x140 kernel/trace/blktrace.c:579 sg_ioctl+0x31b/0x27e0 drivers/scsi/sg.c:1127 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7b9/0x1070 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 7135: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 blk_trace_free+0x106/0x140 kernel/trace/blktrace.c:330 blk_trace_cleanup kernel/trace/blktrace.c:351 [inline] blk_trace_remove+0x59/0x80 kernel/trace/blktrace.c:364 sg_ioctl+0x247/0x27e0 drivers/scsi/sg.c:1136 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x7b9/0x1070 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888099e76000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 64 bytes inside of 128-byte region [ffff888099e76000, ffff888099e76080) The buggy address belongs to the page: page:ffffea0002679d80 count:1 mapcount:0 mapping:ffff888099e76000 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888099e76000 0000000000000000 0000000100000015 raw: ffffea0002855760 ffffea000274ee60 ffff8880aa800640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888099e75f00: fc fc fc fc fb fb fb fb fb fb fb fc fc fc fc fb ffff888099e75f80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc >ffff888099e76000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888099e76080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888099e76100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================