[....] Starting enhanced syslogd: rsyslogd[ 10.439555] audit: type=1400 audit(1515672213.807:4): avc: denied { syslog } for pid=3172 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.44' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 29.722992] ================================================================== [ 29.724160] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 29.725117] Read of size 8 at addr ffff8801c89079b8 by task syzkaller478847/3330 [ 29.726116] [ 29.726348] CPU: 0 PID: 3330 Comm: syzkaller478847 Not tainted 4.9.76-g9154940 #10 [ 29.727354] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.728715] ffff8801c92878e0 ffffffff81d93149 ffffea0007224180 ffff8801c89079b8 [ 29.729917] 0000000000000000 ffff8801c89079b8 ffff8801c89079b8 ffff8801c9287918 [ 29.731050] ffffffff8153cb43 ffff8801c89079b8 0000000000000008 0000000000000000 [ 29.732214] Call Trace: [ 29.732584] [] dump_stack+0xc1/0x128 [ 29.733301] [] print_address_description+0x73/0x280 [ 29.734237] [] kasan_report+0x275/0x360 [ 29.734980] [] ? __lock_acquire+0x2eff/0x3640 [ 29.735793] [] __asan_report_load8_noabort+0x14/0x20 [ 29.736690] [] __lock_acquire+0x2eff/0x3640 [ 29.737477] [] ? __lock_acquire+0x629/0x3640 [ 29.738288] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.739224] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.740149] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.741068] [] ? mark_held_locks+0xaf/0x100 [ 29.741919] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.742741] [] lock_acquire+0x12e/0x410 [ 29.743483] [] ? remove_wait_queue+0x14/0x40 [ 29.749516] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.755802] [] ? remove_wait_queue+0x14/0x40 [ 29.761826] [] remove_wait_queue+0x14/0x40 [ 29.767683] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.774660] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.781897] [] ? ep_free+0x1b0/0x1b0 [ 29.787235] [] ep_free+0x96/0x1b0 [ 29.792318] [] ? ep_free+0x1b0/0x1b0 [ 29.797654] [] ep_eventpoll_release+0x44/0x60 [ 29.803787] [] __fput+0x28c/0x6e0 [ 29.808858] [] ____fput+0x15/0x20 [ 29.813935] [] task_work_run+0x115/0x190 [ 29.819612] [] do_exit+0x7e7/0x2a40 [ 29.824857] [] ? selinux_file_ioctl+0x355/0x530 [ 29.831172] [] ? release_task+0x1240/0x1240 [ 29.837128] [] ? SyS_epoll_create+0x190/0x190 [ 29.843269] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 29.849926] [] do_group_exit+0x108/0x320 [ 29.855600] [] SyS_exit_group+0x1d/0x20 [ 29.861191] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.867751] [ 29.869347] Allocated by task 3330: [ 29.872941] save_stack_trace+0x16/0x20 [ 29.876880] save_stack+0x43/0xd0 [ 29.880297] kasan_kmalloc+0xad/0xe0 [ 29.883974] kmem_cache_alloc_trace+0xfb/0x2a0 [ 29.888522] binder_get_thread+0x15d/0x750 [ 29.892721] binder_poll+0x4a/0x210 [ 29.896314] SyS_epoll_ctl+0x11d7/0x2190 [ 29.900340] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.905067] [ 29.906659] Freed by task 3330: [ 29.909903] save_stack_trace+0x16/0x20 [ 29.913840] save_stack+0x43/0xd0 [ 29.917259] kasan_slab_free+0x72/0xc0 [ 29.921115] kfree+0x103/0x300 [ 29.924276] binder_thread_dec_tmpref+0x1cc/0x240 [ 29.929085] binder_thread_release+0x27d/0x540 [ 29.933630] binder_ioctl+0x9c0/0x11b0 [ 29.937481] do_vfs_ioctl+0x1aa/0x1140 [ 29.941330] SyS_ioctl+0x8f/0xc0 [ 29.944660] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.949381] [ 29.950978] The buggy address belongs to the object at ffff8801c8907900 [ 29.950978] which belongs to the cache kmalloc-512 of size 512 [ 29.963642] The buggy address is located 184 bytes inside of [ 29.963642] 512-byte region [ffff8801c8907900, ffff8801c8907b00) [ 29.975479] The buggy address belongs to the page: [ 29.980387] page:ffffea0007224180 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 29.990567] flags: 0x8000000000004080(slab|head) [ 29.995291] page dumped because: kasan: bad access detected [ 30.000988] [ 30.002582] Memory state around the buggy address: [ 30.007478] ffff8801c8907880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.014806] ffff8801c8907900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.022131] >ffff8801c8907980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.029454] ^ [ 30.034606] ffff8801c8907a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.041932] ffff8801c8907a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.049253] ================================================================== [ 30.056591] Disabling lock debugging due to kernel taint [ 30.062014] Kernel panic - not syncing: panic_on_warn set ... [ 30.062014] [ 30.069359] CPU: 0 PID: 3330 Comm: syzkaller478847 Tainted: G B 4.9.76-g9154940 #10 [ 30.078260] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.087597] ffff8801c9287838 ffffffff81d93149 ffffffff84195c17 ffff8801c9287910 [ 30.095568] 0000000000000000 ffff8801c89079b8 ffff8801c89079b8 ffff8801c9287900 [ 30.103521] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 30.111488] Call Trace: [ 30.114046] [] dump_stack+0xc1/0x128 [ 30.119409] [] panic+0x1bc/0x3a8 [ 30.124393] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 30.132594] [] ? add_taint+0x40/0x50 [ 30.137931] [] kasan_end_report+0x50/0x50 [ 30.143696] [] kasan_report+0x167/0x360 [ 30.149301] [] ? __lock_acquire+0x2eff/0x3640 [ 30.155412] [] __asan_report_load8_noabort+0x14/0x20 [ 30.162130] [] __lock_acquire+0x2eff/0x3640 [ 30.168078] [] ? __lock_acquire+0x629/0x3640 [ 30.174101] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.181091] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.188078] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 30.195056] [] ? mark_held_locks+0xaf/0x100 [ 30.201011] [] ? mutex_lock_nested+0x5e3/0x870 [ 30.207209] [] lock_acquire+0x12e/0x410 [ 30.212807] [] ? remove_wait_queue+0x14/0x40 [ 30.218841] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 30.225124] [] ? remove_wait_queue+0x14/0x40 [ 30.231154] [] remove_wait_queue+0x14/0x40 [ 30.237006] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 30.244017] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 30.251284] [] ? ep_free+0x1b0/0x1b0 [ 30.256613] [] ep_free+0x96/0x1b0 [ 30.261694] [] ? ep_free+0x1b0/0x1b0 [ 30.267038] [] ep_eventpoll_release+0x44/0x60 [ 30.273150] [] __fput+0x28c/0x6e0 [ 30.278217] [] ____fput+0x15/0x20 [ 30.283289] [] task_work_run+0x115/0x190 [ 30.288977] [] do_exit+0x7e7/0x2a40 [ 30.294219] [] ? selinux_file_ioctl+0x355/0x530 [ 30.300505] [] ? release_task+0x1240/0x1240 [ 30.306462] [] ? SyS_epoll_create+0x190/0x190 [ 30.312576] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 30.319210] [] do_group_exit+0x108/0x320 [ 30.324907] [] SyS_exit_group+0x1d/0x20 [ 30.330500] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 30.337082] Dumping ftrace buffer: [ 30.340587] (ftrace buffer empty) [ 30.344264] Kernel Offset: disabled [ 30.347857] Rebooting in 86400 seconds..