[....] Starting enhanced syslogd: rsyslogd[ 12.828714] audit: type=1400 audit(1516195602.430: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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.2' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.891627] ================================================================== [ 27.899021] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.905665] Read of size 8 at addr ffff8801cd2a14b8 by task syzkaller410642/3326 [ 27.913165] [ 27.914764] CPU: 0 PID: 3326 Comm: syzkaller410642 Not tainted 4.9.77-g033d019 #24 [ 27.922438] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.931761] ffff8801c89af870 ffffffff81d941c9 ffffea000734a800 ffff8801cd2a14b8 [ 27.939724] 0000000000000000 ffff8801cd2a14b8 ffff8801cd2a14b8 ffff8801c89af8a8 [ 27.947685] ffffffff8153db93 ffff8801cd2a14b8 0000000000000008 0000000000000000 [ 27.955651] Call Trace: [ 27.958210] [] dump_stack+0xc1/0x128 [ 27.963544] [] print_address_description+0x73/0x280 [ 27.970176] [] kasan_report+0x275/0x360 [ 27.975767] [] ? __lock_acquire+0x2eff/0x3640 [ 27.981889] [] __asan_report_load8_noabort+0x14/0x20 [ 27.988625] [] __lock_acquire+0x2eff/0x3640 [ 27.994571] [] ? __lock_acquire+0x629/0x3640 [ 28.000640] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.007636] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.014620] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.021603] [] ? mark_held_locks+0xaf/0x100 [ 28.027552] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.033754] [] lock_acquire+0x12e/0x410 [ 28.039344] [] ? remove_wait_queue+0x14/0x40 [ 28.045384] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.051668] [] ? remove_wait_queue+0x14/0x40 [ 28.057691] [] remove_wait_queue+0x14/0x40 [ 28.063545] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.070526] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.077767] [] ? ep_free+0x1b0/0x1b0 [ 28.083098] [] ep_free+0x96/0x1b0 [ 28.088166] [] ? ep_free+0x1b0/0x1b0 [ 28.093494] [] ep_eventpoll_release+0x44/0x60 [ 28.099605] [] __fput+0x28c/0x6e0 [ 28.104678] [] ____fput+0x15/0x20 [ 28.109747] [] task_work_run+0x115/0x190 [ 28.115426] [] do_exit+0x7e7/0x2a40 [ 28.120671] [] ? __pmd_alloc+0x410/0x410 [ 28.126349] [] ? release_task+0x1240/0x1240 [ 28.132288] [] ? __do_page_fault+0x5ec/0xd40 [ 28.138314] [] ? up_read+0x1a/0x40 [ 28.143470] [] ? __do_page_fault+0x3bd/0xd40 [ 28.149494] [] do_group_exit+0x108/0x320 [ 28.155175] [] ? do_group_exit+0x320/0x320 [ 28.161027] [] SyS_exit_group+0x1d/0x20 [ 28.166618] [] do_fast_syscall_32+0x2f7/0x890 [ 28.172728] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.179363] [] entry_SYSENTER_compat+0x74/0x83 [ 28.185560] [ 28.187158] Allocated by task 3326: [ 28.190752] save_stack_trace+0x16/0x20 [ 28.194691] save_stack+0x43/0xd0 [ 28.198112] kasan_kmalloc+0xad/0xe0 [ 28.201794] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.206345] binder_get_thread+0x15d/0x750 [ 28.210545] binder_poll+0x4a/0x210 [ 28.214141] SyS_epoll_ctl+0x11d7/0x2190 [ 28.218166] do_fast_syscall_32+0x2f7/0x890 [ 28.222457] entry_SYSENTER_compat+0x74/0x83 [ 28.226826] [ 28.228420] Freed by task 3326: [ 28.231666] save_stack_trace+0x16/0x20 [ 28.235605] save_stack+0x43/0xd0 [ 28.239027] kasan_slab_free+0x72/0xc0 [ 28.242881] kfree+0x103/0x300 [ 28.246041] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.250847] binder_thread_release+0x27d/0x540 [ 28.255393] binder_ioctl+0x9c0/0x11b0 [ 28.259247] compat_SyS_ioctl+0x15f/0x2050 [ 28.263451] do_fast_syscall_32+0x2f7/0x890 [ 28.267742] entry_SYSENTER_compat+0x74/0x83 [ 28.272112] [ 28.273710] The buggy address belongs to the object at ffff8801cd2a1400 [ 28.273710] which belongs to the cache kmalloc-512 of size 512 [ 28.286333] The buggy address is located 184 bytes inside of [ 28.286333] 512-byte region [ffff8801cd2a1400, ffff8801cd2a1600) [ 28.298170] The buggy address belongs to the page: [ 28.303070] page:ffffea000734a800 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.313233] flags: 0x8000000000004080(slab|head) [ 28.317954] page dumped because: kasan: bad access detected [ 28.323636] [ 28.325232] Memory state around the buggy address: [ 28.330129] ffff8801cd2a1380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.337455] ffff8801cd2a1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.344782] >ffff8801cd2a1480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.352109] ^ [ 28.357263] ffff8801cd2a1500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.364589] ffff8801cd2a1580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.371912] ================================================================== [ 28.379244] Disabling lock debugging due to kernel taint [ 28.384664] Kernel panic - not syncing: panic_on_warn set ... [ 28.384664] [ 28.391995] CPU: 0 PID: 3326 Comm: syzkaller410642 Tainted: G B 4.9.77-g033d019 #24 [ 28.400882] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.410208] ffff8801c89af7c8 ffffffff81d941c9 ffffffff841970ff ffff8801c89af8a0 [ 28.418177] 0000000000000000 ffff8801cd2a14b8 ffff8801cd2a14b8 ffff8801c89af890 [ 28.426141] ffffffff8142f3c1 0000000041b58ab3 ffffffff8418ab70 ffffffff8142f205 [ 28.434101] Call Trace: [ 28.436660] [] dump_stack+0xc1/0x128 [ 28.441993] [] panic+0x1bc/0x3a8 [ 28.446980] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.455184] [] ? add_taint+0x40/0x50 [ 28.460515] [] kasan_end_report+0x50/0x50 [ 28.466279] [] kasan_report+0x167/0x360 [ 28.471871] [] ? __lock_acquire+0x2eff/0x3640 [ 28.477983] [] __asan_report_load8_noabort+0x14/0x20 [ 28.484704] [] __lock_acquire+0x2eff/0x3640 [ 28.490642] [] ? __lock_acquire+0x629/0x3640 [ 28.496667] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.503646] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.510628] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.517607] [] ? mark_held_locks+0xaf/0x100 [ 28.523548] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.529749] [] lock_acquire+0x12e/0x410 [ 28.535343] [] ? remove_wait_queue+0x14/0x40 [ 28.541371] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.547656] [] ? remove_wait_queue+0x14/0x40 [ 28.553680] [] remove_wait_queue+0x14/0x40 [ 28.559532] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.566989] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.574233] [] ? ep_free+0x1b0/0x1b0 [ 28.579564] [] ep_free+0x96/0x1b0 [ 28.584635] [] ? ep_free+0x1b0/0x1b0 [ 28.589968] [] ep_eventpoll_release+0x44/0x60 [ 28.596081] [] __fput+0x28c/0x6e0 [ 28.601150] [] ____fput+0x15/0x20 [ 28.606225] [] task_work_run+0x115/0x190 [ 28.611912] [] do_exit+0x7e7/0x2a40 [ 28.617161] [] ? __pmd_alloc+0x410/0x410 [ 28.622838] [] ? release_task+0x1240/0x1240 [ 28.628778] [] ? __do_page_fault+0x5ec/0xd40 [ 28.634803] [] ? up_read+0x1a/0x40 [ 28.639960] [] ? __do_page_fault+0x3bd/0xd40 [ 28.645984] [] do_group_exit+0x108/0x320 [ 28.651664] [] ? do_group_exit+0x320/0x320 [ 28.657516] [] SyS_exit_group+0x1d/0x20 [ 28.663110] [] do_fast_syscall_32+0x2f7/0x890 [ 28.669220] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.675854] [] entry_SYSENTER_compat+0x74/0x83 [ 28.682426] Dumping ftrace buffer: [ 28.685931] (ftrace buffer empty) [ 28.689612] Kernel Offset: disabled [ 28.693206] Rebooting in 86400 seconds..