[....] Starting enhanced syslogd: rsyslogd[ 12.592936] audit: type=1400 audit(1515022645.128:5): avc: denied { syslog } for pid=3345 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 18.657769] audit: type=1400 audit(1515022651.193:6): avc: denied { map } for pid=3485 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added '10.128.0.13' (ECDSA) to the list of known hosts. [ 135.445232] audit: type=1400 audit(1515022767.981:7): avc: denied { map } for pid=3502 comm="syzkaller377330" path="/root/syzkaller377330002" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 137.463844] ================================================================== [ 137.471267] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 137.477995] Read of size 8 at addr ffff8801d5075140 by task syzkaller377330/4029 [ 137.485610] [ 137.487213] CPU: 1 PID: 4029 Comm: syzkaller377330 Not tainted 4.15.0-rc6+ #246 [ 137.494628] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 137.503958] Call Trace: [ 137.506555] dump_stack+0x194/0x257 [ 137.510187] ? arch_local_irq_restore+0x53/0x53 [ 137.514829] ? show_regs_print_info+0x18/0x18 [ 137.519304] ? kfree_const+0x31/0x40 [ 137.522989] ? disk_unblock_events+0x51/0x60 [ 137.527371] print_address_description+0x73/0x250 [ 137.532187] ? disk_unblock_events+0x51/0x60 [ 137.536579] kasan_report+0x25b/0x340 [ 137.540360] __asan_report_load8_noabort+0x14/0x20 [ 137.545267] disk_unblock_events+0x51/0x60 [ 137.549479] __blkdev_get+0x869/0x10e0 [ 137.553360] ? __blkdev_put+0x7f0/0x7f0 [ 137.557316] blkdev_get+0x3a1/0xad0 [ 137.560920] ? bd_link_disk_holder+0x8b0/0x8b0 [ 137.565479] ? do_raw_spin_trylock+0x190/0x190 [ 137.570041] ? errseq_sample+0xee/0x140 [ 137.573992] ? _copy_to_user+0xc0/0xc0 [ 137.577861] ? _raw_spin_unlock+0x22/0x30 [ 137.581984] blkdev_open+0x1c9/0x250 [ 137.585668] ? security_file_open+0x89/0x190 [ 137.590051] do_dentry_open+0x667/0xd40 [ 137.593999] ? bd_acquire+0x2c0/0x2c0 [ 137.597785] vfs_open+0x107/0x220 [ 137.601216] path_openat+0x1151/0x3530 [ 137.605093] ? path_lookupat+0xba0/0xba0 [ 137.609132] ? lock_downgrade+0x980/0x980 [ 137.613248] ? do_sys_open+0x2e7/0x6d0 [ 137.617116] ? find_held_lock+0x35/0x1d0 [ 137.621154] ? do_raw_spin_trylock+0x190/0x190 [ 137.625705] ? __lock_is_held+0xb6/0x140 [ 137.629739] ? _find_next_bit+0xee/0x120 [ 137.633780] ? _raw_spin_unlock+0x22/0x30 [ 137.637901] ? __alloc_fd+0x29b/0x750 [ 137.641690] do_filp_open+0x25b/0x3b0 [ 137.645468] ? may_open_dev+0xe0/0xe0 [ 137.649250] ? mpi_resize+0x200/0x200 [ 137.653030] ? do_vfs_ioctl+0x486/0x1520 [ 137.657065] ? get_unused_fd_flags+0x121/0x190 [ 137.661624] ? getname_flags+0x256/0x580 [ 137.665663] do_sys_open+0x502/0x6d0 [ 137.669353] ? do_sys_open+0x502/0x6d0 [ 137.673223] ? filp_open+0x70/0x70 [ 137.676908] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 137.681735] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 137.686736] SyS_open+0x2d/0x40 [ 137.689999] entry_SYSCALL_64_fastpath+0x23/0x9a [ 137.694732] RIP: 0033:0x405be1 [ 137.697899] RSP: 002b:00007f4b1bc4a820 EFLAGS: 00000293 ORIG_RAX: 0000000000000002 [ 137.705668] RAX: ffffffffffffffda RBX: 00000000006dcc24 RCX: 0000000000405be1 [ 137.712916] RDX: 0000000000000000 RSI: 0000000000044042 RDI: 00007f4b1bc4a8d0 [ 137.720157] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 137.727409] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 [ 137.734656] R13: 00007ffc22e48baf R14: 00007f4b1bc4b9c0 R15: 0000000000000001 [ 137.741927] [ 137.743532] Allocated by task 4017: [ 137.747132] save_stack+0x43/0xd0 [ 137.750554] kasan_kmalloc+0xad/0xe0 [ 137.754236] kmem_cache_alloc_node_trace+0x150/0x750 [ 137.759309] __alloc_disk_node+0xb4/0x4e0 [ 137.763431] loop_add+0x44c/0xa70 [ 137.766850] loop_probe+0x16d/0x1a0 [ 137.770455] kobj_lookup+0x2ac/0x410 [ 137.774137] get_gendisk+0x37/0x2c0 [ 137.777739] __blkdev_get+0x3ea/0x10e0 [ 137.781605] blkdev_get+0x3a1/0xad0 [ 137.785199] blkdev_open+0x1c9/0x250 [ 137.788881] do_dentry_open+0x667/0xd40 [ 137.792824] vfs_open+0x107/0x220 [ 137.796249] path_openat+0x1151/0x3530 [ 137.800113] do_filp_open+0x25b/0x3b0 [ 137.803972] do_sys_open+0x502/0x6d0 [ 137.807656] SyS_open+0x2d/0x40 [ 137.810914] entry_SYSCALL_64_fastpath+0x23/0x9a [ 137.815635] [ 137.817234] Freed by task 4029: [ 137.820481] save_stack+0x43/0xd0 [ 137.823904] kasan_slab_free+0x71/0xc0 [ 137.827765] kfree+0xd6/0x260 [ 137.830848] disk_release+0x327/0x410 [ 137.834626] device_release+0x7c/0x210 [ 137.838489] kobject_put+0x14c/0x250 [ 137.842178] put_disk+0x23/0x30 [ 137.845428] __blkdev_get+0x7c9/0x10e0 [ 137.849286] blkdev_get+0x3a1/0xad0 [ 137.852894] blkdev_open+0x1c9/0x250 [ 137.856574] do_dentry_open+0x667/0xd40 [ 137.860523] vfs_open+0x107/0x220 [ 137.863950] path_openat+0x1151/0x3530 [ 137.867807] do_filp_open+0x25b/0x3b0 [ 137.871575] do_sys_open+0x502/0x6d0 [ 137.875254] SyS_open+0x2d/0x40 [ 137.878501] entry_SYSCALL_64_fastpath+0x23/0x9a [ 137.883488] [ 137.885085] The buggy address belongs to the object at ffff8801d5074bc0 [ 137.885085] which belongs to the cache kmalloc-2048 of size 2048 [ 137.897887] The buggy address is located 1408 bytes inside of [ 137.897887] 2048-byte region [ffff8801d5074bc0, ffff8801d50753c0) [ 137.909902] The buggy address belongs to the page: [ 137.914804] page:00000000b5f4820f count:1 mapcount:0 mapping:0000000084ebf55b index:0x0 compound_mapcount: 0 [ 137.924751] flags: 0x2fffc0000008100(slab|head) [ 137.929393] raw: 02fffc0000008100 ffff8801d5074340 0000000000000000 0000000100000003 [ 137.937249] raw: ffffea0007542720 ffffea000755bb20 ffff8801dac00c40 0000000000000000 [ 137.945097] page dumped because: kasan: bad access detected [ 137.950784] [ 137.952379] Memory state around the buggy address: [ 137.957275] ffff8801d5075000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 137.964622] ffff8801d5075080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 137.971955] >ffff8801d5075100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 137.979292] ^ [ 137.984719] ffff8801d5075180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 137.992057] ffff8801d5075200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 137.999385] ================================================================== [ 138.006723] Disabling lock debugging due to kernel taint [ 138.012282] Kernel panic - not syncing: panic_on_warn set ... [ 138.012282] [ 138.019623] CPU: 1 PID: 4029 Comm: syzkaller377330 Tainted: G B 4.15.0-rc6+ #246 [ 138.028346] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 138.037677] Call Trace: [ 138.040244] dump_stack+0x194/0x257 [ 138.043854] ? arch_local_irq_restore+0x53/0x53 [ 138.048498] ? kasan_end_report+0x32/0x50 [ 138.052617] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 138.057358] ? vsnprintf+0x1ed/0x1900 [ 138.061129] ? disk_unblock_events+0x30/0x60 [ 138.065512] panic+0x1e4/0x41c [ 138.068676] ? refcount_error_report+0x214/0x214 [ 138.073399] ? add_taint+0x1c/0x50 [ 138.076905] ? add_taint+0x1c/0x50 [ 138.080432] ? disk_unblock_events+0x51/0x60 [ 138.084819] kasan_end_report+0x50/0x50 [ 138.088766] kasan_report+0x144/0x340 [ 138.092538] __asan_report_load8_noabort+0x14/0x20 [ 138.097442] disk_unblock_events+0x51/0x60 [ 138.101646] __blkdev_get+0x869/0x10e0 [ 138.105513] ? __blkdev_put+0x7f0/0x7f0 [ 138.109468] blkdev_get+0x3a1/0xad0 [ 138.113067] ? bd_link_disk_holder+0x8b0/0x8b0 [ 138.117616] ? do_raw_spin_trylock+0x190/0x190 [ 138.122172] ? errseq_sample+0xee/0x140 [ 138.126115] ? _copy_to_user+0xc0/0xc0 [ 138.129980] ? _raw_spin_unlock+0x22/0x30 [ 138.134101] blkdev_open+0x1c9/0x250 [ 138.137791] ? security_file_open+0x89/0x190 [ 138.142174] do_dentry_open+0x667/0xd40 [ 138.146121] ? bd_acquire+0x2c0/0x2c0 [ 138.149891] vfs_open+0x107/0x220 [ 138.153316] path_openat+0x1151/0x3530 [ 138.157200] ? path_lookupat+0xba0/0xba0 [ 138.161258] ? lock_downgrade+0x980/0x980 [ 138.165396] ? do_sys_open+0x2e7/0x6d0 [ 138.169282] ? find_held_lock+0x35/0x1d0 [ 138.173346] ? do_raw_spin_trylock+0x190/0x190 [ 138.177917] ? __lock_is_held+0xb6/0x140 [ 138.181968] ? _find_next_bit+0xee/0x120 [ 138.186023] ? _raw_spin_unlock+0x22/0x30 [ 138.190158] ? __alloc_fd+0x29b/0x750 [ 138.193954] do_filp_open+0x25b/0x3b0 [ 138.197752] ? may_open_dev+0xe0/0xe0 [ 138.201553] ? mpi_resize+0x200/0x200 [ 138.205350] ? do_vfs_ioctl+0x486/0x1520 [ 138.209407] ? get_unused_fd_flags+0x121/0x190 [ 138.213991] ? getname_flags+0x256/0x580 [ 138.218061] do_sys_open+0x502/0x6d0 [ 138.221780] ? do_sys_open+0x502/0x6d0 [ 138.225667] ? filp_open+0x70/0x70 [ 138.229201] ? entry_SYSCALL_64_fastpath+0x5/0x9a [ 138.234046] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 138.239064] SyS_open+0x2d/0x40 [ 138.242337] entry_SYSCALL_64_fastpath+0x23/0x9a [ 138.247101] RIP: 0033:0x405be1 [ 138.250277] RSP: 002b:00007f4b1bc4a820 EFLAGS: 00000293 ORIG_RAX: 0000000000000002 [ 138.257976] RAX: ffffffffffffffda RBX: 00000000006dcc24 RCX: 0000000000405be1 [ 138.265236] RDX: 0000000000000000 RSI: 0000000000044042 RDI: 00007f4b1bc4a8d0 [ 138.272501] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 138.279765] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 [ 138.287023] R13: 00007ffc22e48baf R14: 00007f4b1bc4b9c0 R15: 0000000000000001 [ 138.294908] Dumping ftrace buffer: [ 138.298423] (ftrace buffer empty) [ 138.302100] Kernel Offset: disabled [ 138.305693] Rebooting in 86400 seconds..