random: sshd: uninitialized urandom read (32 bytes read) audit: type=1400 audit(1584497432.122:36): avc: denied { map } for pid=7433 comm="syz-executor793" path="/root/syz-executor793328469" dev="sda1" ino=16483 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+0xa5b/0xad0 kernel/trace/blktrace.c:561 Read of size 8 at addr ffff8880a67a4dc0 by task syz-executor793/7443 CPU: 0 PID: 7443 Comm: syz-executor793 Not tainted 4.14.173-syzkaller #0 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+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 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+0xa9/0x2ae mm/kasan/report.c:393 do_blk_trace_setup+0xa5b/0xad0 kernel/trace/blktrace.c:561 blk_trace_setup+0xa3/0x120 kernel/trace/blktrace.c:579 sg_ioctl+0x2f9/0x2620 drivers/scsi/sg.c:1127 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x44aee9 RSP: 002b:00007fb482743ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 000000000044aee9 RDX: 0000000020000080 RSI: 00000000c0481273 RDI: 0000000000000005 RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc2c R13: 00007ffca1e3f2cf R14: 00007fb4827449c0 R15: 0000000000000000 Allocated by task 7443: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x14d/0x7b0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] do_blk_trace_setup+0x11e/0xad0 kernel/trace/blktrace.c:495 blk_trace_setup+0xa3/0x120 kernel/trace/blktrace.c:579 sg_ioctl+0x2f9/0x2620 drivers/scsi/sg.c:1127 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 7445: save_stack+0x32/0xa0 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+0xcb/0x260 mm/slab.c:3815 blk_trace_cleanup kernel/trace/blktrace.c:351 [inline] blk_trace_remove+0x52/0x80 kernel/trace/blktrace.c:364 sg_ioctl+0x22a/0x2620 drivers/scsi/sg.c:1136 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xfe0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8880a67a4d80 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 64 bytes inside of 128-byte region [ffff8880a67a4d80, ffff8880a67a4e00) The buggy address belongs to the page: page:ffffea000299e900 count:1 mapcount:0 mapping:ffff8880a67a4000 index:0xffff8880a67a4c00 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a67a4000 ffff8880a67a4c00 0000000100000014 raw: ffffea00029b8160 ffffea00029b5be0 ffff88812fe56640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a67a4c80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8880a67a4d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff8880a67a4d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a67a4e00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a67a4e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================