[....] Starting enhanced syslogd: rsyslogd[ 11.040159] audit: type=1400 audit(1515949770.834:4): avc: denied { syslog } for pid=3178 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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 Warning: Permanently added '10.128.15.248' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.214085] ================================================================== [ 32.215321] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 32.216253] Read of size 8 at addr ffff8801cd6d4838 by task syzkaller507502/3342 [ 32.217328] [ 32.217582] CPU: 1 PID: 3342 Comm: syzkaller507502 Not tainted 4.9.76-gf0f6293 #22 [ 32.218598] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.219867] ffff8801c7ed7870 ffffffff81d93149 ffffea000735b500 ffff8801cd6d4838 [ 32.221179] 0000000000000000 ffff8801cd6d4838 ffff8801cd6d4838 ffff8801c7ed78a8 [ 32.222402] ffffffff8153cb43 ffff8801cd6d4838 0000000000000008 0000000000000000 [ 32.223634] Call Trace: [ 32.224019] [] dump_stack+0xc1/0x128 [ 32.224741] [] print_address_description+0x73/0x280 [ 32.225631] [] kasan_report+0x275/0x360 [ 32.226398] [] ? __lock_acquire+0x2eff/0x3640 [ 32.227240] [] __asan_report_load8_noabort+0x14/0x20 [ 32.228153] [] __lock_acquire+0x2eff/0x3640 [ 32.228992] [] ? __lock_acquire+0x629/0x3640 [ 32.229806] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.230787] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.231891] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.232837] [] ? mark_held_locks+0xaf/0x100 [ 32.233657] [] ? mutex_lock_nested+0x5e3/0x870 [ 32.236419] [] lock_acquire+0x12e/0x410 [ 32.242020] [] ? remove_wait_queue+0x14/0x40 [ 32.248051] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 32.254342] [] ? remove_wait_queue+0x14/0x40 [ 32.260374] [] remove_wait_queue+0x14/0x40 [ 32.266855] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 32.273857] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 32.281103] [] ? ep_free+0x1b0/0x1b0 [ 32.286446] [] ep_free+0x96/0x1b0 [ 32.291524] [] ? ep_free+0x1b0/0x1b0 [ 32.296858] [] ep_eventpoll_release+0x44/0x60 [ 32.302979] [] __fput+0x28c/0x6e0 [ 32.308069] [] ____fput+0x15/0x20 [ 32.313150] [] task_work_run+0x115/0x190 [ 32.318838] [] do_exit+0x7e7/0x2a40 [ 32.324090] [] ? __pmd_alloc+0x410/0x410 [ 32.329774] [] ? release_task+0x1240/0x1240 [ 32.335718] [] ? __do_page_fault+0x5ec/0xd40 [ 32.341761] [] ? up_read+0x1a/0x40 [ 32.346925] [] ? __do_page_fault+0x3bd/0xd40 [ 32.352957] [] do_group_exit+0x108/0x320 [ 32.358644] [] ? do_group_exit+0x320/0x320 [ 32.364501] [] SyS_exit_group+0x1d/0x20 [ 32.370099] [] do_fast_syscall_32+0x2f7/0x890 [ 32.376214] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.382853] [] entry_SYSENTER_compat+0x74/0x83 [ 32.389052] [ 32.390653] Allocated by task 3342: [ 32.394251] save_stack_trace+0x16/0x20 [ 32.398195] save_stack+0x43/0xd0 [ 32.401622] kasan_kmalloc+0xad/0xe0 [ 32.405305] kmem_cache_alloc_trace+0xfb/0x2a0 [ 32.409860] binder_get_thread+0x15d/0x750 [ 32.414065] binder_poll+0x4a/0x210 [ 32.417677] SyS_epoll_ctl+0x11d7/0x2190 [ 32.421707] do_fast_syscall_32+0x2f7/0x890 [ 32.426000] entry_SYSENTER_compat+0x74/0x83 [ 32.430378] [ 32.431989] Freed by task 3342: [ 32.435236] save_stack_trace+0x16/0x20 [ 32.439184] save_stack+0x43/0xd0 [ 32.442612] kasan_slab_free+0x72/0xc0 [ 32.446471] kfree+0x103/0x300 [ 32.449638] binder_thread_dec_tmpref+0x1cc/0x240 [ 32.454457] binder_thread_release+0x27d/0x540 [ 32.459012] binder_ioctl+0x9c0/0x11b0 [ 32.462873] compat_SyS_ioctl+0x15f/0x2050 [ 32.467078] do_fast_syscall_32+0x2f7/0x890 [ 32.471385] entry_SYSENTER_compat+0x74/0x83 [ 32.475770] [ 32.477368] The buggy address belongs to the object at ffff8801cd6d4780 [ 32.477368] which belongs to the cache kmalloc-512 of size 512 [ 32.490010] The buggy address is located 184 bytes inside of [ 32.490010] 512-byte region [ffff8801cd6d4780, ffff8801cd6d4980) [ 32.501855] The buggy address belongs to the page: [ 32.506759] page:ffffea000735b500 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 32.516937] flags: 0x8000000000004080(slab|head) [ 32.521660] page dumped because: kasan: bad access detected [ 32.527338] [ 32.528937] Memory state around the buggy address: [ 32.533838] ffff8801cd6d4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.541168] ffff8801cd6d4780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.548500] >ffff8801cd6d4800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.555830] ^ [ 32.560993] ffff8801cd6d4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.568336] ffff8801cd6d4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.575667] ================================================================== [ 32.582996] Disabling lock debugging due to kernel taint [ 32.588418] Kernel panic - not syncing: panic_on_warn set ... [ 32.588418] [ 32.595754] CPU: 1 PID: 3342 Comm: syzkaller507502 Tainted: G B 4.9.76-gf0f6293 #22 [ 32.604651] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.613992] ffff8801c7ed77c8 ffffffff81d93149 ffffffff84195c17 ffff8801c7ed78a0 [ 32.621971] 0000000000000000 ffff8801cd6d4838 ffff8801cd6d4838 ffff8801c7ed7890 [ 32.630057] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 32.638035] Call Trace: [ 32.640600] [] dump_stack+0xc1/0x128 [ 32.645937] [] panic+0x1bc/0x3a8 [ 32.650995] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 32.659200] [] ? add_taint+0x40/0x50 [ 32.664537] [] kasan_end_report+0x50/0x50 [ 32.670306] [] kasan_report+0x167/0x360 [ 32.675905] [] ? __lock_acquire+0x2eff/0x3640 [ 32.682032] [] __asan_report_load8_noabort+0x14/0x20 [ 32.688756] [] __lock_acquire+0x2eff/0x3640 [ 32.694709] [] ? __lock_acquire+0x629/0x3640 [ 32.700740] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.707727] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.714725] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.721710] [] ? mark_held_locks+0xaf/0x100 [ 32.727668] [] ? mutex_lock_nested+0x5e3/0x870 [ 32.733873] [] lock_acquire+0x12e/0x410 [ 32.739470] [] ? remove_wait_queue+0x14/0x40 [ 32.745510] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 32.751803] [] ? remove_wait_queue+0x14/0x40 [ 32.757831] [] remove_wait_queue+0x14/0x40 [ 32.763690] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 32.770677] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 32.777932] [] ? ep_free+0x1b0/0x1b0 [ 32.783280] [] ep_free+0x96/0x1b0 [ 32.788365] [] ? ep_free+0x1b0/0x1b0 [ 32.793703] [] ep_eventpoll_release+0x44/0x60 [ 32.799844] [] __fput+0x28c/0x6e0 [ 32.804933] [] ____fput+0x15/0x20 [ 32.810023] [] task_work_run+0x115/0x190 [ 32.815707] [] do_exit+0x7e7/0x2a40 [ 32.820959] [] ? __pmd_alloc+0x410/0x410 [ 32.826652] [] ? release_task+0x1240/0x1240 [ 32.832601] [] ? __do_page_fault+0x5ec/0xd40 [ 32.838634] [] ? up_read+0x1a/0x40 [ 32.843797] [] ? __do_page_fault+0x3bd/0xd40 [ 32.849830] [] do_group_exit+0x108/0x320 [ 32.855512] [] ? do_group_exit+0x320/0x320 [ 32.861383] [] SyS_exit_group+0x1d/0x20 [ 32.866980] [] do_fast_syscall_32+0x2f7/0x890 [ 32.873105] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.879746] [] entry_SYSENTER_compat+0x74/0x83 [ 32.886344] Dumping ftrace buffer: [ 32.889869] (ftrace buffer empty) [ 32.893559] Kernel Offset: disabled [ 32.897167] Rebooting in 86400 seconds..