[....] Starting enhanced syslogd: rsyslogd[ 11.240264] audit: type=1400 audit(1515476138.085:4): avc: denied { syslog } for pid=3196 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.42' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.343796] ================================================================== [ 19.344910] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.345797] Read of size 8 at addr ffff8801ca6b4d38 by task syzkaller094088/3344 [ 19.346779] [ 19.347011] CPU: 0 PID: 3344 Comm: syzkaller094088 Not tainted 4.9.75-gb54d99a #18 [ 19.348275] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.349495] ffff8801c8b67870 ffffffff81d93049 ffffea000729ad00 ffff8801ca6b4d38 [ 19.350699] 0000000000000000 ffff8801ca6b4d38 ffff8801ca6b4d38 ffff8801c8b678a8 [ 19.351891] ffffffff8153ca53 ffff8801ca6b4d38 0000000000000008 0000000000000000 [ 19.353018] Call Trace: [ 19.353375] [] dump_stack+0xc1/0x128 [ 19.354086] [] print_address_description+0x73/0x280 [ 19.354972] [] kasan_report+0x275/0x360 [ 19.355730] [] ? __lock_acquire+0x2eff/0x3640 [ 19.356566] [] __asan_report_load8_noabort+0x14/0x20 [ 19.357469] [] __lock_acquire+0x2eff/0x3640 [ 19.358294] [] ? __lock_acquire+0x629/0x3640 [ 19.359098] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.360070] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.361000] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.361919] [] ? mark_held_locks+0xaf/0x100 [ 19.362720] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.363540] [] lock_acquire+0x12e/0x410 [ 19.366823] [] ? remove_wait_queue+0x14/0x40 [ 19.372848] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.379133] [] ? remove_wait_queue+0x14/0x40 [ 19.385158] [] remove_wait_queue+0x14/0x40 [ 19.391013] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.397993] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.405240] [] ? ep_free+0x1b0/0x1b0 [ 19.410573] [] ep_free+0x96/0x1b0 [ 19.415644] [] ? ep_free+0x1b0/0x1b0 [ 19.420976] [] ep_eventpoll_release+0x44/0x60 [ 19.427090] [] __fput+0x28c/0x6e0 [ 19.432158] [] ____fput+0x15/0x20 [ 19.437229] [] task_work_run+0x115/0x190 [ 19.442906] [] do_exit+0x7e7/0x2a40 [ 19.448151] [] ? __pmd_alloc+0x410/0x410 [ 19.453833] [] ? release_task+0x1240/0x1240 [ 19.459774] [] ? __do_page_fault+0x5ec/0xd40 [ 19.465798] [] ? up_read+0x1a/0x40 [ 19.470956] [] ? __do_page_fault+0x3bd/0xd40 [ 19.476981] [] do_group_exit+0x108/0x320 [ 19.482659] [] ? do_group_exit+0x320/0x320 [ 19.488522] [] SyS_exit_group+0x1d/0x20 [ 19.494111] [] do_fast_syscall_32+0x2f7/0x890 [ 19.500227] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.506859] [] entry_SYSENTER_compat+0x74/0x83 [ 19.513054] [ 19.514647] Allocated by task 3344: [ 19.518252] save_stack_trace+0x16/0x20 [ 19.522192] save_stack+0x43/0xd0 [ 19.525613] kasan_kmalloc+0xad/0xe0 [ 19.529290] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.533838] binder_get_thread+0x15d/0x750 [ 19.538036] binder_poll+0x4a/0x210 [ 19.541631] SyS_epoll_ctl+0x11d7/0x2190 [ 19.545656] do_fast_syscall_32+0x2f7/0x890 [ 19.549946] entry_SYSENTER_compat+0x74/0x83 [ 19.554317] [ 19.555910] Freed by task 3344: [ 19.559160] save_stack_trace+0x16/0x20 [ 19.563107] save_stack+0x43/0xd0 [ 19.566528] kasan_slab_free+0x72/0xc0 [ 19.570382] kfree+0x103/0x300 [ 19.573548] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.578358] binder_thread_release+0x27d/0x540 [ 19.582905] binder_ioctl+0x9c0/0x11b0 [ 19.586760] compat_SyS_ioctl+0x15f/0x2050 [ 19.590960] do_fast_syscall_32+0x2f7/0x890 [ 19.595247] entry_SYSENTER_compat+0x74/0x83 [ 19.599624] [ 19.601218] The buggy address belongs to the object at ffff8801ca6b4c80 [ 19.601218] which belongs to the cache kmalloc-512 of size 512 [ 19.613841] The buggy address is located 184 bytes inside of [ 19.613841] 512-byte region [ffff8801ca6b4c80, ffff8801ca6b4e80) [ 19.625681] The buggy address belongs to the page: [ 19.630577] page:ffffea000729ad00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.640732] flags: 0x8000000000004080(slab|head) [ 19.645448] page dumped because: kasan: bad access detected [ 19.651135] [ 19.652726] Memory state around the buggy address: [ 19.657618] ffff8801ca6b4c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.664945] ffff8801ca6b4c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.672286] >ffff8801ca6b4d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.679627] ^ [ 19.684785] ffff8801ca6b4d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.692124] ffff8801ca6b4e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.699449] ================================================================== [ 19.706776] Disabling lock debugging due to kernel taint [ 19.712198] Kernel panic - not syncing: panic_on_warn set ... [ 19.712198] [ 19.719530] CPU: 0 PID: 3344 Comm: syzkaller094088 Tainted: G B 4.9.75-gb54d99a #18 [ 19.728419] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.737741] ffff8801c8b677c8 ffffffff81d93049 ffffffff84195be7 ffff8801c8b678a0 [ 19.745702] 0000000000000000 ffff8801ca6b4d38 ffff8801ca6b4d38 ffff8801c8b67890 [ 19.753666] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 19.761623] Call Trace: [ 19.764203] [] dump_stack+0xc1/0x128 [ 19.769536] [] panic+0x1bc/0x3a8 [ 19.774521] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.782719] [] ? add_taint+0x40/0x50 [ 19.788055] [] kasan_end_report+0x50/0x50 [ 19.793824] [] kasan_report+0x167/0x360 [ 19.799416] [] ? __lock_acquire+0x2eff/0x3640 [ 19.805529] [] __asan_report_load8_noabort+0x14/0x20 [ 19.812251] [] __lock_acquire+0x2eff/0x3640 [ 19.818203] [] ? __lock_acquire+0x629/0x3640 [ 19.824235] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.831217] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.838199] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.845194] [] ? mark_held_locks+0xaf/0x100 [ 19.851136] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.857346] [] lock_acquire+0x12e/0x410 [ 19.862942] [] ? remove_wait_queue+0x14/0x40 [ 19.868981] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.875268] [] ? remove_wait_queue+0x14/0x40 [ 19.881294] [] remove_wait_queue+0x14/0x40 [ 19.887148] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.894138] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.901393] [] ? ep_free+0x1b0/0x1b0 [ 19.906723] [] ep_free+0x96/0x1b0 [ 19.911793] [] ? ep_free+0x1b0/0x1b0 [ 19.917134] [] ep_eventpoll_release+0x44/0x60 [ 19.923248] [] __fput+0x28c/0x6e0 [ 19.928318] [] ____fput+0x15/0x20 [ 19.933397] [] task_work_run+0x115/0x190 [ 19.939075] [] do_exit+0x7e7/0x2a40 [ 19.944317] [] ? __pmd_alloc+0x410/0x410 [ 19.949996] [] ? release_task+0x1240/0x1240 [ 19.955934] [] ? __do_page_fault+0x5ec/0xd40 [ 19.961974] [] ? up_read+0x1a/0x40 [ 19.967147] [] ? __do_page_fault+0x3bd/0xd40 [ 19.973183] [] do_group_exit+0x108/0x320 [ 19.978863] [] ? do_group_exit+0x320/0x320 [ 19.984723] [] SyS_exit_group+0x1d/0x20 [ 19.990317] [] do_fast_syscall_32+0x2f7/0x890 [ 19.996426] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.003068] [] entry_SYSENTER_compat+0x74/0x83 [ 20.009698] Dumping ftrace buffer: [ 20.013204] (ftrace buffer empty) [ 20.016892] Kernel Offset: disabled [ 20.020486] Rebooting in 86400 seconds..