[....] Starting enhanced syslogd: rsyslogd[ 13.037536] audit: type=1400 audit(1515542269.371: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.234' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 23.964208] ================================================================== [ 23.971615] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 23.978253] Read of size 8 at addr ffff8801ccc2cd38 by task syzkaller115768/3324 [ 23.985760] [ 23.987446] CPU: 0 PID: 3324 Comm: syzkaller115768 Not tainted 4.9.75-g8910fa5 #19 [ 23.995117] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.004468] ffff8801c90df870 ffffffff81d93049 ffffea0007330b00 ffff8801ccc2cd38 [ 24.012416] 0000000000000000 ffff8801ccc2cd38 ffff8801ccc2cd38 ffff8801c90df8a8 [ 24.020372] ffffffff8153ca53 ffff8801ccc2cd38 0000000000000008 0000000000000000 [ 24.028339] Call Trace: [ 24.030902] [] dump_stack+0xc1/0x128 [ 24.036241] [] print_address_description+0x73/0x280 [ 24.042891] [] kasan_report+0x275/0x360 [ 24.048483] [] ? __lock_acquire+0x2eff/0x3640 [ 24.054595] [] __asan_report_load8_noabort+0x14/0x20 [ 24.061316] [] __lock_acquire+0x2eff/0x3640 [ 24.067257] [] ? __lock_acquire+0x629/0x3640 [ 24.073285] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.080264] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.087243] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.094226] [] ? mark_held_locks+0xaf/0x100 [ 24.100164] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.106366] [] lock_acquire+0x12e/0x410 [ 24.111959] [] ? remove_wait_queue+0x14/0x40 [ 24.117983] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.124266] [] ? remove_wait_queue+0x14/0x40 [ 24.130288] [] remove_wait_queue+0x14/0x40 [ 24.136141] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.143121] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.150370] [] ? ep_free+0x1b0/0x1b0 [ 24.155699] [] ep_free+0x96/0x1b0 [ 24.160767] [] ? ep_free+0x1b0/0x1b0 [ 24.166097] [] ep_eventpoll_release+0x44/0x60 [ 24.172209] [] __fput+0x28c/0x6e0 [ 24.177276] [] ____fput+0x15/0x20 [ 24.182367] [] task_work_run+0x115/0x190 [ 24.188050] [] do_exit+0x7e7/0x2a40 [ 24.193299] [] ? __pmd_alloc+0x410/0x410 [ 24.198974] [] ? release_task+0x1240/0x1240 [ 24.204923] [] ? __do_page_fault+0x5ec/0xd40 [ 24.210952] [] ? up_read+0x1a/0x40 [ 24.216107] [] ? __do_page_fault+0x3bd/0xd40 [ 24.222131] [] do_group_exit+0x108/0x320 [ 24.227805] [] ? do_group_exit+0x320/0x320 [ 24.233654] [] SyS_exit_group+0x1d/0x20 [ 24.239244] [] do_fast_syscall_32+0x2f7/0x890 [ 24.245354] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.251988] [] entry_SYSENTER_compat+0x74/0x83 [ 24.258182] [ 24.259785] Allocated by task 3324: [ 24.263381] save_stack_trace+0x16/0x20 [ 24.267322] save_stack+0x43/0xd0 [ 24.270740] kasan_kmalloc+0xad/0xe0 [ 24.274418] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.278967] binder_get_thread+0x15d/0x750 [ 24.283166] binder_poll+0x4a/0x210 [ 24.286761] SyS_epoll_ctl+0x11d7/0x2190 [ 24.290787] do_fast_syscall_32+0x2f7/0x890 [ 24.295076] entry_SYSENTER_compat+0x74/0x83 [ 24.299453] [ 24.301047] Freed by task 3324: [ 24.304297] save_stack_trace+0x16/0x20 [ 24.308237] save_stack+0x43/0xd0 [ 24.311653] kasan_slab_free+0x72/0xc0 [ 24.315503] kfree+0x103/0x300 [ 24.318664] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.323473] binder_thread_release+0x27d/0x540 [ 24.328455] binder_ioctl+0x9c0/0x11b0 [ 24.332308] compat_SyS_ioctl+0x15f/0x2050 [ 24.336507] do_fast_syscall_32+0x2f7/0x890 [ 24.340794] entry_SYSENTER_compat+0x74/0x83 [ 24.345162] [ 24.346753] The buggy address belongs to the object at ffff8801ccc2cc80 [ 24.346753] which belongs to the cache kmalloc-512 of size 512 [ 24.359374] The buggy address is located 184 bytes inside of [ 24.359374] 512-byte region [ffff8801ccc2cc80, ffff8801ccc2ce80) [ 24.371212] The buggy address belongs to the page: [ 24.376106] page:ffffea0007330b00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.386282] flags: 0x8000000000004080(slab|head) [ 24.391000] page dumped because: kasan: bad access detected [ 24.396672] [ 24.398264] Memory state around the buggy address: [ 24.403168] ffff8801ccc2cc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.410506] ffff8801ccc2cc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.417835] >ffff8801ccc2cd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.425162] ^ [ 24.430315] ffff8801ccc2cd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.437645] ffff8801ccc2ce00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.444967] ================================================================== [ 24.452297] Disabling lock debugging due to kernel taint [ 24.457710] Kernel panic - not syncing: panic_on_warn set ... [ 24.457710] [ 24.465038] CPU: 0 PID: 3324 Comm: syzkaller115768 Tainted: G B 4.9.75-g8910fa5 #19 [ 24.473926] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.483256] ffff8801c90df7c8 ffffffff81d93049 ffffffff84195be7 ffff8801c90df8a0 [ 24.491204] 0000000000000000 ffff8801ccc2cd38 ffff8801ccc2cd38 ffff8801c90df890 [ 24.499153] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 24.507109] Call Trace: [ 24.509667] [] dump_stack+0xc1/0x128 [ 24.514997] [] panic+0x1bc/0x3a8 [ 24.519976] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.528175] [] ? add_taint+0x40/0x50 [ 24.533506] [] kasan_end_report+0x50/0x50 [ 24.539266] [] kasan_report+0x167/0x360 [ 24.544870] [] ? __lock_acquire+0x2eff/0x3640 [ 24.550981] [] __asan_report_load8_noabort+0x14/0x20 [ 24.557696] [] __lock_acquire+0x2eff/0x3640 [ 24.563632] [] ? __lock_acquire+0x629/0x3640 [ 24.569656] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.576635] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.584314] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.591295] [] ? mark_held_locks+0xaf/0x100 [ 24.597235] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.603430] [] lock_acquire+0x12e/0x410 [ 24.609018] [] ? remove_wait_queue+0x14/0x40 [ 24.615043] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.621325] [] ? remove_wait_queue+0x14/0x40 [ 24.627346] [] remove_wait_queue+0x14/0x40 [ 24.633199] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.640183] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.647421] [] ? ep_free+0x1b0/0x1b0 [ 24.652749] [] ep_free+0x96/0x1b0 [ 24.657816] [] ? ep_free+0x1b0/0x1b0 [ 24.663144] [] ep_eventpoll_release+0x44/0x60 [ 24.669253] [] __fput+0x28c/0x6e0 [ 24.674322] [] ____fput+0x15/0x20 [ 24.679392] [] task_work_run+0x115/0x190 [ 24.685068] [] do_exit+0x7e7/0x2a40 [ 24.690324] [] ? __pmd_alloc+0x410/0x410 [ 24.696002] [] ? release_task+0x1240/0x1240 [ 24.701942] [] ? __do_page_fault+0x5ec/0xd40 [ 24.707966] [] ? up_read+0x1a/0x40 [ 24.713123] [] ? __do_page_fault+0x3bd/0xd40 [ 24.719146] [] do_group_exit+0x108/0x320 [ 24.724823] [] ? do_group_exit+0x320/0x320 [ 24.730674] [] SyS_exit_group+0x1d/0x20 [ 24.736265] [] do_fast_syscall_32+0x2f7/0x890 [ 24.742375] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.749005] [] entry_SYSENTER_compat+0x74/0x83 [ 24.755685] Dumping ftrace buffer: [ 24.759191] (ftrace buffer empty) [ 24.762867] Kernel Offset: disabled [ 24.766457] Rebooting in 86400 seconds..