[....] Starting enhanced syslogd: rsyslogd[ 11.183590] audit: type=1400 audit(1514242854.747: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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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 'ci-android-49-kasan-gce-7,10.128.15.233' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 24.617779] ================================================================== [ 24.618919] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 24.619807] Read of size 8 at addr ffff8801c70a25b8 by task syzkaller296343/3332 [ 24.620836] [ 24.621080] CPU: 1 PID: 3332 Comm: syzkaller296343 Not tainted 4.9.71-g2506378 #113 [ 24.622140] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.623489] ffff8801c7f8f8e0 ffffffff81d922b9 ffffea00071c2880 ffff8801c70a25b8 [ 24.625502] 0000000000000000 ffff8801c70a25b8 ffff8801c70a25b8 ffff8801c7f8f918 [ 24.626709] ffffffff8153bab3 ffff8801c70a25b8 0000000000000008 0000000000000000 [ 24.628011] Call Trace: [ 24.628451] [] dump_stack+0xc1/0x128 [ 24.629245] [] print_address_description+0x73/0x280 [ 24.630133] [] kasan_report+0x275/0x360 [ 24.630888] [] ? __lock_acquire+0x2eff/0x3640 [ 24.631698] [] __asan_report_load8_noabort+0x14/0x20 [ 24.632613] [] __lock_acquire+0x2eff/0x3640 [ 24.633399] [] ? __lock_acquire+0x629/0x3640 [ 24.634200] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.635132] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.636052] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.636972] [] ? mark_held_locks+0xaf/0x100 [ 24.637822] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.643526] [] lock_acquire+0x12e/0x410 [ 24.649124] [] ? remove_wait_queue+0x14/0x40 [ 24.655145] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.661426] [] ? remove_wait_queue+0x14/0x40 [ 24.667449] [] remove_wait_queue+0x14/0x40 [ 24.673300] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.680278] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.687515] [] ? ep_free+0x1b0/0x1b0 [ 24.692859] [] ep_free+0x96/0x1b0 [ 24.697927] [] ? ep_free+0x1b0/0x1b0 [ 24.703253] [] ep_eventpoll_release+0x44/0x60 [ 24.709363] [] __fput+0x28c/0x6e0 [ 24.714431] [] ____fput+0x15/0x20 [ 24.719502] [] task_work_run+0x115/0x190 [ 24.725190] [] do_exit+0x7e7/0x2a40 [ 24.730447] [] ? selinux_file_ioctl+0x355/0x530 [ 24.736735] [] ? release_task+0x1240/0x1240 [ 24.742673] [] ? SyS_epoll_create+0x190/0x190 [ 24.748803] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 24.755437] [] do_group_exit+0x108/0x320 [ 24.761114] [] SyS_exit_group+0x1d/0x20 [ 24.766713] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.773255] [ 24.774850] Allocated by task 3332: [ 24.778445] save_stack_trace+0x16/0x20 [ 24.782384] save_stack+0x43/0xd0 [ 24.785801] kasan_kmalloc+0xad/0xe0 [ 24.789483] kmem_cache_alloc_trace+0xfb/0x2a0 [ 24.794042] binder_get_thread+0x15d/0x750 [ 24.798243] binder_poll+0x4a/0x210 [ 24.801837] SyS_epoll_ctl+0x11d7/0x2190 [ 24.805875] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.810595] [ 24.812188] Freed by task 3332: [ 24.815432] save_stack_trace+0x16/0x20 [ 24.819370] save_stack+0x43/0xd0 [ 24.822790] kasan_slab_free+0x72/0xc0 [ 24.826642] kfree+0x103/0x300 [ 24.829799] binder_thread_dec_tmpref+0x1cc/0x240 [ 24.834618] binder_thread_release+0x27d/0x540 [ 24.839167] binder_ioctl+0x9c0/0x11b0 [ 24.843017] do_vfs_ioctl+0x1aa/0x1140 [ 24.846878] SyS_ioctl+0x8f/0xc0 [ 24.850210] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 24.854927] [ 24.856524] The buggy address belongs to the object at ffff8801c70a2500 [ 24.856524] which belongs to the cache kmalloc-512 of size 512 [ 24.869142] The buggy address is located 184 bytes inside of [ 24.869142] 512-byte region [ffff8801c70a2500, ffff8801c70a2700) [ 24.880987] The buggy address belongs to the page: [ 24.885894] page:ffffea00071c2880 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.896065] flags: 0x8000000000004080(slab|head) [ 24.900788] page dumped because: kasan: bad access detected [ 24.906466] [ 24.908059] Memory state around the buggy address: [ 24.912978] ffff8801c70a2480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.920313] ffff8801c70a2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.927636] >ffff8801c70a2580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.934958] ^ [ 24.940111] ffff8801c70a2600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.947435] ffff8801c70a2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.954759] ================================================================== [ 24.962077] Disabling lock debugging due to kernel taint [ 24.967498] Kernel panic - not syncing: panic_on_warn set ... [ 24.967498] [ 24.974843] CPU: 1 PID: 3332 Comm: syzkaller296343 Tainted: G B 4.9.71-g2506378 #113 [ 24.983828] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.993152] ffff8801c7f8f838 ffffffff81d922b9 ffffffff84194b3f ffff8801c7f8f910 [ 25.001101] 0000000000000000 ffff8801c70a25b8 ffff8801c70a25b8 ffff8801c7f8f900 [ 25.009046] ffffffff8142d741 0000000041b58ab3 ffffffff84188580 ffffffff8142d585 [ 25.017002] Call Trace: [ 25.019560] [] dump_stack+0xc1/0x128 [ 25.024898] [] panic+0x1bc/0x3a8 [ 25.029880] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.038080] [] ? add_taint+0x40/0x50 [ 25.043408] [] kasan_end_report+0x50/0x50 [ 25.049169] [] kasan_report+0x167/0x360 [ 25.054769] [] ? __lock_acquire+0x2eff/0x3640 [ 25.060885] [] __asan_report_load8_noabort+0x14/0x20 [ 25.067605] [] __lock_acquire+0x2eff/0x3640 [ 25.073543] [] ? __lock_acquire+0x629/0x3640 [ 25.079568] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.086548] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.093525] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.100505] [] ? mark_held_locks+0xaf/0x100 [ 25.106453] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.112650] [] lock_acquire+0x12e/0x410 [ 25.118246] [] ? remove_wait_queue+0x14/0x40 [ 25.124292] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.130577] [] ? remove_wait_queue+0x14/0x40 [ 25.136604] [] remove_wait_queue+0x14/0x40 [ 25.142460] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.149438] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.156675] [] ? ep_free+0x1b0/0x1b0 [ 25.162005] [] ep_free+0x96/0x1b0 [ 25.167074] [] ? ep_free+0x1b0/0x1b0 [ 25.172403] [] ep_eventpoll_release+0x44/0x60 [ 25.178516] [] __fput+0x28c/0x6e0 [ 25.183586] [] ____fput+0x15/0x20 [ 25.188653] [] task_work_run+0x115/0x190 [ 25.194343] [] do_exit+0x7e7/0x2a40 [ 25.199586] [] ? selinux_file_ioctl+0x355/0x530 [ 25.205872] [] ? release_task+0x1240/0x1240 [ 25.211818] [] ? SyS_epoll_create+0x190/0x190 [ 25.217931] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 25.224563] [] do_group_exit+0x108/0x320 [ 25.230239] [] SyS_exit_group+0x1d/0x20 [ 25.235828] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.242409] Dumping ftrace buffer: [ 25.245916] (ftrace buffer empty) [ 25.249593] Kernel Offset: disabled [ 25.253183] Rebooting in 86400 seconds..