[....] Starting enhanced syslogd: rsyslogd[ 12.773943] audit: type=1400 audit(1515690259.078:4): avc: denied { syslog } for pid=3173 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.242' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 23.788834] ================================================================== [ 23.796246] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 23.802885] Read of size 8 at addr ffff8801c8b0ad38 by task syzkaller289672/3329 [ 23.810380] [ 23.811975] CPU: 0 PID: 3329 Comm: syzkaller289672 Not tainted 4.9.76-g9154940 #20 [ 23.819654] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.828975] ffff8801c8237870 ffffffff81d93149 ffffea000722c280 ffff8801c8b0ad38 [ 23.836927] 0000000000000000 ffff8801c8b0ad38 ffff8801c8b0ad38 ffff8801c82378a8 [ 23.844872] ffffffff8153cb43 ffff8801c8b0ad38 0000000000000008 0000000000000000 [ 23.853557] Call Trace: [ 23.856126] [] dump_stack+0xc1/0x128 [ 23.861460] [] print_address_description+0x73/0x280 [ 23.868090] [] kasan_report+0x275/0x360 [ 23.873680] [] ? __lock_acquire+0x2eff/0x3640 [ 23.879791] [] __asan_report_load8_noabort+0x14/0x20 [ 23.886509] [] __lock_acquire+0x2eff/0x3640 [ 23.892460] [] ? __lock_acquire+0x629/0x3640 [ 23.898489] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.905469] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.912456] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.919435] [] ? mark_held_locks+0xaf/0x100 [ 23.925375] [] ? mutex_lock_nested+0x5e3/0x870 [ 23.931571] [] lock_acquire+0x12e/0x410 [ 23.937158] [] ? remove_wait_queue+0x14/0x40 [ 23.943184] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 23.949475] [] ? remove_wait_queue+0x14/0x40 [ 23.955508] [] remove_wait_queue+0x14/0x40 [ 23.961368] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 23.968348] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 23.975587] [] ? ep_free+0x1b0/0x1b0 [ 23.980916] [] ep_free+0x96/0x1b0 [ 23.985985] [] ? ep_free+0x1b0/0x1b0 [ 23.991314] [] ep_eventpoll_release+0x44/0x60 [ 23.997437] [] __fput+0x28c/0x6e0 [ 24.002508] [] ____fput+0x15/0x20 [ 24.007576] [] task_work_run+0x115/0x190 [ 24.013252] [] do_exit+0x7e7/0x2a40 [ 24.018494] [] ? __pmd_alloc+0x410/0x410 [ 24.024170] [] ? release_task+0x1240/0x1240 [ 24.030113] [] ? __do_page_fault+0x5ec/0xd40 [ 24.036138] [] ? up_read+0x1a/0x40 [ 24.041294] [] ? __do_page_fault+0x3bd/0xd40 [ 24.047318] [] do_group_exit+0x108/0x320 [ 24.052994] [] ? do_group_exit+0x320/0x320 [ 24.058845] [] SyS_exit_group+0x1d/0x20 [ 24.064966] [] do_fast_syscall_32+0x2f7/0x890 [ 24.071088] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.077724] [] entry_SYSENTER_compat+0x74/0x83 [ 24.083920] [ 24.085517] Allocated by task 3329: [ 24.089110] save_stack_trace+0x16/0x20 [ 24.093051] save_stack+0x43/0xd0 [ 24.096468] kasan_kmalloc+0xad/0xe0 [ 24.100145] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.105332] binder_get_thread+0x15d/0x750 [ 24.110929] binder_poll+0x4a/0x210 [ 24.114523] SyS_epoll_ctl+0x11d7/0x2190 [ 24.118548] do_fast_syscall_32+0x2f7/0x890 [ 24.122837] entry_SYSENTER_compat+0x74/0x83 [ 24.127206] [ 24.128799] Freed by task 3329: [ 24.132043] save_stack_trace+0x16/0x20 [ 24.135984] save_stack+0x43/0xd0 [ 24.139400] kasan_slab_free+0x72/0xc0 [ 24.143253] kfree+0x103/0x300 [ 24.146414] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.151222] binder_thread_release+0x27d/0x540 [ 24.155775] binder_ioctl+0x9c0/0x11b0 [ 24.159628] compat_SyS_ioctl+0x15f/0x2050 [ 24.163827] do_fast_syscall_32+0x2f7/0x890 [ 24.169429] entry_SYSENTER_compat+0x74/0x83 [ 24.174842] [ 24.177567] The buggy address belongs to the object at ffff8801c8b0ac80 [ 24.177567] which belongs to the cache kmalloc-512 of size 512 [ 24.190628] The buggy address is located 184 bytes inside of [ 24.190628] 512-byte region [ffff8801c8b0ac80, ffff8801c8b0ae80) [ 24.202473] The buggy address belongs to the page: [ 24.207367] page:ffffea000722c280 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.217528] flags: 0x8000000000004080(slab|head) [ 24.222272] page dumped because: kasan: bad access detected [ 24.227945] [ 24.229536] Memory state around the buggy address: [ 24.234428] ffff8801c8b0ac00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.241753] ffff8801c8b0ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.249086] >ffff8801c8b0ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.256408] ^ [ 24.261561] ffff8801c8b0ad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.268886] ffff8801c8b0ae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.276216] ================================================================== [ 24.283538] Disabling lock debugging due to kernel taint [ 24.288960] Kernel panic - not syncing: panic_on_warn set ... [ 24.288960] [ 24.296291] CPU: 0 PID: 3329 Comm: syzkaller289672 Tainted: G B 4.9.76-g9154940 #20 [ 24.305179] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.314501] ffff8801c82377c8 ffffffff81d93149 ffffffff84195c17 ffff8801c82378a0 [ 24.322472] 0000000000000000 ffff8801c8b0ad38 ffff8801c8b0ad38 ffff8801c8237890 [ 24.330424] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 24.338380] Call Trace: [ 24.340944] [] dump_stack+0xc1/0x128 [ 24.346274] [] panic+0x1bc/0x3a8 [ 24.351262] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.359461] [] ? add_taint+0x40/0x50 [ 24.364791] [] kasan_end_report+0x50/0x50 [ 24.370551] [] kasan_report+0x167/0x360 [ 24.376142] [] ? __lock_acquire+0x2eff/0x3640 [ 24.382260] [] __asan_report_load8_noabort+0x14/0x20 [ 24.388985] [] __lock_acquire+0x2eff/0x3640 [ 24.394925] [] ? __lock_acquire+0x629/0x3640 [ 24.402689] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.410368] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.417357] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.424434] [] ? mark_held_locks+0xaf/0x100 [ 24.430371] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.436568] [] lock_acquire+0x12e/0x410 [ 24.442156] [] ? remove_wait_queue+0x14/0x40 [ 24.448188] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.454479] [] ? remove_wait_queue+0x14/0x40 [ 24.460505] [] remove_wait_queue+0x14/0x40 [ 24.466358] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.473336] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.480573] [] ? ep_free+0x1b0/0x1b0 [ 24.485904] [] ep_free+0x96/0x1b0 [ 24.490970] [] ? ep_free+0x1b0/0x1b0 [ 24.496301] [] ep_eventpoll_release+0x44/0x60 [ 24.502413] [] __fput+0x28c/0x6e0 [ 24.507493] [] ____fput+0x15/0x20 [ 24.512560] [] task_work_run+0x115/0x190 [ 24.518236] [] do_exit+0x7e7/0x2a40 [ 24.523479] [] ? __pmd_alloc+0x410/0x410 [ 24.529154] [] ? release_task+0x1240/0x1240 [ 24.535093] [] ? __do_page_fault+0x5ec/0xd40 [ 24.541116] [] ? up_read+0x1a/0x40 [ 24.546271] [] ? __do_page_fault+0x3bd/0xd40 [ 24.552298] [] do_group_exit+0x108/0x320 [ 24.557974] [] ? do_group_exit+0x320/0x320 [ 24.563824] [] SyS_exit_group+0x1d/0x20 [ 24.569424] [] do_fast_syscall_32+0x2f7/0x890 [ 24.575534] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 24.582169] [] entry_SYSENTER_compat+0x74/0x83 [ 24.588837] Dumping ftrace buffer: [ 24.592354] (ftrace buffer empty) [ 24.596036] Kernel Offset: disabled [ 24.599629] Rebooting in 86400 seconds..