[....] Starting enhanced syslogd: rsyslogd[ 13.411701] audit: type=1400 audit(1516239502.825:4): avc: denied { syslog } for pid=3187 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.22' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.058584] ================================================================== [ 27.065975] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.072613] Read of size 8 at addr ffff8801c9e1c0b8 by task syzkaller708949/3343 [ 27.080111] [ 27.081709] CPU: 1 PID: 3343 Comm: syzkaller708949 Not tainted 4.9.77-g033d019 #24 [ 27.089384] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.098721] ffff8801ce1df870 ffffffff81d941c9 ffffea0007278700 ffff8801c9e1c0b8 [ 27.106696] 0000000000000000 ffff8801c9e1c0b8 ffff8801c9e1c0b8 ffff8801ce1df8a8 [ 27.114660] ffffffff8153db93 ffff8801c9e1c0b8 0000000000000008 0000000000000000 [ 27.122624] Call Trace: [ 27.125184] [] dump_stack+0xc1/0x128 [ 27.130520] [] print_address_description+0x73/0x280 [ 27.137153] [] kasan_report+0x275/0x360 [ 27.142749] [] ? __lock_acquire+0x2eff/0x3640 [ 27.148865] [] __asan_report_load8_noabort+0x14/0x20 [ 27.155592] [] __lock_acquire+0x2eff/0x3640 [ 27.161532] [] ? __lock_acquire+0x629/0x3640 [ 27.167559] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.174553] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.181535] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.188518] [] ? mark_held_locks+0xaf/0x100 [ 27.194461] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.200659] [] lock_acquire+0x12e/0x410 [ 27.206252] [] ? remove_wait_queue+0x14/0x40 [ 27.212281] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.218566] [] ? remove_wait_queue+0x14/0x40 [ 27.224591] [] remove_wait_queue+0x14/0x40 [ 27.230448] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.237432] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.244677] [] ? ep_free+0x1b0/0x1b0 [ 27.250006] [] ep_free+0x96/0x1b0 [ 27.255078] [] ? ep_free+0x1b0/0x1b0 [ 27.260409] [] ep_eventpoll_release+0x44/0x60 [ 27.266526] [] __fput+0x28c/0x6e0 [ 27.271601] [] ____fput+0x15/0x20 [ 27.276674] [] task_work_run+0x115/0x190 [ 27.282355] [] do_exit+0x7e7/0x2a40 [ 27.287599] [] ? __pmd_alloc+0x410/0x410 [ 27.293280] [] ? release_task+0x1240/0x1240 [ 27.299220] [] ? __do_page_fault+0x5ec/0xd40 [ 27.305249] [] ? up_read+0x1a/0x40 [ 27.310408] [] ? __do_page_fault+0x3bd/0xd40 [ 27.316441] [] do_group_exit+0x108/0x320 [ 27.322123] [] ? do_group_exit+0x320/0x320 [ 27.327975] [] SyS_exit_group+0x1d/0x20 [ 27.333570] [] do_fast_syscall_32+0x2f7/0x890 [ 27.339681] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.346314] [] entry_SYSENTER_compat+0x74/0x83 [ 27.352510] [ 27.354107] Allocated by task 3343: [ 27.357703] save_stack_trace+0x16/0x20 [ 27.361646] save_stack+0x43/0xd0 [ 27.365067] kasan_kmalloc+0xad/0xe0 [ 27.368746] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.373298] binder_get_thread+0x15d/0x750 [ 27.377498] binder_poll+0x4a/0x210 [ 27.381092] SyS_epoll_ctl+0x11d7/0x2190 [ 27.385122] do_fast_syscall_32+0x2f7/0x890 [ 27.389411] entry_SYSENTER_compat+0x74/0x83 [ 27.393784] [ 27.395380] Freed by task 3343: [ 27.398629] save_stack_trace+0x16/0x20 [ 27.402571] save_stack+0x43/0xd0 [ 27.405993] kasan_slab_free+0x72/0xc0 [ 27.409849] kfree+0x103/0x300 [ 27.413013] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.417821] binder_thread_release+0x27d/0x540 [ 27.422369] binder_ioctl+0x9c0/0x11b0 [ 27.426224] compat_SyS_ioctl+0x15f/0x2050 [ 27.430426] do_fast_syscall_32+0x2f7/0x890 [ 27.434719] entry_SYSENTER_compat+0x74/0x83 [ 27.439093] [ 27.440693] The buggy address belongs to the object at ffff8801c9e1c000 [ 27.440693] which belongs to the cache kmalloc-512 of size 512 [ 27.453317] The buggy address is located 184 bytes inside of [ 27.453317] 512-byte region [ffff8801c9e1c000, ffff8801c9e1c200) [ 27.465167] The buggy address belongs to the page: [ 27.470066] page:ffffea0007278700 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.480240] flags: 0x8000000000004080(slab|head) [ 27.484966] page dumped because: kasan: bad access detected [ 27.490640] [ 27.492235] Memory state around the buggy address: [ 27.497131] ffff8801c9e1bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 27.504457] ffff8801c9e1c000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.511794] >ffff8801c9e1c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.519126] ^ [ 27.524286] ffff8801c9e1c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.531613] ffff8801c9e1c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.538938] ================================================================== [ 27.546267] Disabling lock debugging due to kernel taint [ 27.551685] Kernel panic - not syncing: panic_on_warn set ... [ 27.551685] [ 27.559017] CPU: 1 PID: 3343 Comm: syzkaller708949 Tainted: G B 4.9.77-g033d019 #24 [ 27.567909] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.577231] ffff8801ce1df7c8 ffffffff81d941c9 ffffffff841970ff ffff8801ce1df8a0 [ 27.585196] 0000000000000000 ffff8801c9e1c0b8 ffff8801c9e1c0b8 ffff8801ce1df890 [ 27.593167] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 27.601132] Call Trace: [ 27.603693] [] dump_stack+0xc1/0x128 [ 27.609028] [] panic+0x1bc/0x3a8 [ 27.614013] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.622209] [] ? add_taint+0x40/0x50 [ 27.627540] [] kasan_end_report+0x50/0x50 [ 27.633304] [] kasan_report+0x167/0x360 [ 27.638900] [] ? __lock_acquire+0x2eff/0x3640 [ 27.645014] [] __asan_report_load8_noabort+0x14/0x20 [ 27.651737] [] __lock_acquire+0x2eff/0x3640 [ 27.657675] [] ? __lock_acquire+0x629/0x3640 [ 27.663704] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.670684] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.677663] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.684644] [] ? mark_held_locks+0xaf/0x100 [ 27.690589] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.696788] [] lock_acquire+0x12e/0x410 [ 27.702383] [] ? remove_wait_queue+0x14/0x40 [ 27.708408] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.714694] [] ? remove_wait_queue+0x14/0x40 [ 27.720719] [] remove_wait_queue+0x14/0x40 [ 27.726574] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.733555] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.740793] [] ? ep_free+0x1b0/0x1b0 [ 27.746125] [] ep_free+0x96/0x1b0 [ 27.751194] [] ? ep_free+0x1b0/0x1b0 [ 27.756526] [] ep_eventpoll_release+0x44/0x60 [ 27.762638] [] __fput+0x28c/0x6e0 [ 27.768138] [] ____fput+0x15/0x20 [ 27.773211] [] task_work_run+0x115/0x190 [ 27.778892] [] do_exit+0x7e7/0x2a40 [ 27.784139] [] ? __pmd_alloc+0x410/0x410 [ 27.789817] [] ? release_task+0x1240/0x1240 [ 27.795757] [] ? __do_page_fault+0x5ec/0xd40 [ 27.801784] [] ? up_read+0x1a/0x40 [ 27.806949] [] ? __do_page_fault+0x3bd/0xd40 [ 27.812977] [] do_group_exit+0x108/0x320 [ 27.818661] [] ? do_group_exit+0x320/0x320 [ 27.824517] [] SyS_exit_group+0x1d/0x20 [ 27.830109] [] do_fast_syscall_32+0x2f7/0x890 [ 27.836223] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.842857] [] entry_SYSENTER_compat+0x74/0x83 [ 27.849474] Dumping ftrace buffer: [ 27.852990] (ftrace buffer empty) [ 27.856668] Kernel Offset: disabled [ 27.860264] Rebooting in 86400 seconds..