[....] Starting enhanced syslogd: rsyslogd[ 11.681889] audit: type=1400 audit(1515010675.445:4): avc: denied { syslog } for pid=3173 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.8' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.315173] ================================================================== [ 20.316223] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.317111] Read of size 8 at addr ffff8801c93574b8 by task syzkaller980387/3328 [ 20.318110] [ 20.318341] CPU: 1 PID: 3328 Comm: syzkaller980387 Not tainted 4.9.74-g4406671 #3 [ 20.319336] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.320553] ffff8801c8c178e0 ffffffff81d91d19 ffffea000724d580 ffff8801c93574b8 [ 20.321697] 0000000000000000 ffff8801c93574b8 ffff8801c93574b8 ffff8801c8c17918 [ 20.322828] ffffffff8153b503 ffff8801c93574b8 0000000000000008 0000000000000000 [ 20.324022] Call Trace: [ 20.324386] [] dump_stack+0xc1/0x128 [ 20.325096] [] print_address_description+0x73/0x280 [ 20.325982] [] kasan_report+0x275/0x360 [ 20.326724] [] ? __lock_acquire+0x2eff/0x3640 [ 20.327553] [] __asan_report_load8_noabort+0x14/0x20 [ 20.328445] [] __lock_acquire+0x2eff/0x3640 [ 20.329233] [] ? __lock_acquire+0x629/0x3640 [ 20.330032] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.330951] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.331870] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.332789] [] ? mark_held_locks+0xaf/0x100 [ 20.333593] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.334411] [] lock_acquire+0x12e/0x410 [ 20.335151] [] ? remove_wait_queue+0x14/0x40 [ 20.340437] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.346718] [] ? remove_wait_queue+0x14/0x40 [ 20.352740] [] remove_wait_queue+0x14/0x40 [ 20.358592] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.365571] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.372810] [] ? ep_free+0x1b0/0x1b0 [ 20.378139] [] ep_free+0x96/0x1b0 [ 20.383205] [] ? ep_free+0x1b0/0x1b0 [ 20.388541] [] ep_eventpoll_release+0x44/0x60 [ 20.394650] [] __fput+0x28c/0x6e0 [ 20.399734] [] ____fput+0x15/0x20 [ 20.404805] [] task_work_run+0x115/0x190 [ 20.410483] [] do_exit+0x7e7/0x2a40 [ 20.415726] [] ? selinux_file_ioctl+0x355/0x530 [ 20.422012] [] ? release_task+0x1240/0x1240 [ 20.427949] [] ? SyS_epoll_create+0x190/0x190 [ 20.434064] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.440693] [] do_group_exit+0x108/0x320 [ 20.446369] [] SyS_exit_group+0x1d/0x20 [ 20.451957] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.458498] [ 20.460091] Allocated by task 3328: [ 20.463856] save_stack_trace+0x16/0x20 [ 20.467796] save_stack+0x43/0xd0 [ 20.471214] kasan_kmalloc+0xad/0xe0 [ 20.474891] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.479437] binder_get_thread+0x15d/0x750 [ 20.483639] binder_poll+0x4a/0x210 [ 20.487230] SyS_epoll_ctl+0x11d7/0x2190 [ 20.491259] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.495977] [ 20.497570] Freed by task 3328: [ 20.500817] save_stack_trace+0x16/0x20 [ 20.504756] save_stack+0x43/0xd0 [ 20.508175] kasan_slab_free+0x72/0xc0 [ 20.512029] kfree+0x103/0x300 [ 20.515187] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.519992] binder_thread_release+0x27d/0x540 [ 20.524536] binder_ioctl+0x9c0/0x11b0 [ 20.528387] do_vfs_ioctl+0x1aa/0x1140 [ 20.532237] SyS_ioctl+0x8f/0xc0 [ 20.535568] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.540283] [ 20.541875] The buggy address belongs to the object at ffff8801c9357400 [ 20.541875] which belongs to the cache kmalloc-512 of size 512 [ 20.554495] The buggy address is located 184 bytes inside of [ 20.554495] 512-byte region [ffff8801c9357400, ffff8801c9357600) [ 20.566334] The buggy address belongs to the page: [ 20.571231] page:ffffea000724d580 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.581392] flags: 0x8000000000004080(slab|head) [ 20.586109] page dumped because: kasan: bad access detected [ 20.591780] [ 20.593373] Memory state around the buggy address: [ 20.598264] ffff8801c9357380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.605587] ffff8801c9357400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.612908] >ffff8801c9357480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.620229] ^ [ 20.625381] ffff8801c9357500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.632707] ffff8801c9357580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.640027] ================================================================== [ 20.647348] Disabling lock debugging due to kernel taint [ 20.652758] Kernel panic - not syncing: panic_on_warn set ... [ 20.652758] [ 20.660084] CPU: 1 PID: 3328 Comm: syzkaller980387 Tainted: G B 4.9.74-g4406671 #3 [ 20.668882] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.678201] ffff8801c8c17838 ffffffff81d91d19 ffffffff8419562f ffff8801c8c17910 [ 20.686146] 0000000000000000 ffff8801c93574b8 ffff8801c93574b8 ffff8801c8c17900 [ 20.694098] ffffffff8142d161 0000000041b58ab3 ffffffff84189070 ffffffff8142cfa5 [ 20.702045] Call Trace: [ 20.704600] [] dump_stack+0xc1/0x128 [ 20.709928] [] panic+0x1bc/0x3a8 [ 20.714913] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.723108] [] ? add_taint+0x40/0x50 [ 20.728438] [] kasan_end_report+0x50/0x50 [ 20.734197] [] kasan_report+0x167/0x360 [ 20.739789] [] ? __lock_acquire+0x2eff/0x3640 [ 20.745899] [] __asan_report_load8_noabort+0x14/0x20 [ 20.752614] [] __lock_acquire+0x2eff/0x3640 [ 20.758550] [] ? __lock_acquire+0x629/0x3640 [ 20.764570] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.771547] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.778527] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.785503] [] ? mark_held_locks+0xaf/0x100 [ 20.791440] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.797636] [] lock_acquire+0x12e/0x410 [ 20.803223] [] ? remove_wait_queue+0x14/0x40 [ 20.809245] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.815528] [] ? remove_wait_queue+0x14/0x40 [ 20.821554] [] remove_wait_queue+0x14/0x40 [ 20.827409] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.834387] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.841624] [] ? ep_free+0x1b0/0x1b0 [ 20.846950] [] ep_free+0x96/0x1b0 [ 20.852015] [] ? ep_free+0x1b0/0x1b0 [ 20.857340] [] ep_eventpoll_release+0x44/0x60 [ 20.863449] [] __fput+0x28c/0x6e0 [ 20.868517] [] ____fput+0x15/0x20 [ 20.873583] [] task_work_run+0x115/0x190 [ 20.879259] [] do_exit+0x7e7/0x2a40 [ 20.884501] [] ? selinux_file_ioctl+0x355/0x530 [ 20.890783] [] ? release_task+0x1240/0x1240 [ 20.896717] [] ? SyS_epoll_create+0x190/0x190 [ 20.902826] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 20.909455] [] do_group_exit+0x108/0x320 [ 20.915128] [] SyS_exit_group+0x1d/0x20 [ 20.920720] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 20.927716] Dumping ftrace buffer: [ 20.931227] (ftrace buffer empty) [ 20.934903] Kernel Offset: disabled [ 20.938493] Rebooting in 86400 seconds..