[....] Starting enhanced syslogd: rsyslogd[ 11.017902] audit: type=1400 audit(1514062337.355:5): avc: denied { syslog } for pid=2988 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: [ 16.310040] audit: type=1400 audit(1514062342.647:6): avc: denied { map } for pid=3129 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 'ci-upstream-mmots-kasan-gce-2,10.128.0.2' (ECDSA) to the list of known hosts. executing program [ 22.685751] audit: type=1400 audit(1514062349.023:7): avc: denied { map } for pid=3143 comm="syzkaller060178" path="/root/syzkaller060178545" 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 [ 22.689982] ================================================================== [ 22.689996] BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 [ 22.690005] Read of size 8 at addr ffff8801cee5f678 by task syzkaller060178/3143 [ 22.690007] [ 22.690014] CPU: 1 PID: 3143 Comm: syzkaller060178 Not tainted 4.15.0-rc4-mm1+ #49 [ 22.690017] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.690019] Call Trace: [ 22.690027] dump_stack+0x194/0x257 [ 22.690035] ? arch_local_irq_restore+0x53/0x53 [ 22.690042] ? show_regs_print_info+0x18/0x18 [ 22.690048] ? print_irqtrace_events+0x270/0x270 [ 22.690054] ? __lock_acquire+0x664/0x3e00 [ 22.690061] ? __lock_acquire+0x3d4d/0x3e00 [ 22.690070] print_address_description+0x73/0x250 [ 22.690076] ? __lock_acquire+0x3d4d/0x3e00 [ 22.690082] kasan_report+0x23b/0x360 [ 22.690090] __asan_report_load8_noabort+0x14/0x20 [ 22.690096] __lock_acquire+0x3d4d/0x3e00 [ 22.690101] ? __lock_acquire+0x664/0x3e00 [ 22.690107] ? lock_downgrade+0x980/0x980 [ 22.690112] ? lock_downgrade+0x980/0x980 [ 22.690121] ? remove_wait_queue+0x81/0x350 [ 22.690130] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.690137] ? __lock_acquire+0x664/0x3e00 [ 22.690142] ? check_noncircular+0x20/0x20 [ 22.690155] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.690162] ? lock_acquire+0x1d5/0x580 [ 22.690167] ? lock_acquire+0x1d5/0x580 [ 22.690174] ? ep_free+0xf4/0x320 [ 22.690182] ? lock_release+0xa40/0xa40 [ 22.690190] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.690196] ? print_irqtrace_events+0x270/0x270 [ 22.690203] ? rcu_note_context_switch+0x710/0x710 [ 22.690211] ? __might_sleep+0x95/0x190 [ 22.690217] ? ep_free+0xf4/0x320 [ 22.690222] ? __mutex_lock+0x16f/0x1a80 [ 22.690227] ? ep_free+0xf4/0x320 [ 22.690234] ? print_irqtrace_events+0x270/0x270 [ 22.690239] ? ep_free+0xf4/0x320 [ 22.690247] lock_acquire+0x1d5/0x580 [ 22.690252] ? lock_acquire+0x1d5/0x580 [ 22.690258] ? remove_wait_queue+0x81/0x350 [ 22.690264] ? __lock_acquire+0x664/0x3e00 [ 22.690272] ? lock_release+0xa40/0xa40 [ 22.690281] ? lock_acquire+0x1d5/0x580 [ 22.690286] ? lock_acquire+0x1d5/0x580 [ 22.690293] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.690300] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.690306] ? remove_wait_queue+0x81/0x350 [ 22.690312] remove_wait_queue+0x81/0x350 [ 22.690320] ? add_wait_queue+0x290/0x290 [ 22.690326] ? rcutorture_record_progress+0x10/0x10 [ 22.690335] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.690343] ? __kernel_text_address+0xd/0x40 [ 22.690351] ? clear_tfile_check_list+0x370/0x370 [ 22.690358] ? check_noncircular+0x20/0x20 [ 22.690367] ? locks_remove_file+0x3fa/0x5a0 [ 22.690380] ep_free+0x13f/0x320 [ 22.690386] ? ep_remove+0x800/0x800 [ 22.690392] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.690399] ? ep_free+0x320/0x320 [ 22.690405] ep_eventpoll_release+0x44/0x60 [ 22.690411] __fput+0x327/0x7e0 [ 22.690420] ? fput+0x140/0x140 [ 22.690426] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.690435] ____fput+0x15/0x20 [ 22.690441] task_work_run+0x199/0x270 [ 22.690449] ? task_work_cancel+0x210/0x210 [ 22.690455] ? _raw_spin_unlock+0x22/0x30 [ 22.690461] ? switch_task_namespaces+0x87/0xc0 [ 22.690469] do_exit+0x9bb/0x1ad0 [ 22.690478] ? binder_ioctl+0x551/0x1417 [ 22.690484] ? mm_update_next_owner+0x930/0x930 [ 22.690492] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.690502] ? avc_ss_reset+0x110/0x110 [ 22.690509] ? mutex_unlock+0xd/0x10 [ 22.690515] ? SyS_epoll_ctl+0x30a/0x1a80 [ 22.690535] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.690540] ? up_read+0x1a/0x40 [ 22.690547] ? rcu_note_context_switch+0x710/0x710 [ 22.690552] ? __fd_install+0x288/0x740 [ 22.690561] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.690568] ? do_vfs_ioctl+0x486/0x1520 [ 22.690573] ? _cond_resched+0x14/0x30 [ 22.690581] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.690588] ? selinux_capable+0x40/0x40 [ 22.690595] ? __alloc_fd+0x750/0x750 [ 22.690603] do_group_exit+0x149/0x400 [ 22.690610] ? SyS_exit+0x30/0x30 [ 22.690617] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.690624] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.690632] SyS_exit_group+0x1d/0x20 [ 22.690638] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.690642] RIP: 0033:0x4429f8 [ 22.690646] RSP: 002b:00007ffe62d39828 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.690652] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.690655] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.690659] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.690662] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.690665] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.690673] [ 22.690676] Allocated by task 3143: [ 22.690682] save_stack+0x43/0xd0 [ 22.690687] kasan_kmalloc+0xad/0xe0 [ 22.690692] kmem_cache_alloc_trace+0x136/0x750 [ 22.690696] binder_get_thread+0x1cf/0x870 [ 22.690701] binder_poll+0x8c/0x390 [ 22.690706] ep_item_poll.isra.10+0xf2/0x320 [ 22.690710] ep_insert+0x6a2/0x1ac0 [ 22.690715] SyS_epoll_ctl+0x12bf/0x1a80 [ 22.690720] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.690721] [ 22.690723] Freed by task 3143: [ 22.690728] save_stack+0x43/0xd0 [ 22.690733] kasan_slab_free+0x71/0xc0 [ 22.690737] kfree+0xd6/0x260 [ 22.690741] binder_thread_dec_tmpref+0x27f/0x310 [ 22.690746] binder_thread_release+0x27d/0x540 [ 22.690750] binder_ioctl+0xc02/0x1417 [ 22.690754] do_vfs_ioctl+0x1b1/0x1520 [ 22.690758] SyS_ioctl+0x8f/0xc0 [ 22.690763] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.690764] [ 22.690768] The buggy address belongs to the object at ffff8801cee5f5c0 [ 22.690768] which belongs to the cache kmalloc-512 of size 512 [ 22.690773] The buggy address is located 184 bytes inside of [ 22.690773] 512-byte region [ffff8801cee5f5c0, ffff8801cee5f7c0) [ 22.690775] The buggy address belongs to the page: [ 22.690780] page:ffffea00073b97c0 count:1 mapcount:0 mapping:ffff8801cee5f0c0 index:0xffff8801cee5fd40 [ 22.690785] flags: 0x2fffc0000000100(slab) [ 22.690794] raw: 02fffc0000000100 ffff8801cee5f0c0 ffff8801cee5fd40 0000000100000003 [ 22.690800] raw: ffffea00073b98a0 ffffea00073b9760 ffff8801dac00940 0000000000000000 [ 22.690803] page dumped because: kasan: bad access detected [ 22.690804] [ 22.690805] Memory state around the buggy address: [ 22.690810] ffff8801cee5f500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 22.690814] ffff8801cee5f580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 22.690819] >ffff8801cee5f600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.690821] ^ [ 22.690825] ffff8801cee5f680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.690830] ffff8801cee5f700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.690831] ================================================================== [ 22.690833] Disabling lock debugging due to kernel taint [ 22.690837] Kernel panic - not syncing: panic_on_warn set ... [ 22.690837] [ 22.690843] CPU: 1 PID: 3143 Comm: syzkaller060178 Tainted: G B 4.15.0-rc4-mm1+ #49 [ 22.690846] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.690848] Call Trace: [ 22.690853] dump_stack+0x194/0x257 [ 22.690860] ? arch_local_irq_restore+0x53/0x53 [ 22.690865] ? kasan_end_report+0x32/0x50 [ 22.690872] ? lock_downgrade+0x980/0x980 [ 22.690877] ? vsnprintf+0x1ed/0x1900 [ 22.690883] ? __lock_acquire+0x3c90/0x3e00 [ 22.690888] panic+0x1e4/0x41c [ 22.690894] ? refcount_error_report+0x214/0x214 [ 22.690901] ? add_taint+0x40/0x50 [ 22.690906] ? add_taint+0x1c/0x50 [ 22.690913] ? __lock_acquire+0x3d4d/0x3e00 [ 22.690919] kasan_end_report+0x50/0x50 [ 22.690924] kasan_report+0x148/0x360 [ 22.690932] __asan_report_load8_noabort+0x14/0x20 [ 22.690938] __lock_acquire+0x3d4d/0x3e00 [ 22.690943] ? __lock_acquire+0x664/0x3e00 [ 22.690949] ? lock_downgrade+0x980/0x980 [ 22.690954] ? lock_downgrade+0x980/0x980 [ 22.690961] ? remove_wait_queue+0x81/0x350 [ 22.690970] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.690977] ? __lock_acquire+0x664/0x3e00 [ 22.690982] ? check_noncircular+0x20/0x20 [ 22.690994] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.691001] ? lock_acquire+0x1d5/0x580 [ 22.691006] ? lock_acquire+0x1d5/0x580 [ 22.691011] ? ep_free+0xf4/0x320 [ 22.691019] ? lock_release+0xa40/0xa40 [ 22.691025] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.691031] ? print_irqtrace_events+0x270/0x270 [ 22.691037] ? rcu_note_context_switch+0x710/0x710 [ 22.691044] ? __might_sleep+0x95/0x190 [ 22.691050] ? ep_free+0xf4/0x320 [ 22.691055] ? __mutex_lock+0x16f/0x1a80 [ 22.691060] ? ep_free+0xf4/0x320 [ 22.691067] ? print_irqtrace_events+0x270/0x270 [ 22.691072] ? ep_free+0xf4/0x320 [ 22.691080] lock_acquire+0x1d5/0x580 [ 22.691085] ? lock_acquire+0x1d5/0x580 [ 22.691091] ? remove_wait_queue+0x81/0x350 [ 22.691096] ? __lock_acquire+0x664/0x3e00 [ 22.691103] ? lock_release+0xa40/0xa40 [ 22.691112] ? lock_acquire+0x1d5/0x580 [ 22.691117] ? lock_acquire+0x1d5/0x580 [ 22.691124] ? ep_unregister_pollwait.isra.7+0x323/0x590 [ 22.691131] _raw_spin_lock_irqsave+0x96/0xc0 [ 22.691136] ? remove_wait_queue+0x81/0x350 [ 22.691143] remove_wait_queue+0x81/0x350 [ 22.691150] ? add_wait_queue+0x290/0x290 [ 22.691156] ? rcutorture_record_progress+0x10/0x10 [ 22.691165] ep_unregister_pollwait.isra.7+0x18c/0x590 [ 22.691172] ? __kernel_text_address+0xd/0x40 [ 22.691179] ? clear_tfile_check_list+0x370/0x370 [ 22.691186] ? check_noncircular+0x20/0x20 [ 22.691194] ? locks_remove_file+0x3fa/0x5a0 [ 22.691203] ep_free+0x13f/0x320 [ 22.691209] ? ep_remove+0x800/0x800 [ 22.691214] ? fsnotify_first_mark+0x2b0/0x2b0 [ 22.691222] ? ep_free+0x320/0x320 [ 22.691228] ep_eventpoll_release+0x44/0x60 [ 22.691233] __fput+0x327/0x7e0 [ 22.691241] ? fput+0x140/0x140 [ 22.691248] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.691255] ____fput+0x15/0x20 [ 22.691262] task_work_run+0x199/0x270 [ 22.691269] ? task_work_cancel+0x210/0x210 [ 22.691275] ? _raw_spin_unlock+0x22/0x30 [ 22.691281] ? switch_task_namespaces+0x87/0xc0 [ 22.691288] do_exit+0x9bb/0x1ad0 [ 22.691295] ? binder_ioctl+0x551/0x1417 [ 22.691301] ? mm_update_next_owner+0x930/0x930 [ 22.691309] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.691317] ? avc_ss_reset+0x110/0x110 [ 22.691322] ? mutex_unlock+0xd/0x10 [ 22.691328] ? SyS_epoll_ctl+0x30a/0x1a80 [ 22.691346] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 22.691350] ? up_read+0x1a/0x40 [ 22.691357] ? rcu_note_context_switch+0x710/0x710 [ 22.691361] ? __fd_install+0x288/0x740 [ 22.691370] ? binder_ioctl_write_read.isra.38+0xcb0/0xcb0 [ 22.691378] ? do_vfs_ioctl+0x486/0x1520 [ 22.691384] ? _cond_resched+0x14/0x30 [ 22.691391] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.691398] ? selinux_capable+0x40/0x40 [ 22.691404] ? __alloc_fd+0x750/0x750 [ 22.691412] do_group_exit+0x149/0x400 [ 22.691419] ? SyS_exit+0x30/0x30 [ 22.691425] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.691431] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.691439] SyS_exit_group+0x1d/0x20 [ 22.691445] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 22.691448] RIP: 0033:0x4429f8 [ 22.691451] RSP: 002b:00007ffe62d39828 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.691457] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 00000000004429f8 [ 22.691460] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.691463] RBP: 00000000006ce018 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.691467] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40 [ 22.691470] R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 [ 22.712004] Dumping ftrace buffer: [ 22.712008] (ftrace buffer empty) [ 22.712011] Kernel Offset: disabled [ 23.838222] Rebooting in 86400 seconds..