[....] Starting enhanced syslogd: rsyslogd[ 10.289136] audit: type=1400 audit(1515279516.215:4): avc: denied { syslog } for pid=3168 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 Warning: Permanently added '10.128.15.202' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.021413] ================================================================== [ 19.022512] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.023387] Read of size 8 at addr ffff8801cd1ddc38 by task syzkaller153799/3323 [ 19.024370] [ 19.024600] CPU: 1 PID: 3323 Comm: syzkaller153799 Not tainted 4.9.75-g06fe41f #16 [ 19.025608] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.026827] ffff8801c862f870 ffffffff81d93049 ffffea0007347700 ffff8801cd1ddc38 [ 19.027976] 0000000000000000 ffff8801cd1ddc38 ffff8801cd1ddc38 ffff8801c862f8a8 [ 19.029118] ffffffff8153ca53 ffff8801cd1ddc38 0000000000000008 0000000000000000 [ 19.030247] Call Trace: [ 19.030605] [] dump_stack+0xc1/0x128 [ 19.031337] [] print_address_description+0x73/0x280 [ 19.032212] [] kasan_report+0x275/0x360 [ 19.032998] [] ? __lock_acquire+0x2eff/0x3640 [ 19.033807] [] __asan_report_load8_noabort+0x14/0x20 [ 19.034706] [] __lock_acquire+0x2eff/0x3640 [ 19.035492] [] ? __lock_acquire+0x629/0x3640 [ 19.036293] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.037216] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.038158] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.039083] [] ? mark_held_locks+0xaf/0x100 [ 19.039872] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.040698] [] lock_acquire+0x12e/0x410 [ 19.041457] [] ? remove_wait_queue+0x14/0x40 [ 19.042254] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.048810] [] ? remove_wait_queue+0x14/0x40 [ 19.056751] [] remove_wait_queue+0x14/0x40 [ 19.064524] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.073786] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.081910] [] ? ep_free+0x1b0/0x1b0 [ 19.087239] [] ep_free+0x96/0x1b0 [ 19.092311] [] ? ep_free+0x1b0/0x1b0 [ 19.097643] [] ep_eventpoll_release+0x44/0x60 [ 19.103753] [] __fput+0x28c/0x6e0 [ 19.108821] [] ____fput+0x15/0x20 [ 19.113888] [] task_work_run+0x115/0x190 [ 19.119563] [] do_exit+0x7e7/0x2a40 [ 19.124804] [] ? __pmd_alloc+0x410/0x410 [ 19.130480] [] ? release_task+0x1240/0x1240 [ 19.136417] [] ? __do_page_fault+0x5ec/0xd40 [ 19.142440] [] ? up_read+0x1a/0x40 [ 19.147605] [] ? __do_page_fault+0x3bd/0xd40 [ 19.153629] [] do_group_exit+0x108/0x320 [ 19.159305] [] ? do_group_exit+0x320/0x320 [ 19.165158] [] SyS_exit_group+0x1d/0x20 [ 19.170761] [] do_fast_syscall_32+0x2f7/0x890 [ 19.176882] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.183526] [] entry_SYSENTER_compat+0x74/0x83 [ 19.189726] [ 19.191322] Allocated by task 3323: [ 19.194918] save_stack_trace+0x16/0x20 [ 19.198857] save_stack+0x43/0xd0 [ 19.202275] kasan_kmalloc+0xad/0xe0 [ 19.205952] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.210500] binder_get_thread+0x15d/0x750 [ 19.214698] binder_poll+0x4a/0x210 [ 19.218289] SyS_epoll_ctl+0x11d7/0x2190 [ 19.222315] do_fast_syscall_32+0x2f7/0x890 [ 19.226609] entry_SYSENTER_compat+0x74/0x83 [ 19.230980] [ 19.232573] Freed by task 3323: [ 19.235819] save_stack_trace+0x16/0x20 [ 19.239762] save_stack+0x43/0xd0 [ 19.243191] kasan_slab_free+0x72/0xc0 [ 19.247041] kfree+0x103/0x300 [ 19.250207] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.255016] binder_thread_release+0x27d/0x540 [ 19.259565] binder_ioctl+0x9c0/0x11b0 [ 19.263417] compat_SyS_ioctl+0x15f/0x2050 [ 19.267635] do_fast_syscall_32+0x2f7/0x890 [ 19.271919] entry_SYSENTER_compat+0x74/0x83 [ 19.276299] [ 19.277893] The buggy address belongs to the object at ffff8801cd1ddb80 [ 19.277893] which belongs to the cache kmalloc-512 of size 512 [ 19.290523] The buggy address is located 184 bytes inside of [ 19.290523] 512-byte region [ffff8801cd1ddb80, ffff8801cd1ddd80) [ 19.302368] The buggy address belongs to the page: [ 19.307262] page:ffffea0007347700 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.317413] flags: 0x8000000000004080(slab|head) [ 19.322130] page dumped because: kasan: bad access detected [ 19.327807] [ 19.329401] Memory state around the buggy address: [ 19.334297] ffff8801cd1ddb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.341623] ffff8801cd1ddb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.348952] >ffff8801cd1ddc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.356277] ^ [ 19.361434] ffff8801cd1ddc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.368761] ffff8801cd1ddd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.376086] ================================================================== [ 19.383412] Disabling lock debugging due to kernel taint [ 19.388823] Kernel panic - not syncing: panic_on_warn set ... [ 19.388823] [ 19.396153] CPU: 1 PID: 3323 Comm: syzkaller153799 Tainted: G B 4.9.75-g06fe41f #16 [ 19.405047] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.414372] ffff8801c862f7c8 ffffffff81d93049 ffffffff84195be7 ffff8801c862f8a0 [ 19.422323] 0000000000000000 ffff8801cd1ddc38 ffff8801cd1ddc38 ffff8801c862f890 [ 19.430283] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 19.438254] Call Trace: [ 19.440809] [] dump_stack+0xc1/0x128 [ 19.446136] [] panic+0x1bc/0x3a8 [ 19.451122] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.459315] [] ? add_taint+0x40/0x50 [ 19.464643] [] kasan_end_report+0x50/0x50 [ 19.470420] [] kasan_report+0x167/0x360 [ 19.476030] [] ? __lock_acquire+0x2eff/0x3640 [ 19.482150] [] __asan_report_load8_noabort+0x14/0x20 [ 19.488871] [] __lock_acquire+0x2eff/0x3640 [ 19.494808] [] ? __lock_acquire+0x629/0x3640 [ 19.500846] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.507833] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.514831] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.521821] [] ? mark_held_locks+0xaf/0x100 [ 19.527774] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.533976] [] lock_acquire+0x12e/0x410 [ 19.539565] [] ? remove_wait_queue+0x14/0x40 [ 19.545590] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.551873] [] ? remove_wait_queue+0x14/0x40 [ 19.557894] [] remove_wait_queue+0x14/0x40 [ 19.563746] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.570731] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.577969] [] ? ep_free+0x1b0/0x1b0 [ 19.583295] [] ep_free+0x96/0x1b0 [ 19.588361] [] ? ep_free+0x1b0/0x1b0 [ 19.593688] [] ep_eventpoll_release+0x44/0x60 [ 19.599801] [] __fput+0x28c/0x6e0 [ 19.604874] [] ____fput+0x15/0x20 [ 19.609950] [] task_work_run+0x115/0x190 [ 19.615624] [] do_exit+0x7e7/0x2a40 [ 19.620865] [] ? __pmd_alloc+0x410/0x410 [ 19.626543] [] ? release_task+0x1240/0x1240 [ 19.632478] [] ? __do_page_fault+0x5ec/0xd40 [ 19.638504] [] ? up_read+0x1a/0x40 [ 19.643665] [] ? __do_page_fault+0x3bd/0xd40 [ 19.649698] [] do_group_exit+0x108/0x320 [ 19.655374] [] ? do_group_exit+0x320/0x320 [ 19.661236] [] SyS_exit_group+0x1d/0x20 [ 19.666824] [] do_fast_syscall_32+0x2f7/0x890 [ 19.672931] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.679561] [] entry_SYSENTER_compat+0x74/0x83 [ 19.686134] Dumping ftrace buffer: [ 19.689644] (ftrace buffer empty) [ 19.693319] Kernel Offset: disabled [ 19.696909] Rebooting in 86400 seconds..