[....] Starting enhanced syslogd: rsyslogd[ 13.854934] audit: type=1400 audit(1515581230.648:4): avc: denied { syslog } for pid=3170 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.4' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.256312] ================================================================== [ 27.263788] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.270426] Read of size 8 at addr ffff8801c93bf4b8 by task syzkaller768031/3326 [ 27.277936] [ 27.279533] CPU: 0 PID: 3326 Comm: syzkaller768031 Not tainted 4.9.76-g9154940 #20 [ 27.287212] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.296535] ffff8801c238f870 ffffffff81d93149 ffffea000724ef80 ffff8801c93bf4b8 [ 27.304492] 0000000000000000 ffff8801c93bf4b8 ffff8801c93bf4b8 ffff8801c238f8a8 [ 27.312452] ffffffff8153cb43 ffff8801c93bf4b8 0000000000000008 0000000000000000 [ 27.320423] Call Trace: [ 27.322981] [] dump_stack+0xc1/0x128 [ 27.328315] [] print_address_description+0x73/0x280 [ 27.334949] [] kasan_report+0x275/0x360 [ 27.340540] [] ? __lock_acquire+0x2eff/0x3640 [ 27.346650] [] __asan_report_load8_noabort+0x14/0x20 [ 27.353370] [] __lock_acquire+0x2eff/0x3640 [ 27.359308] [] ? __lock_acquire+0x629/0x3640 [ 27.365340] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.372321] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.379321] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.386300] [] ? mark_held_locks+0xaf/0x100 [ 27.392243] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.398443] [] lock_acquire+0x12e/0x410 [ 27.404036] [] ? remove_wait_queue+0x14/0x40 [ 27.410065] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.416346] [] ? remove_wait_queue+0x14/0x40 [ 27.422371] [] remove_wait_queue+0x14/0x40 [ 27.428228] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.435214] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.442457] [] ? ep_free+0x1b0/0x1b0 [ 27.447795] [] ep_free+0x96/0x1b0 [ 27.452865] [] ? ep_free+0x1b0/0x1b0 [ 27.458195] [] ep_eventpoll_release+0x44/0x60 [ 27.464306] [] __fput+0x28c/0x6e0 [ 27.469378] [] ____fput+0x15/0x20 [ 27.474467] [] task_work_run+0x115/0x190 [ 27.480233] [] do_exit+0x7e7/0x2a40 [ 27.485486] [] ? __pmd_alloc+0x410/0x410 [ 27.491167] [] ? release_task+0x1240/0x1240 [ 27.497110] [] ? __do_page_fault+0x5ec/0xd40 [ 27.503152] [] ? up_read+0x1a/0x40 [ 27.508310] [] ? __do_page_fault+0x3bd/0xd40 [ 27.514345] [] do_group_exit+0x108/0x320 [ 27.520022] [] ? do_group_exit+0x320/0x320 [ 27.525882] [] SyS_exit_group+0x1d/0x20 [ 27.531475] [] do_fast_syscall_32+0x2f7/0x890 [ 27.537589] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.544234] [] entry_SYSENTER_compat+0x74/0x83 [ 27.550432] [ 27.552028] Allocated by task 3326: [ 27.555625] save_stack_trace+0x16/0x20 [ 27.559564] save_stack+0x43/0xd0 [ 27.562990] kasan_kmalloc+0xad/0xe0 [ 27.566673] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.571224] binder_get_thread+0x15d/0x750 [ 27.575424] binder_poll+0x4a/0x210 [ 27.579017] SyS_epoll_ctl+0x11d7/0x2190 [ 27.583047] do_fast_syscall_32+0x2f7/0x890 [ 27.587343] entry_SYSENTER_compat+0x74/0x83 [ 27.591714] [ 27.593308] Freed by task 3326: [ 27.596554] save_stack_trace+0x16/0x20 [ 27.600494] save_stack+0x43/0xd0 [ 27.603912] kasan_slab_free+0x72/0xc0 [ 27.607763] kfree+0x103/0x300 [ 27.610932] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.615751] binder_thread_release+0x27d/0x540 [ 27.620301] binder_ioctl+0x9c0/0x11b0 [ 27.624164] compat_SyS_ioctl+0x15f/0x2050 [ 27.628374] do_fast_syscall_32+0x2f7/0x890 [ 27.632666] entry_SYSENTER_compat+0x74/0x83 [ 27.637039] [ 27.638633] The buggy address belongs to the object at ffff8801c93bf400 [ 27.638633] which belongs to the cache kmalloc-512 of size 512 [ 27.651254] The buggy address is located 184 bytes inside of [ 27.651254] 512-byte region [ffff8801c93bf400, ffff8801c93bf600) [ 27.663091] The buggy address belongs to the page: [ 27.667988] page:ffffea000724ef80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.678167] flags: 0x8000000000004080(slab|head) [ 27.682889] page dumped because: kasan: bad access detected [ 27.688572] [ 27.690172] Memory state around the buggy address: [ 27.695069] ffff8801c93bf380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.702395] ffff8801c93bf400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.709721] >ffff8801c93bf480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.717046] ^ [ 27.722201] ffff8801c93bf500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.729528] ffff8801c93bf580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.736865] ================================================================== [ 27.744197] Disabling lock debugging due to kernel taint [ 27.749620] Kernel panic - not syncing: panic_on_warn set ... [ 27.749620] [ 27.756951] CPU: 0 PID: 3326 Comm: syzkaller768031 Tainted: G B 4.9.76-g9154940 #20 [ 27.765839] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.775177] ffff8801c238f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c238f8a0 [ 27.783141] 0000000000000000 ffff8801c93bf4b8 ffff8801c93bf4b8 ffff8801c238f890 [ 27.791093] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 27.799052] Call Trace: [ 27.801610] [] dump_stack+0xc1/0x128 [ 27.806949] [] panic+0x1bc/0x3a8 [ 27.811932] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.820139] [] ? add_taint+0x40/0x50 [ 27.825480] [] kasan_end_report+0x50/0x50 [ 27.831243] [] kasan_report+0x167/0x360 [ 27.836834] [] ? __lock_acquire+0x2eff/0x3640 [ 27.842945] [] __asan_report_load8_noabort+0x14/0x20 [ 27.849664] [] __lock_acquire+0x2eff/0x3640 [ 27.855611] [] ? __lock_acquire+0x629/0x3640 [ 27.861637] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.868638] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.875629] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.882617] [] ? mark_held_locks+0xaf/0x100 [ 27.888567] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.894766] [] lock_acquire+0x12e/0x410 [ 27.900386] [] ? remove_wait_queue+0x14/0x40 [ 27.906416] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.912703] [] ? remove_wait_queue+0x14/0x40 [ 27.918728] [] remove_wait_queue+0x14/0x40 [ 27.924673] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.931667] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.938910] [] ? ep_free+0x1b0/0x1b0 [ 27.944241] [] ep_free+0x96/0x1b0 [ 27.949314] [] ? ep_free+0x1b0/0x1b0 [ 27.954651] [] ep_eventpoll_release+0x44/0x60 [ 27.960768] [] __fput+0x28c/0x6e0 [ 27.965839] [] ____fput+0x15/0x20 [ 27.970915] [] task_work_run+0x115/0x190 [ 27.976593] [] do_exit+0x7e7/0x2a40 [ 27.981838] [] ? __pmd_alloc+0x410/0x410 [ 27.987518] [] ? release_task+0x1240/0x1240 [ 27.993462] [] ? __do_page_fault+0x5ec/0xd40 [ 27.999499] [] ? up_read+0x1a/0x40 [ 28.004667] [] ? __do_page_fault+0x3bd/0xd40 [ 28.010691] [] do_group_exit+0x108/0x320 [ 28.016367] [] ? do_group_exit+0x320/0x320 [ 28.022219] [] SyS_exit_group+0x1d/0x20 [ 28.027913] [] do_fast_syscall_32+0x2f7/0x890 [ 28.034027] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.040661] [] entry_SYSENTER_compat+0x74/0x83 [ 28.046913] Dumping ftrace buffer: [ 28.050424] (ftrace buffer empty) [ 28.054102] Kernel Offset: disabled [ 28.057704] Rebooting in 86400 seconds..