[....] Starting enhanced syslogd: rsyslogd[ 10.915359] audit: type=1400 audit(1516178388.135:4): avc: denied { syslog } for pid=3175 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.30' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.137717] ================================================================== [ 26.138883] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.139782] Read of size 8 at addr ffff8801cd7a6d38 by task syzkaller938004/3332 [ 26.140805] [ 26.141094] CPU: 0 PID: 3332 Comm: syzkaller938004 Not tainted 4.9.76-g8dec074 #23 [ 26.142121] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.143361] ffff8801c8297870 ffffffff81d93169 ffffea000735e980 ffff8801cd7a6d38 [ 26.144711] 0000000000000000 ffff8801cd7a6d38 ffff8801cd7a6d38 ffff8801c82978a8 [ 26.146017] ffffffff8153cb43 ffff8801cd7a6d38 0000000000000008 0000000000000000 [ 26.147297] Call Trace: [ 26.147695] [] dump_stack+0xc1/0x128 [ 26.148512] [] print_address_description+0x73/0x280 [ 26.149443] [] kasan_report+0x275/0x360 [ 26.150225] [] ? __lock_acquire+0x2eff/0x3640 [ 26.151053] [] __asan_report_load8_noabort+0x14/0x20 [ 26.151961] [] __lock_acquire+0x2eff/0x3640 [ 26.152802] [] ? __lock_acquire+0x629/0x3640 [ 26.153677] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.154630] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.155599] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.156598] [] ? mark_held_locks+0xaf/0x100 [ 26.157404] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.160823] [] lock_acquire+0x12e/0x410 [ 26.166434] [] ? remove_wait_queue+0x14/0x40 [ 26.172459] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.178747] [] ? remove_wait_queue+0x14/0x40 [ 26.184777] [] remove_wait_queue+0x14/0x40 [ 26.190633] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.197614] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.204855] [] ? ep_free+0x1b0/0x1b0 [ 26.210186] [] ep_free+0x96/0x1b0 [ 26.215257] [] ? ep_free+0x1b0/0x1b0 [ 26.220586] [] ep_eventpoll_release+0x44/0x60 [ 26.226699] [] __fput+0x28c/0x6e0 [ 26.231771] [] ____fput+0x15/0x20 [ 26.236849] [] task_work_run+0x115/0x190 [ 26.242528] [] do_exit+0x7e7/0x2a40 [ 26.247775] [] ? __pmd_alloc+0x410/0x410 [ 26.253453] [] ? release_task+0x1240/0x1240 [ 26.259393] [] ? __do_page_fault+0x5ec/0xd40 [ 26.265420] [] ? up_read+0x1a/0x40 [ 26.270579] [] ? __do_page_fault+0x3bd/0xd40 [ 26.276607] [] do_group_exit+0x108/0x320 [ 26.282288] [] ? do_group_exit+0x320/0x320 [ 26.288143] [] SyS_exit_group+0x1d/0x20 [ 26.293738] [] do_fast_syscall_32+0x2f7/0x890 [ 26.299850] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.306486] [] entry_SYSENTER_compat+0x74/0x83 [ 26.312684] [ 26.314281] Allocated by task 3332: [ 26.317880] save_stack_trace+0x16/0x20 [ 26.321824] save_stack+0x43/0xd0 [ 26.325255] kasan_kmalloc+0xad/0xe0 [ 26.328938] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.333493] binder_get_thread+0x15d/0x750 [ 26.337693] binder_poll+0x4a/0x210 [ 26.341302] SyS_epoll_ctl+0x11d7/0x2190 [ 26.345330] do_fast_syscall_32+0x2f7/0x890 [ 26.349618] entry_SYSENTER_compat+0x74/0x83 [ 26.354000] [ 26.355598] Freed by task 3332: [ 26.358850] save_stack_trace+0x16/0x20 [ 26.362792] save_stack+0x43/0xd0 [ 26.366213] kasan_slab_free+0x72/0xc0 [ 26.370066] kfree+0x103/0x300 [ 26.373225] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.378032] binder_thread_release+0x27d/0x540 [ 26.382580] binder_ioctl+0x9c0/0x11b0 [ 26.386435] compat_SyS_ioctl+0x15f/0x2050 [ 26.390635] do_fast_syscall_32+0x2f7/0x890 [ 26.394923] entry_SYSENTER_compat+0x74/0x83 [ 26.399297] [ 26.400893] The buggy address belongs to the object at ffff8801cd7a6c80 [ 26.400893] which belongs to the cache kmalloc-512 of size 512 [ 26.413516] The buggy address is located 184 bytes inside of [ 26.413516] 512-byte region [ffff8801cd7a6c80, ffff8801cd7a6e80) [ 26.425352] The buggy address belongs to the page: [ 26.430259] page:ffffea000735e980 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.440427] flags: 0x8000000000004080(slab|head) [ 26.445146] page dumped because: kasan: bad access detected [ 26.450821] [ 26.452419] Memory state around the buggy address: [ 26.457316] ffff8801cd7a6c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.464652] ffff8801cd7a6c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.471978] >ffff8801cd7a6d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.479303] ^ [ 26.484461] ffff8801cd7a6d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.491786] ffff8801cd7a6e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.499108] ================================================================== [ 26.506443] Disabling lock debugging due to kernel taint [ 26.511859] Kernel panic - not syncing: panic_on_warn set ... [ 26.511859] [ 26.519188] CPU: 0 PID: 3332 Comm: syzkaller938004 Tainted: G B 4.9.76-g8dec074 #23 [ 26.528076] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.537402] ffff8801c82977c8 ffffffff81d93169 ffffffff84195c2f ffff8801c82978a0 [ 26.545381] 0000000000000000 ffff8801cd7a6d38 ffff8801cd7a6d38 ffff8801c8297890 [ 26.553349] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 26.561322] Call Trace: [ 26.563881] [] dump_stack+0xc1/0x128 [ 26.569214] [] panic+0x1bc/0x3a8 [ 26.574198] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.582397] [] ? add_taint+0x40/0x50 [ 26.587731] [] kasan_end_report+0x50/0x50 [ 26.593496] [] kasan_report+0x167/0x360 [ 26.599100] [] ? __lock_acquire+0x2eff/0x3640 [ 26.605213] [] __asan_report_load8_noabort+0x14/0x20 [ 26.611936] [] __lock_acquire+0x2eff/0x3640 [ 26.617874] [] ? __lock_acquire+0x629/0x3640 [ 26.623901] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.630880] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.637861] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.644842] [] ? mark_held_locks+0xaf/0x100 [ 26.650780] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.656978] [] lock_acquire+0x12e/0x410 [ 26.662572] [] ? remove_wait_queue+0x14/0x40 [ 26.668607] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.674892] [] ? remove_wait_queue+0x14/0x40 [ 26.680917] [] remove_wait_queue+0x14/0x40 [ 26.686772] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.693751] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.700995] [] ? ep_free+0x1b0/0x1b0 [ 26.706336] [] ep_free+0x96/0x1b0 [ 26.711417] [] ? ep_free+0x1b0/0x1b0 [ 26.716752] [] ep_eventpoll_release+0x44/0x60 [ 26.722867] [] __fput+0x28c/0x6e0 [ 26.727938] [] ____fput+0x15/0x20 [ 26.733010] [] task_work_run+0x115/0x190 [ 26.738689] [] do_exit+0x7e7/0x2a40 [ 26.743939] [] ? __pmd_alloc+0x410/0x410 [ 26.749623] [] ? release_task+0x1240/0x1240 [ 26.755567] [] ? __do_page_fault+0x5ec/0xd40 [ 26.761599] [] ? up_read+0x1a/0x40 [ 26.766757] [] ? __do_page_fault+0x3bd/0xd40 [ 26.772785] [] do_group_exit+0x108/0x320 [ 26.778464] [] ? do_group_exit+0x320/0x320 [ 26.784318] [] SyS_exit_group+0x1d/0x20 [ 26.789912] [] do_fast_syscall_32+0x2f7/0x890 [ 26.796023] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.802660] [] entry_SYSENTER_compat+0x74/0x83 [ 26.809251] Dumping ftrace buffer: [ 26.813108] (ftrace buffer empty) [ 26.816796] Kernel Offset: disabled [ 26.820396] Rebooting in 86400 seconds..