[....] Starting enhanced syslogd: rsyslogd[ 13.519649] audit: type=1400 audit(1515847938.215: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.61' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.379866] ================================================================== [ 27.387783] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.394417] Read of size 8 at addr ffff8801cc9c4fb8 by task syzkaller098330/3326 [ 27.403240] [ 27.404839] CPU: 1 PID: 3326 Comm: syzkaller098330 Not tainted 4.9.76-g8e170a5 #21 [ 27.412513] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.421833] ffff8801c8ecf870 ffffffff81d93149 ffffea0007327100 ffff8801cc9c4fb8 [ 27.429773] 0000000000000000 ffff8801cc9c4fb8 ffff8801cc9c4fb8 ffff8801c8ecf8a8 [ 27.437721] ffffffff8153cb43 ffff8801cc9c4fb8 0000000000000008 0000000000000000 [ 27.445663] Call Trace: [ 27.448624] [] dump_stack+0xc1/0x128 [ 27.454570] [] print_address_description+0x73/0x280 [ 27.461199] [] kasan_report+0x275/0x360 [ 27.466789] [] ? __lock_acquire+0x2eff/0x3640 [ 27.472900] [] __asan_report_load8_noabort+0x14/0x20 [ 27.479617] [] __lock_acquire+0x2eff/0x3640 [ 27.485553] [] ? __lock_acquire+0x629/0x3640 [ 27.491837] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.498996] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.505981] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.513747] [] ? mark_held_locks+0xaf/0x100 [ 27.520122] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.526320] [] lock_acquire+0x12e/0x410 [ 27.531907] [] ? remove_wait_queue+0x14/0x40 [ 27.537938] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.544915] [] ? remove_wait_queue+0x14/0x40 [ 27.550939] [] remove_wait_queue+0x14/0x40 [ 27.557926] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.566812] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.574049] [] ? ep_free+0x1b0/0x1b0 [ 27.579376] [] ep_free+0x96/0x1b0 [ 27.584703] [] ? ep_free+0x1b0/0x1b0 [ 27.590032] [] ep_eventpoll_release+0x44/0x60 [ 27.596144] [] __fput+0x28c/0x6e0 [ 27.601218] [] ____fput+0x15/0x20 [ 27.606286] [] task_work_run+0x115/0x190 [ 27.612396] [] do_exit+0x7e7/0x2a40 [ 27.617638] [] ? __pmd_alloc+0x410/0x410 [ 27.623314] [] ? release_task+0x1240/0x1240 [ 27.629249] [] ? __do_page_fault+0x5ec/0xd40 [ 27.635271] [] ? up_read+0x1a/0x40 [ 27.640776] [] ? __do_page_fault+0x3bd/0xd40 [ 27.646801] [] do_group_exit+0x108/0x320 [ 27.652482] [] ? do_group_exit+0x320/0x320 [ 27.658504] [] SyS_exit_group+0x1d/0x20 [ 27.664092] [] do_fast_syscall_32+0x2f7/0x890 [ 27.670200] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.676836] [] entry_SYSENTER_compat+0x74/0x83 [ 27.683036] [ 27.684642] Allocated by task 3326: [ 27.688235] save_stack_trace+0x16/0x20 [ 27.692175] save_stack+0x43/0xd0 [ 27.695679] kasan_kmalloc+0xad/0xe0 [ 27.699355] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.703906] binder_get_thread+0x15d/0x750 [ 27.708105] binder_poll+0x4a/0x210 [ 27.711695] SyS_epoll_ctl+0x11d7/0x2190 [ 27.715718] do_fast_syscall_32+0x2f7/0x890 [ 27.720007] entry_SYSENTER_compat+0x74/0x83 [ 27.724383] [ 27.725981] Freed by task 3326: [ 27.729224] save_stack_trace+0x16/0x20 [ 27.733162] save_stack+0x43/0xd0 [ 27.736588] kasan_slab_free+0x72/0xc0 [ 27.740437] kfree+0x103/0x300 [ 27.743943] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.748769] binder_thread_release+0x27d/0x540 [ 27.753323] binder_ioctl+0x9c0/0x11b0 [ 27.757178] compat_SyS_ioctl+0x15f/0x2050 [ 27.761377] do_fast_syscall_32+0x2f7/0x890 [ 27.765669] entry_SYSENTER_compat+0x74/0x83 [ 27.770047] [ 27.771642] The buggy address belongs to the object at ffff8801cc9c4f00 [ 27.771642] which belongs to the cache kmalloc-512 of size 512 [ 27.786524] The buggy address is located 184 bytes inside of [ 27.786524] 512-byte region [ffff8801cc9c4f00, ffff8801cc9c5100) [ 27.798368] The buggy address belongs to the page: [ 27.803285] page:ffffea0007327100 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.813810] flags: 0x8000000000004080(slab|head) [ 27.818543] page dumped because: kasan: bad access detected [ 27.824228] [ 27.825824] Memory state around the buggy address: [ 27.831074] ffff8801cc9c4e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.838412] ffff8801cc9c4f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.845752] >ffff8801cc9c4f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.853078] ^ [ 27.858233] ffff8801cc9c5000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.865560] ffff8801cc9c5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.872893] ================================================================== [ 27.880218] Disabling lock debugging due to kernel taint [ 27.885635] Kernel panic - not syncing: panic_on_warn set ... [ 27.885635] [ 27.892967] CPU: 1 PID: 3326 Comm: syzkaller098330 Tainted: G B 4.9.76-g8e170a5 #21 [ 27.901864] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.911198] ffff8801c8ecf7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c8ecf8a0 [ 27.919171] 0000000000000000 ffff8801cc9c4fb8 ffff8801cc9c4fb8 ffff8801c8ecf890 [ 27.927163] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 27.935649] Call Trace: [ 27.938208] [] dump_stack+0xc1/0x128 [ 27.943548] [] panic+0x1bc/0x3a8 [ 27.948533] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.956738] [] ? add_taint+0x40/0x50 [ 27.962078] [] kasan_end_report+0x50/0x50 [ 27.969248] [] kasan_report+0x167/0x360 [ 27.974846] [] ? __lock_acquire+0x2eff/0x3640 [ 27.980960] [] __asan_report_load8_noabort+0x14/0x20 [ 27.987695] [] __lock_acquire+0x2eff/0x3640 [ 27.993638] [] ? __lock_acquire+0x629/0x3640 [ 27.999671] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.007105] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.014090] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.021068] [] ? mark_held_locks+0xaf/0x100 [ 28.027009] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.033209] [] lock_acquire+0x12e/0x410 [ 28.038807] [] ? remove_wait_queue+0x14/0x40 [ 28.044843] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.051129] [] ? remove_wait_queue+0x14/0x40 [ 28.057169] [] remove_wait_queue+0x14/0x40 [ 28.063034] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.070128] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.077988] [] ? ep_free+0x1b0/0x1b0 [ 28.083320] [] ep_free+0x96/0x1b0 [ 28.088477] [] ? ep_free+0x1b0/0x1b0 [ 28.094680] [] ep_eventpoll_release+0x44/0x60 [ 28.102708] [] __fput+0x28c/0x6e0 [ 28.107782] [] ____fput+0x15/0x20 [ 28.112865] [] task_work_run+0x115/0x190 [ 28.118549] [] do_exit+0x7e7/0x2a40 [ 28.123805] [] ? __pmd_alloc+0x410/0x410 [ 28.129487] [] ? release_task+0x1240/0x1240 [ 28.135428] [] ? __do_page_fault+0x5ec/0xd40 [ 28.141464] [] ? up_read+0x1a/0x40 [ 28.146624] [] ? __do_page_fault+0x3bd/0xd40 [ 28.152650] [] do_group_exit+0x108/0x320 [ 28.158330] [] ? do_group_exit+0x320/0x320 [ 28.164191] [] SyS_exit_group+0x1d/0x20 [ 28.169784] [] do_fast_syscall_32+0x2f7/0x890 [ 28.175897] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.182533] [] entry_SYSENTER_compat+0x74/0x83 [ 28.189628] Dumping ftrace buffer: [ 28.193136] (ftrace buffer empty) [ 28.196818] Kernel Offset: disabled [ 28.200412] Rebooting in 86400 seconds..