[....] Starting enhanced syslogd: rsyslogd[ 11.157008] audit: type=1400 audit(1515617364.712:4): avc: denied { syslog } for pid=3176 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.15.240' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.122035] ================================================================== [ 28.123177] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 28.124081] Read of size 8 at addr ffff8801cb26e838 by task syzkaller543022/3333 [ 28.125098] [ 28.125330] CPU: 0 PID: 3333 Comm: syzkaller543022 Not tainted 4.9.76-g9154940 #20 [ 28.126360] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.127576] ffff8801c056f850 ffffffff81d93149 ffffea00072c9b80 ffff8801cb26e838 [ 28.128698] 0000000000000000 ffff8801cb26e838 ffff8801cb26e838 ffff8801c056f888 [ 28.129822] ffffffff8153cb43 ffff8801cb26e838 0000000000000008 0000000000000000 [ 28.130988] Call Trace: [ 28.131361] [] dump_stack+0xc1/0x128 [ 28.132073] [] print_address_description+0x73/0x280 [ 28.132948] [] kasan_report+0x275/0x360 [ 28.133762] [] ? __lock_acquire+0x2eff/0x3640 [ 28.134607] [] __asan_report_load8_noabort+0x14/0x20 [ 28.135520] [] __lock_acquire+0x2eff/0x3640 [ 28.136347] [] ? __lock_acquire+0x629/0x3640 [ 28.137155] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.138084] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.139003] [] ? __lock_is_held+0xa1/0xf0 [ 28.139797] [] lock_acquire+0x12e/0x410 [ 28.140611] [] ? remove_wait_queue+0x14/0x40 [ 28.141530] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.142470] [] ? remove_wait_queue+0x14/0x40 [ 28.148500] [] remove_wait_queue+0x14/0x40 [ 28.154359] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.161354] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.168868] [] ep_remove+0x41/0x290 [ 28.174167] [] eventpoll_release_file+0xc5/0x140 [ 28.180550] [] __fput+0x5a8/0x6e0 [ 28.185622] [] ____fput+0x15/0x20 [ 28.190693] [] task_work_run+0x115/0x190 [ 28.196369] [] do_exit+0x7e7/0x2a40 [ 28.203026] [] ? __pmd_alloc+0x410/0x410 [ 28.208705] [] ? release_task+0x1240/0x1240 [ 28.214643] [] ? __do_page_fault+0x5ec/0xd40 [ 28.220665] [] ? up_read+0x1a/0x40 [ 28.225818] [] ? __do_page_fault+0x3bd/0xd40 [ 28.231839] [] do_group_exit+0x108/0x320 [ 28.237514] [] ? do_group_exit+0x320/0x320 [ 28.243362] [] SyS_exit_group+0x1d/0x20 [ 28.248952] [] do_fast_syscall_32+0x2f7/0x890 [ 28.255060] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.261691] [] entry_SYSENTER_compat+0x74/0x83 [ 28.267884] [ 28.269476] Allocated by task 3333: [ 28.273069] save_stack_trace+0x16/0x20 [ 28.277010] save_stack+0x43/0xd0 [ 28.280426] kasan_kmalloc+0xad/0xe0 [ 28.284104] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.288660] binder_get_thread+0x15d/0x750 [ 28.292864] binder_poll+0x4a/0x210 [ 28.296455] SyS_epoll_ctl+0x11d7/0x2190 [ 28.300478] do_fast_syscall_32+0x2f7/0x890 [ 28.304769] entry_SYSENTER_compat+0x74/0x83 [ 28.309137] [ 28.310730] Freed by task 3333: [ 28.313974] save_stack_trace+0x16/0x20 [ 28.317908] save_stack+0x43/0xd0 [ 28.321325] kasan_slab_free+0x72/0xc0 [ 28.325173] kfree+0x103/0x300 [ 28.328330] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.333150] binder_thread_release+0x27d/0x540 [ 28.337693] binder_ioctl+0x9c0/0x11b0 [ 28.341544] compat_SyS_ioctl+0x15f/0x2050 [ 28.345742] do_fast_syscall_32+0x2f7/0x890 [ 28.350028] entry_SYSENTER_compat+0x74/0x83 [ 28.354395] [ 28.355999] The buggy address belongs to the object at ffff8801cb26e780 [ 28.355999] which belongs to the cache kmalloc-512 of size 512 [ 28.369053] The buggy address is located 184 bytes inside of [ 28.369053] 512-byte region [ffff8801cb26e780, ffff8801cb26e980) [ 28.380890] The buggy address belongs to the page: [ 28.385784] page:ffffea00072c9b80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.395934] flags: 0x8000000000004080(slab|head) [ 28.400651] page dumped because: kasan: bad access detected [ 28.406321] [ 28.407913] Memory state around the buggy address: [ 28.412805] ffff8801cb26e700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.420127] ffff8801cb26e780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.427449] >ffff8801cb26e800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.435117] ^ [ 28.440267] ffff8801cb26e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.447588] ffff8801cb26e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.457163] ================================================================== [ 28.464483] Disabling lock debugging due to kernel taint [ 28.471810] Kernel panic - not syncing: panic_on_warn set ... [ 28.471810] [ 28.480611] CPU: 0 PID: 3333 Comm: syzkaller543022 Tainted: G B 4.9.76-g9154940 #20 [ 28.489494] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.498818] ffff8801c056f7a8 ffffffff81d93149 ffffffff84195c17 ffff8801c056f880 [ 28.506759] 0000000000000000 ffff8801cb26e838 ffff8801cb26e838 ffff8801c056f870 [ 28.514699] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 28.522651] Call Trace: [ 28.525203] [] dump_stack+0xc1/0x128 [ 28.530532] [] panic+0x1bc/0x3a8 [ 28.535514] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 28.543707] [] ? add_taint+0x40/0x50 [ 28.549034] [] kasan_end_report+0x50/0x50 [ 28.554798] [] kasan_report+0x167/0x360 [ 28.560385] [] ? __lock_acquire+0x2eff/0x3640 [ 28.566581] [] __asan_report_load8_noabort+0x14/0x20 [ 28.573300] [] __lock_acquire+0x2eff/0x3640 [ 28.579241] [] ? __lock_acquire+0x629/0x3640 [ 28.585264] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.592242] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.599220] [] ? __lock_is_held+0xa1/0xf0 [ 28.604982] [] lock_acquire+0x12e/0x410 [ 28.610571] [] ? remove_wait_queue+0x14/0x40 [ 28.616598] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.622881] [] ? remove_wait_queue+0x14/0x40 [ 28.628904] [] remove_wait_queue+0x14/0x40 [ 28.634752] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.641731] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.648970] [] ep_remove+0x41/0x290 [ 28.654383] [] eventpoll_release_file+0xc5/0x140 [ 28.660758] [] __fput+0x5a8/0x6e0 [ 28.665826] [] ____fput+0x15/0x20 [ 28.670893] [] task_work_run+0x115/0x190 [ 28.676566] [] do_exit+0x7e7/0x2a40 [ 28.681820] [] ? __pmd_alloc+0x410/0x410 [ 28.687512] [] ? release_task+0x1240/0x1240 [ 28.693449] [] ? __do_page_fault+0x5ec/0xd40 [ 28.699471] [] ? up_read+0x1a/0x40 [ 28.704631] [] ? __do_page_fault+0x3bd/0xd40 [ 28.710651] [] do_group_exit+0x108/0x320 [ 28.716340] [] ? do_group_exit+0x320/0x320 [ 28.722189] [] SyS_exit_group+0x1d/0x20 [ 28.727776] [] do_fast_syscall_32+0x2f7/0x890 [ 28.733890] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.741565] [] entry_SYSENTER_compat+0x74/0x83 [ 28.747796] Dumping ftrace buffer: [ 28.752773] (ftrace buffer empty) [ 28.757693] Kernel Offset: disabled [ 28.761282] Rebooting in 86400 seconds..