[....] Starting enhanced syslogd: rsyslogd[ 12.859396] audit: type=1400 audit(1515918728.466:4): avc: denied { syslog } for pid=3182 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.48' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.577653] ================================================================== [ 32.585049] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 32.591692] Read of size 8 at addr ffff8801c8d3c5b8 by task syzkaller006852/3341 [ 32.599202] [ 32.600801] CPU: 0 PID: 3341 Comm: syzkaller006852 Not tainted 4.9.76-g8e170a5 #21 [ 32.608474] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.617804] ffff8801bfa4f870 ffffffff81d93149 ffffea0007234f00 ffff8801c8d3c5b8 [ 32.625779] 0000000000000000 ffff8801c8d3c5b8 ffff8801c8d3c5b8 ffff8801bfa4f8a8 [ 32.633754] ffffffff8153cb43 ffff8801c8d3c5b8 0000000000000008 0000000000000000 [ 32.641724] Call Trace: [ 32.644283] [] dump_stack+0xc1/0x128 [ 32.649617] [] print_address_description+0x73/0x280 [ 32.656253] [] kasan_report+0x275/0x360 [ 32.661850] [] ? __lock_acquire+0x2eff/0x3640 [ 32.667974] [] __asan_report_load8_noabort+0x14/0x20 [ 32.674710] [] __lock_acquire+0x2eff/0x3640 [ 32.680649] [] ? __lock_acquire+0x629/0x3640 [ 32.686678] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.693661] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.700662] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.707657] [] ? mark_held_locks+0xaf/0x100 [ 32.713606] [] ? mutex_lock_nested+0x5e3/0x870 [ 32.719817] [] lock_acquire+0x12e/0x410 [ 32.725409] [] ? remove_wait_queue+0x14/0x40 [ 32.731435] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 32.737721] [] ? remove_wait_queue+0x14/0x40 [ 32.743748] [] remove_wait_queue+0x14/0x40 [ 32.749606] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 32.756589] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 32.763950] [] ? ep_free+0x1b0/0x1b0 [ 32.769286] [] ep_free+0x96/0x1b0 [ 32.774357] [] ? ep_free+0x1b0/0x1b0 [ 32.779690] [] ep_eventpoll_release+0x44/0x60 [ 32.785815] [] __fput+0x28c/0x6e0 [ 32.790887] [] ____fput+0x15/0x20 [ 32.795959] [] task_work_run+0x115/0x190 [ 32.801642] [] do_exit+0x7e7/0x2a40 [ 32.806889] [] ? __pmd_alloc+0x410/0x410 [ 32.812585] [] ? release_task+0x1240/0x1240 [ 32.818550] [] ? __do_page_fault+0x5ec/0xd40 [ 32.824584] [] ? up_read+0x1a/0x40 [ 32.829741] [] ? __do_page_fault+0x3bd/0xd40 [ 32.835777] [] do_group_exit+0x108/0x320 [ 32.841457] [] ? do_group_exit+0x320/0x320 [ 32.847315] [] SyS_exit_group+0x1d/0x20 [ 32.852909] [] do_fast_syscall_32+0x2f7/0x890 [ 32.859031] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.865674] [] entry_SYSENTER_compat+0x74/0x83 [ 32.871882] [ 32.873481] Allocated by task 3341: [ 32.877078] save_stack_trace+0x16/0x20 [ 32.881020] save_stack+0x43/0xd0 [ 32.884442] kasan_kmalloc+0xad/0xe0 [ 32.888122] kmem_cache_alloc_trace+0xfb/0x2a0 [ 32.892682] binder_get_thread+0x15d/0x750 [ 32.896883] binder_poll+0x4a/0x210 [ 32.900481] SyS_epoll_ctl+0x11d7/0x2190 [ 32.904511] do_fast_syscall_32+0x2f7/0x890 [ 32.908799] entry_SYSENTER_compat+0x74/0x83 [ 32.913174] [ 32.914768] Freed by task 3341: [ 32.918019] save_stack_trace+0x16/0x20 [ 32.921961] save_stack+0x43/0xd0 [ 32.925382] kasan_slab_free+0x72/0xc0 [ 32.929237] kfree+0x103/0x300 [ 32.932401] binder_thread_dec_tmpref+0x1cc/0x240 [ 32.937212] binder_thread_release+0x27d/0x540 [ 32.941763] binder_ioctl+0x9c0/0x11b0 [ 32.945617] compat_SyS_ioctl+0x15f/0x2050 [ 32.949820] do_fast_syscall_32+0x2f7/0x890 [ 32.954110] entry_SYSENTER_compat+0x74/0x83 [ 32.958485] [ 32.960082] The buggy address belongs to the object at ffff8801c8d3c500 [ 32.960082] which belongs to the cache kmalloc-512 of size 512 [ 32.972713] The buggy address is located 184 bytes inside of [ 32.972713] 512-byte region [ffff8801c8d3c500, ffff8801c8d3c700) [ 32.984559] The buggy address belongs to the page: [ 32.989467] page:ffffea0007234f00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 32.999631] flags: 0x8000000000004080(slab|head) [ 33.004361] page dumped because: kasan: bad access detected [ 33.010039] [ 33.011634] Memory state around the buggy address: [ 33.016547] ffff8801c8d3c480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.023879] ffff8801c8d3c500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.031204] >ffff8801c8d3c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.038529] ^ [ 33.043691] ffff8801c8d3c600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.051017] ffff8801c8d3c680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.058343] ================================================================== [ 33.065669] Disabling lock debugging due to kernel taint [ 33.071088] Kernel panic - not syncing: panic_on_warn set ... [ 33.071088] [ 33.078420] CPU: 0 PID: 3341 Comm: syzkaller006852 Tainted: G B 4.9.76-g8e170a5 #21 [ 33.087310] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.096633] ffff8801bfa4f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801bfa4f8a0 [ 33.104607] 0000000000000000 ffff8801c8d3c5b8 ffff8801c8d3c5b8 ffff8801bfa4f890 [ 33.112575] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 33.120553] Call Trace: [ 33.123113] [] dump_stack+0xc1/0x128 [ 33.128444] [] panic+0x1bc/0x3a8 [ 33.133429] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 33.141625] [] ? add_taint+0x40/0x50 [ 33.146965] [] kasan_end_report+0x50/0x50 [ 33.152735] [] kasan_report+0x167/0x360 [ 33.158332] [] ? __lock_acquire+0x2eff/0x3640 [ 33.164448] [] __asan_report_load8_noabort+0x14/0x20 [ 33.171175] [] __lock_acquire+0x2eff/0x3640 [ 33.177121] [] ? __lock_acquire+0x629/0x3640 [ 33.183147] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 33.190140] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 33.197119] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 33.204101] [] ? mark_held_locks+0xaf/0x100 [ 33.210050] [] ? mutex_lock_nested+0x5e3/0x870 [ 33.216251] [] lock_acquire+0x12e/0x410 [ 33.221844] [] ? remove_wait_queue+0x14/0x40 [ 33.227870] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 33.234155] [] ? remove_wait_queue+0x14/0x40 [ 33.240179] [] remove_wait_queue+0x14/0x40 [ 33.246031] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 33.253012] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 33.260260] [] ? ep_free+0x1b0/0x1b0 [ 33.265597] [] ep_free+0x96/0x1b0 [ 33.271298] [] ? ep_free+0x1b0/0x1b0 [ 33.276631] [] ep_eventpoll_release+0x44/0x60 [ 33.282749] [] __fput+0x28c/0x6e0 [ 33.287832] [] ____fput+0x15/0x20 [ 33.292907] [] task_work_run+0x115/0x190 [ 33.298586] [] do_exit+0x7e7/0x2a40 [ 33.303832] [] ? __pmd_alloc+0x410/0x410 [ 33.309510] [] ? release_task+0x1240/0x1240 [ 33.315457] [] ? __do_page_fault+0x5ec/0xd40 [ 33.321486] [] ? up_read+0x1a/0x40 [ 33.326651] [] ? __do_page_fault+0x3bd/0xd40 [ 33.332677] [] do_group_exit+0x108/0x320 [ 33.338355] [] ? do_group_exit+0x320/0x320 [ 33.344208] [] SyS_exit_group+0x1d/0x20 [ 33.349800] [] do_fast_syscall_32+0x2f7/0x890 [ 33.355912] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 33.362549] [] entry_SYSENTER_compat+0x74/0x83 [ 33.369153] Dumping ftrace buffer: [ 33.372661] (ftrace buffer empty) [ 33.376342] Kernel Offset: disabled [ 33.379939] Rebooting in 86400 seconds..