[....] Starting enhanced syslogd: rsyslogd[ 11.217377] audit: type=1400 audit(1515459830.359:4): avc: denied { syslog } for pid=3169 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.0.56' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.968043] ================================================================== [ 24.969204] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.970103] Read of size 8 at addr ffff8801c9e9d738 by task syzkaller019605/3325 [ 24.971124] [ 24.971356] CPU: 1 PID: 3325 Comm: syzkaller019605 Not tainted 4.9.75-gb54d99a #18 [ 24.972364] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.973633] ffff8801c845f870 ffffffff81d93049 ffffea000727a700 ffff8801c9e9d738 [ 24.974843] 0000000000000000 ffff8801c9e9d738 ffff8801c9e9d738 ffff8801c845f8a8 [ 24.975972] ffffffff8153ca53 ffff8801c9e9d738 0000000000000008 0000000000000000 [ 24.977128] Call Trace: [ 24.977498] [] dump_stack+0xc1/0x128 [ 24.978226] [] print_address_description+0x73/0x280 [ 24.979103] [] kasan_report+0x275/0x360 [ 24.979846] [] ? __lock_acquire+0x2eff/0x3640 [ 24.980656] [] __asan_report_load8_noabort+0x14/0x20 [ 24.981543] [] __lock_acquire+0x2eff/0x3640 [ 24.982347] [] ? __lock_acquire+0x629/0x3640 [ 24.983145] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.984068] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.984989] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.985913] [] ? mark_held_locks+0xaf/0x100 [ 24.986701] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.987520] [] lock_acquire+0x12e/0x410 [ 24.988828] [] ? remove_wait_queue+0x14/0x40 [ 24.994852] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.001144] [] ? remove_wait_queue+0x14/0x40 [ 25.007167] [] remove_wait_queue+0x14/0x40 [ 25.013022] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.020019] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.027268] [] ? ep_free+0x1b0/0x1b0 [ 25.032596] [] ep_free+0x96/0x1b0 [ 25.037665] [] ? ep_free+0x1b0/0x1b0 [ 25.043003] [] ep_eventpoll_release+0x44/0x60 [ 25.049125] [] __fput+0x28c/0x6e0 [ 25.054193] [] ____fput+0x15/0x20 [ 25.059264] [] task_work_run+0x115/0x190 [ 25.064942] [] do_exit+0x7e7/0x2a40 [ 25.070181] [] ? __pmd_alloc+0x410/0x410 [ 25.075858] [] ? release_task+0x1240/0x1240 [ 25.081797] [] ? __do_page_fault+0x5ec/0xd40 [ 25.087820] [] ? up_read+0x1a/0x40 [ 25.092975] [] ? __do_page_fault+0x3bd/0xd40 [ 25.099014] [] do_group_exit+0x108/0x320 [ 25.104690] [] ? do_group_exit+0x320/0x320 [ 25.110538] [] SyS_exit_group+0x1d/0x20 [ 25.116129] [] do_fast_syscall_32+0x2f7/0x890 [ 25.122249] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.128883] [] entry_SYSENTER_compat+0x74/0x83 [ 25.135087] [ 25.136683] Allocated by task 3325: [ 25.140275] save_stack_trace+0x16/0x20 [ 25.144215] save_stack+0x43/0xd0 [ 25.147642] kasan_kmalloc+0xad/0xe0 [ 25.151322] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.155879] binder_get_thread+0x15d/0x750 [ 25.160086] binder_poll+0x4a/0x210 [ 25.163679] SyS_epoll_ctl+0x11d7/0x2190 [ 25.167705] do_fast_syscall_32+0x2f7/0x890 [ 25.171989] entry_SYSENTER_compat+0x74/0x83 [ 25.176359] [ 25.177951] Freed by task 3325: [ 25.181196] save_stack_trace+0x16/0x20 [ 25.185135] save_stack+0x43/0xd0 [ 25.188553] kasan_slab_free+0x72/0xc0 [ 25.192405] kfree+0x103/0x300 [ 25.195564] binder_thread_dec_tmpref+0x1cc/0x240 [ 25.200372] binder_thread_release+0x27d/0x540 [ 25.204919] binder_ioctl+0x9c0/0x11b0 [ 25.208774] compat_SyS_ioctl+0x15f/0x2050 [ 25.212978] do_fast_syscall_32+0x2f7/0x890 [ 25.217265] entry_SYSENTER_compat+0x74/0x83 [ 25.221633] [ 25.223230] The buggy address belongs to the object at ffff8801c9e9d680 [ 25.223230] which belongs to the cache kmalloc-512 of size 512 [ 25.235855] The buggy address is located 184 bytes inside of [ 25.235855] 512-byte region [ffff8801c9e9d680, ffff8801c9e9d880) [ 25.247694] The buggy address belongs to the page: [ 25.252591] page:ffffea000727a700 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 25.262770] flags: 0x8000000000004080(slab|head) [ 25.267489] page dumped because: kasan: bad access detected [ 25.273163] [ 25.274775] Memory state around the buggy address: [ 25.279671] ffff8801c9e9d600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.286997] ffff8801c9e9d680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.294321] >ffff8801c9e9d700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.301646] ^ [ 25.306816] ffff8801c9e9d780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.314140] ffff8801c9e9d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.321464] ================================================================== [ 25.328795] Disabling lock debugging due to kernel taint [ 25.334213] Kernel panic - not syncing: panic_on_warn set ... [ 25.334213] [ 25.341559] CPU: 1 PID: 3325 Comm: syzkaller019605 Tainted: G B 4.9.75-gb54d99a #18 [ 25.350448] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.359775] ffff8801c845f7c8 ffffffff81d93049 ffffffff84195be7 ffff8801c845f8a0 [ 25.367770] 0000000000000000 ffff8801c9e9d738 ffff8801c9e9d738 ffff8801c845f890 [ 25.375725] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 25.383678] Call Trace: [ 25.386234] [] dump_stack+0xc1/0x128 [ 25.391563] [] panic+0x1bc/0x3a8 [ 25.396544] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.404740] [] ? add_taint+0x40/0x50 [ 25.410070] [] kasan_end_report+0x50/0x50 [ 25.415832] [] kasan_report+0x167/0x360 [ 25.421425] [] ? __lock_acquire+0x2eff/0x3640 [ 25.427535] [] __asan_report_load8_noabort+0x14/0x20 [ 25.434251] [] __lock_acquire+0x2eff/0x3640 [ 25.440187] [] ? __lock_acquire+0x629/0x3640 [ 25.446213] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.453200] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.460176] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.467282] [] ? mark_held_locks+0xaf/0x100 [ 25.473219] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.479418] [] lock_acquire+0x12e/0x410 [ 25.485007] [] ? remove_wait_queue+0x14/0x40 [ 25.491035] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.497319] [] ? remove_wait_queue+0x14/0x40 [ 25.503343] [] remove_wait_queue+0x14/0x40 [ 25.509194] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.516174] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.523424] [] ? ep_free+0x1b0/0x1b0 [ 25.528753] [] ep_free+0x96/0x1b0 [ 25.533828] [] ? ep_free+0x1b0/0x1b0 [ 25.539165] [] ep_eventpoll_release+0x44/0x60 [ 25.545286] [] __fput+0x28c/0x6e0 [ 25.550355] [] ____fput+0x15/0x20 [ 25.555434] [] task_work_run+0x115/0x190 [ 25.561119] [] do_exit+0x7e7/0x2a40 [ 25.566360] [] ? __pmd_alloc+0x410/0x410 [ 25.572035] [] ? release_task+0x1240/0x1240 [ 25.577984] [] ? __do_page_fault+0x5ec/0xd40 [ 25.584009] [] ? up_read+0x1a/0x40 [ 25.589174] [] ? __do_page_fault+0x3bd/0xd40 [ 25.595208] [] do_group_exit+0x108/0x320 [ 25.600882] [] ? do_group_exit+0x320/0x320 [ 25.606746] [] SyS_exit_group+0x1d/0x20 [ 25.612346] [] do_fast_syscall_32+0x2f7/0x890 [ 25.618469] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.625104] [] entry_SYSENTER_compat+0x74/0x83 [ 25.631640] Dumping ftrace buffer: [ 25.635153] (ftrace buffer empty) [ 25.638828] Kernel Offset: disabled [ 25.642419] Rebooting in 86400 seconds..