[....] Starting enhanced syslogd: rsyslogd[ 12.930083] audit: type=1400 audit(1516103810.101:5): avc: denied { syslog } for pid=3504 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.797697] audit: type=1400 audit(1516103815.969:6): avc: denied { map } for pid=3644 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.15.239' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 40.212642] audit: type=1400 audit(1516103837.384:7): avc: denied { map } for pid=3661 comm="syzkaller032141" path="/root/syzkaller032141126" 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 [ 41.541848] ================================================================== [ 41.549249] BUG: KASAN: use-after-free in disk_unblock_events+0x51/0x60 [ 41.555976] Read of size 8 at addr ffff8801d4f82e40 by task blkid/4168 [ 41.562621] [ 41.564232] CPU: 1 PID: 4168 Comm: blkid Not tainted 4.15.0-rc8+ #263 [ 41.570780] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.580106] Call Trace: [ 41.582673] dump_stack+0x194/0x257 [ 41.587080] ? arch_local_irq_restore+0x53/0x53 [ 41.591735] ? show_regs_print_info+0x18/0x18 [ 41.596212] ? kfree_const+0x31/0x40 [ 41.599905] ? disk_unblock_events+0x51/0x60 [ 41.604293] print_address_description+0x73/0x250 [ 41.609114] ? disk_unblock_events+0x51/0x60 [ 41.613502] kasan_report+0x25b/0x340 [ 41.617283] __asan_report_load8_noabort+0x14/0x20 [ 41.622189] disk_unblock_events+0x51/0x60 [ 41.627195] __blkdev_get+0x869/0x10e0 [ 41.631073] ? __blkdev_put+0x7f0/0x7f0 [ 41.635034] blkdev_get+0x3a1/0xad0 [ 41.640299] ? bd_link_disk_holder+0x8b0/0x8b0 [ 41.646425] ? do_raw_spin_trylock+0x190/0x190 [ 41.652119] ? errseq_sample+0xee/0x140 [ 41.656072] ? _copy_to_user+0xc0/0xc0 [ 41.659942] ? _raw_spin_unlock+0x22/0x30 [ 41.664070] blkdev_open+0x1c9/0x250 [ 41.667771] ? security_file_open+0x89/0x190 [ 41.672169] do_dentry_open+0x667/0xd40 [ 41.676131] ? bd_acquire+0x2c0/0x2c0 [ 41.679922] vfs_open+0x107/0x220 [ 41.683369] path_openat+0x1151/0x3530 [ 41.687247] ? path_lookupat+0xba0/0xba0 [ 41.691289] ? lock_downgrade+0x980/0x980 [ 41.697412] ? do_sys_open+0x2e7/0x6d0 [ 41.701288] ? find_held_lock+0x35/0x1d0 [ 41.705329] ? do_raw_spin_trylock+0x190/0x190 [ 41.709901] ? __lock_is_held+0xb6/0x140 [ 41.713946] ? _find_next_bit+0xee/0x120 [ 41.717993] ? _raw_spin_unlock+0x22/0x30 [ 41.722122] ? __alloc_fd+0x29b/0x750 [ 41.725919] do_filp_open+0x25b/0x3b0 [ 41.729703] ? may_open_dev+0xe0/0xe0 [ 41.733490] ? mpi_resize+0x200/0x200 [ 41.737270] ? get_unused_fd_flags+0x121/0x190 [ 41.742708] ? getname_flags+0x256/0x580 [ 41.746760] do_sys_open+0x502/0x6d0 [ 41.750456] ? do_sys_open+0x502/0x6d0 [ 41.754325] ? filp_open+0x70/0x70 [ 41.757842] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 41.762664] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.768447] SyS_open+0x2d/0x40 [ 41.771881] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 41.776624] RIP: 0033:0x7fc3ad794120 [ 41.780312] RSP: 002b:00007fff61c14658 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 41.789572] RAX: ffffffffffffffda RBX: 00007fc3adc7587c RCX: 00007fc3ad794120 [ 41.797607] RDX: 00007fff61c16f45 RSI: 0000000000000000 RDI: 00007fff61c16f45 [ 41.804861] RBP: 00007fff61c16f3d R08: 0000000000000078 R09: 0000000000000000 [ 41.812374] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000403738 [ 41.819879] R13: 0000000000000001 R14: 0000000000000000 R15: 00007fc3ada6aa20 [ 41.827400] [ 41.829023] Allocated by task 4153: [ 41.832632] save_stack+0x43/0xd0 [ 41.836058] kasan_kmalloc+0xad/0xe0 [ 41.839746] kmem_cache_alloc_node_trace+0x150/0x750 [ 41.845095] __alloc_disk_node+0xb4/0x4e0 [ 41.849218] loop_add+0x44c/0xa70 [ 41.852650] loop_control_ioctl+0x2e9/0x490 [ 41.858339] do_vfs_ioctl+0x1b1/0x1520 [ 41.862386] SyS_ioctl+0x8f/0xc0 [ 41.865728] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 41.870454] [ 41.872053] Freed by task 4168: [ 41.875343] save_stack+0x43/0xd0 [ 41.878776] kasan_slab_free+0x71/0xc0 [ 41.882634] kfree+0xd6/0x260 [ 41.885712] disk_release+0x327/0x410 [ 41.889488] device_release+0x7c/0x210 [ 41.893350] kobject_put+0x14c/0x250 [ 41.897036] put_disk+0x23/0x30 [ 41.900288] __blkdev_get+0x7c9/0x10e0 [ 41.904147] blkdev_get+0x3a1/0xad0 [ 41.909223] blkdev_open+0x1c9/0x250 [ 41.913260] do_dentry_open+0x667/0xd40 [ 41.917209] vfs_open+0x107/0x220 [ 41.920637] path_openat+0x1151/0x3530 [ 41.924497] do_filp_open+0x25b/0x3b0 [ 41.928273] do_sys_open+0x502/0x6d0 [ 41.932229] SyS_open+0x2d/0x40 [ 41.935919] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 41.940644] [ 41.942244] The buggy address belongs to the object at ffff8801d4f828c0 [ 41.942244] which belongs to the cache kmalloc-2048 of size 2048 [ 41.955053] The buggy address is located 1408 bytes inside of [ 41.955053] 2048-byte region [ffff8801d4f828c0, ffff8801d4f830c0) [ 41.967334] The buggy address belongs to the page: [ 41.972248] page:ffffea000753e080 count:1 mapcount:0 mapping:ffff8801d4f82040 index:0x0 compound_mapcount: 0 [ 41.982189] flags: 0x2fffc0000008100(slab|head) [ 41.986831] raw: 02fffc0000008100 ffff8801d4f82040 0000000000000000 0000000100000003 [ 41.994685] raw: ffffea000753e020 ffffea000763c420 ffff8801dac00c40 0000000000000000 [ 42.002715] page dumped because: kasan: bad access detected [ 42.008394] [ 42.009993] Memory state around the buggy address: [ 42.014900] ffff8801d4f82d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.022231] ffff8801d4f82d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.029566] >ffff8801d4f82e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.036900] ^ [ 42.042333] ffff8801d4f82e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.049666] ffff8801d4f82f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.057000] ================================================================== [ 42.064508] Disabling lock debugging due to kernel taint [ 42.070061] Kernel panic - not syncing: panic_on_warn set ... [ 42.070061] [ 42.077399] CPU: 1 PID: 4168 Comm: blkid Tainted: G B 4.15.0-rc8+ #263 [ 42.085261] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.095382] Call Trace: [ 42.097947] dump_stack+0x194/0x257 [ 42.101549] ? arch_local_irq_restore+0x53/0x53 [ 42.106194] ? kasan_end_report+0x32/0x50 [ 42.110327] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.115059] ? vsnprintf+0x1ed/0x1900 [ 42.118846] ? del_gendisk+0x9e0/0xa40 [ 42.122720] panic+0x1e4/0x41c [ 42.125887] ? refcount_error_report+0x214/0x214 [ 42.130634] ? add_taint+0x1c/0x50 [ 42.134429] ? add_taint+0x1c/0x50 [ 42.137943] ? disk_unblock_events+0x51/0x60 [ 42.142324] kasan_end_report+0x50/0x50 [ 42.146271] kasan_report+0x144/0x340 [ 42.150046] __asan_report_load8_noabort+0x14/0x20 [ 42.154951] disk_unblock_events+0x51/0x60 [ 42.159161] __blkdev_get+0x869/0x10e0 [ 42.163205] ? __blkdev_put+0x7f0/0x7f0 [ 42.167159] blkdev_get+0x3a1/0xad0 [ 42.170774] ? bd_link_disk_holder+0x8b0/0x8b0 [ 42.175330] ? do_raw_spin_trylock+0x190/0x190 [ 42.179890] ? errseq_sample+0xee/0x140 [ 42.183837] ? _copy_to_user+0xc0/0xc0 [ 42.187701] ? _raw_spin_unlock+0x22/0x30 [ 42.191824] blkdev_open+0x1c9/0x250 [ 42.196042] ? security_file_open+0x89/0x190 [ 42.200633] do_dentry_open+0x667/0xd40 [ 42.204581] ? bd_acquire+0x2c0/0x2c0 [ 42.208364] vfs_open+0x107/0x220 [ 42.211795] path_openat+0x1151/0x3530 [ 42.215660] ? path_lookupat+0xba0/0xba0 [ 42.219695] ? lock_downgrade+0x980/0x980 [ 42.223812] ? do_sys_open+0x2e7/0x6d0 [ 42.227676] ? find_held_lock+0x35/0x1d0 [ 42.231709] ? do_raw_spin_trylock+0x190/0x190 [ 42.236262] ? __lock_is_held+0xb6/0x140 [ 42.240295] ? _find_next_bit+0xee/0x120 [ 42.244337] ? _raw_spin_unlock+0x22/0x30 [ 42.248465] ? __alloc_fd+0x29b/0x750 [ 42.252245] do_filp_open+0x25b/0x3b0 [ 42.256045] ? may_open_dev+0xe0/0xe0 [ 42.259825] ? mpi_resize+0x200/0x200 [ 42.263604] ? get_unused_fd_flags+0x121/0x190 [ 42.268166] ? getname_flags+0x256/0x580 [ 42.272210] do_sys_open+0x502/0x6d0 [ 42.275898] ? do_sys_open+0x502/0x6d0 [ 42.279759] ? filp_open+0x70/0x70 [ 42.283284] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 42.288102] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.293096] SyS_open+0x2d/0x40 [ 42.296351] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 42.301079] RIP: 0033:0x7fc3ad794120 [ 42.304762] RSP: 002b:00007fff61c14658 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 42.312443] RAX: ffffffffffffffda RBX: 00007fc3adc7587c RCX: 00007fc3ad794120 [ 42.319686] RDX: 00007fff61c16f45 RSI: 0000000000000000 RDI: 00007fff61c16f45 [ 42.326929] RBP: 00007fff61c16f3d R08: 0000000000000078 R09: 0000000000000000 [ 42.334174] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000403738 [ 42.341418] R13: 0000000000000001 R14: 0000000000000000 R15: 00007fc3ada6aa20 [ 42.349338] Dumping ftrace buffer: [ 42.352854] (ftrace buffer empty) [ 42.356553] Kernel Offset: disabled [ 42.360155] Rebooting in 86400 seconds..