[....] Starting enhanced syslogd: rsyslogd[ 12.500118] audit: type=1400 audit(1515670461.167:4): avc: denied { syslog } for pid=3171 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.199' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 23.644338] ================================================================== [ 23.651734] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 23.658369] Read of size 8 at addr ffff8801ccdd60b8 by task syzkaller249165/3327 [ 23.665867] [ 23.667465] CPU: 1 PID: 3327 Comm: syzkaller249165 Not tainted 4.9.76-g9154940 #10 [ 23.675134] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.684456] ffff8801c88df8e0 ffffffff81d93149 ffffea0007337580 ffff8801ccdd60b8 [ 23.692407] 0000000000000000 ffff8801ccdd60b8 ffff8801ccdd60b8 ffff8801c88df918 [ 23.700352] ffffffff8153cb43 ffff8801ccdd60b8 0000000000000008 0000000000000000 [ 23.708296] Call Trace: [ 23.710853] [] dump_stack+0xc1/0x128 [ 23.716184] [] print_address_description+0x73/0x280 [ 23.722817] [] kasan_report+0x275/0x360 [ 23.728407] [] ? __lock_acquire+0x2eff/0x3640 [ 23.734517] [] __asan_report_load8_noabort+0x14/0x20 [ 23.741233] [] __lock_acquire+0x2eff/0x3640 [ 23.747167] [] ? __lock_acquire+0x629/0x3640 [ 23.753188] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.760164] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.767141] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.774119] [] ? mark_held_locks+0xaf/0x100 [ 23.780070] [] ? mutex_lock_nested+0x5e3/0x870 [ 23.786267] [] lock_acquire+0x12e/0x410 [ 23.791856] [] ? remove_wait_queue+0x14/0x40 [ 23.797876] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 23.804157] [] ? remove_wait_queue+0x14/0x40 [ 23.810179] [] remove_wait_queue+0x14/0x40 [ 23.816030] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 23.823005] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 23.830242] [] ? ep_free+0x1b0/0x1b0 [ 23.835569] [] ep_free+0x96/0x1b0 [ 23.840634] [] ? ep_free+0x1b0/0x1b0 [ 23.845959] [] ep_eventpoll_release+0x44/0x60 [ 23.852068] [] __fput+0x28c/0x6e0 [ 23.857134] [] ____fput+0x15/0x20 [ 23.862201] [] task_work_run+0x115/0x190 [ 23.868144] [] do_exit+0x7e7/0x2a40 [ 23.873385] [] ? selinux_file_ioctl+0x355/0x530 [ 23.879671] [] ? release_task+0x1240/0x1240 [ 23.885607] [] ? SyS_epoll_create+0x190/0x190 [ 23.891717] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 23.898346] [] do_group_exit+0x108/0x320 [ 23.904020] [] SyS_exit_group+0x1d/0x20 [ 23.909610] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 23.916161] [ 23.917755] Allocated by task 3327: [ 23.921349] save_stack_trace+0x16/0x20 [ 23.925290] save_stack+0x43/0xd0 [ 23.928709] kasan_kmalloc+0xad/0xe0 [ 23.932386] kmem_cache_alloc_trace+0xfb/0x2a0 [ 23.936935] binder_get_thread+0x15d/0x750 [ 23.941132] binder_poll+0x4a/0x210 [ 23.944723] SyS_epoll_ctl+0x11d7/0x2190 [ 23.948746] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 23.953462] [ 23.955054] Freed by task 3327: [ 23.958297] save_stack_trace+0x16/0x20 [ 23.962236] save_stack+0x43/0xd0 [ 23.965651] kasan_slab_free+0x72/0xc0 [ 23.969501] kfree+0x103/0x300 [ 23.972665] binder_thread_dec_tmpref+0x1cc/0x240 [ 23.977471] binder_thread_release+0x27d/0x540 [ 23.982014] binder_ioctl+0x9c0/0x11b0 [ 23.985873] do_vfs_ioctl+0x1aa/0x1140 [ 23.989728] SyS_ioctl+0x8f/0xc0 [ 23.993057] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 23.997773] [ 23.999367] The buggy address belongs to the object at ffff8801ccdd6000 [ 23.999367] which belongs to the cache kmalloc-512 of size 512 [ 24.011985] The buggy address is located 184 bytes inside of [ 24.011985] 512-byte region [ffff8801ccdd6000, ffff8801ccdd6200) [ 24.023821] The buggy address belongs to the page: [ 24.028715] page:ffffea0007337580 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.038868] flags: 0x8000000000004080(slab|head) [ 24.043595] page dumped because: kasan: bad access detected [ 24.049267] [ 24.050860] Memory state around the buggy address: [ 24.055753] ffff8801ccdd5f80: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc [ 24.063076] ffff8801ccdd6000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.070487] >ffff8801ccdd6080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.077809] ^ [ 24.082961] ffff8801ccdd6100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.090284] ffff8801ccdd6180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.097606] ================================================================== [ 24.104936] Disabling lock debugging due to kernel taint [ 24.110349] Kernel panic - not syncing: panic_on_warn set ... [ 24.110349] [ 24.117675] CPU: 1 PID: 3327 Comm: syzkaller249165 Tainted: G B 4.9.76-g9154940 #10 [ 24.126560] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.135879] ffff8801c88df838 ffffffff81d93149 ffffffff84195c17 ffff8801c88df910 [ 24.143826] 0000000000000000 ffff8801ccdd60b8 ffff8801ccdd60b8 ffff8801c88df900 [ 24.151776] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 24.159726] Call Trace: [ 24.162289] [] dump_stack+0xc1/0x128 [ 24.167618] [] panic+0x1bc/0x3a8 [ 24.172601] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.180794] [] ? add_taint+0x40/0x50 [ 24.186125] [] kasan_end_report+0x50/0x50 [ 24.191896] [] kasan_report+0x167/0x360 [ 24.197486] [] ? __lock_acquire+0x2eff/0x3640 [ 24.203604] [] __asan_report_load8_noabort+0x14/0x20 [ 24.210321] [] __lock_acquire+0x2eff/0x3640 [ 24.216265] [] ? __lock_acquire+0x629/0x3640 [ 24.222288] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.229265] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.236241] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.243230] [] ? mark_held_locks+0xaf/0x100 [ 24.249167] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.255373] [] lock_acquire+0x12e/0x410 [ 24.260963] [] ? remove_wait_queue+0x14/0x40 [ 24.266995] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.273279] [] ? remove_wait_queue+0x14/0x40 [ 24.279300] [] remove_wait_queue+0x14/0x40 [ 24.285152] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.292131] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.299367] [] ? ep_free+0x1b0/0x1b0 [ 24.304696] [] ep_free+0x96/0x1b0 [ 24.309764] [] ? ep_free+0x1b0/0x1b0 [ 24.315093] [] ep_eventpoll_release+0x44/0x60 [ 24.321206] [] __fput+0x28c/0x6e0 [ 24.326274] [] ____fput+0x15/0x20 [ 24.331341] [] task_work_run+0x115/0x190 [ 24.337017] [] do_exit+0x7e7/0x2a40 [ 24.342260] [] ? selinux_file_ioctl+0x355/0x530 [ 24.348545] [] ? release_task+0x1240/0x1240 [ 24.354483] [] ? SyS_epoll_create+0x190/0x190 [ 24.360601] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 24.367243] [] do_group_exit+0x108/0x320 [ 24.372920] [] SyS_exit_group+0x1d/0x20 [ 24.378508] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 24.385414] Dumping ftrace buffer: [ 24.388926] (ftrace buffer empty) [ 24.392604] Kernel Offset: disabled [ 24.396196] Rebooting in 86400 seconds..