[....] Starting enhanced syslogd: rsyslogd[ 14.009751] audit: type=1400 audit(1514578969.044:4): avc: denied { syslog } for pid=3177 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 '10.128.0.57' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.268179] ================================================================== [ 25.275616] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 25.282253] Read of size 8 at addr ffff8801cca40ab8 by task syzkaller005149/3332 [ 25.289748] [ 25.291350] CPU: 0 PID: 3332 Comm: syzkaller005149 Not tainted 4.9.73-gf3f3457 #1 [ 25.298942] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.308263] ffff8801c846f8e0 ffffffff81d922b9 ffffea0007329000 ffff8801cca40ab8 [ 25.316234] 0000000000000000 ffff8801cca40ab8 ffff8801cca40ab8 ffff8801c846f918 [ 25.324185] ffffffff8153bab3 ffff8801cca40ab8 0000000000000008 0000000000000000 [ 25.332166] Call Trace: [ 25.334725] [] dump_stack+0xc1/0x128 [ 25.340065] [] print_address_description+0x73/0x280 [ 25.346704] [] kasan_report+0x275/0x360 [ 25.352303] [] ? __lock_acquire+0x2eff/0x3640 [ 25.358425] [] __asan_report_load8_noabort+0x14/0x20 [ 25.365144] [] __lock_acquire+0x2eff/0x3640 [ 25.371081] [] ? __lock_acquire+0x629/0x3640 [ 25.377112] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.384092] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.391082] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.398063] [] ? mark_held_locks+0xaf/0x100 [ 25.404001] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.410205] [] lock_acquire+0x12e/0x410 [ 25.415805] [] ? remove_wait_queue+0x14/0x40 [ 25.421831] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.428121] [] ? remove_wait_queue+0x14/0x40 [ 25.434144] [] remove_wait_queue+0x14/0x40 [ 25.439995] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.446983] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.454221] [] ? ep_free+0x1b0/0x1b0 [ 25.459548] [] ep_free+0x96/0x1b0 [ 25.464625] [] ? ep_free+0x1b0/0x1b0 [ 25.469958] [] ep_eventpoll_release+0x44/0x60 [ 25.476072] [] __fput+0x28c/0x6e0 [ 25.481145] [] ____fput+0x15/0x20 [ 25.486225] [] task_work_run+0x115/0x190 [ 25.491906] [] do_exit+0x7e7/0x2a40 [ 25.497157] [] ? selinux_file_ioctl+0x355/0x530 [ 25.503441] [] ? release_task+0x1240/0x1240 [ 25.509381] [] ? SyS_epoll_create+0x190/0x190 [ 25.515506] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 25.522148] [] do_group_exit+0x108/0x320 [ 25.527824] [] SyS_exit_group+0x1d/0x20 [ 25.533416] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.539970] [ 25.541566] Allocated by task 3332: [ 25.545163] save_stack_trace+0x16/0x20 [ 25.549103] save_stack+0x43/0xd0 [ 25.552522] kasan_kmalloc+0xad/0xe0 [ 25.556202] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.560754] binder_get_thread+0x15d/0x750 [ 25.564955] binder_poll+0x4a/0x210 [ 25.568547] SyS_epoll_ctl+0x11d7/0x2190 [ 25.572585] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.577306] [ 25.578900] Freed by task 3332: [ 25.582163] save_stack_trace+0x16/0x20 [ 25.586101] save_stack+0x43/0xd0 [ 25.589526] kasan_slab_free+0x72/0xc0 [ 25.593377] kfree+0x103/0x300 [ 25.596536] binder_thread_dec_tmpref+0x1cc/0x240 [ 25.601352] binder_thread_release+0x27d/0x540 [ 25.605910] binder_ioctl+0x9c0/0x11b0 [ 25.609764] do_vfs_ioctl+0x1aa/0x1140 [ 25.613617] SyS_ioctl+0x8f/0xc0 [ 25.616950] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 25.621677] [ 25.623282] The buggy address belongs to the object at ffff8801cca40a00 [ 25.623282] which belongs to the cache kmalloc-512 of size 512 [ 25.635905] The buggy address is located 184 bytes inside of [ 25.635905] 512-byte region [ffff8801cca40a00, ffff8801cca40c00) [ 25.647743] The buggy address belongs to the page: [ 25.652640] page:ffffea0007329000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 25.662808] flags: 0x8000000000004080(slab|head) [ 25.667535] page dumped because: kasan: bad access detected [ 25.673210] [ 25.674801] Memory state around the buggy address: [ 25.679695] ffff8801cca40980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.687018] ffff8801cca40a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.694343] >ffff8801cca40a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.701680] ^ [ 25.706840] ffff8801cca40b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.714171] ffff8801cca40b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.721502] ================================================================== [ 25.728835] Disabling lock debugging due to kernel taint [ 25.734251] Kernel panic - not syncing: panic_on_warn set ... [ 25.734251] [ 25.741589] CPU: 0 PID: 3332 Comm: syzkaller005149 Tainted: G B 4.9.73-gf3f3457 #1 [ 25.750390] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.759714] ffff8801c846f838 ffffffff81d922b9 ffffffff841955bf ffff8801c846f910 [ 25.767671] 0000000000000000 ffff8801cca40ab8 ffff8801cca40ab8 ffff8801c846f900 [ 25.775624] ffffffff8142d741 0000000041b58ab3 ffffffff84189000 ffffffff8142d585 [ 25.783599] Call Trace: [ 25.786157] [] dump_stack+0xc1/0x128 [ 25.791497] [] panic+0x1bc/0x3a8 [ 25.796482] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 25.804683] [] ? add_taint+0x40/0x50 [ 25.810025] [] kasan_end_report+0x50/0x50 [ 25.815798] [] kasan_report+0x167/0x360 [ 25.821393] [] ? __lock_acquire+0x2eff/0x3640 [ 25.827505] [] __asan_report_load8_noabort+0x14/0x20 [ 25.835059] [] __lock_acquire+0x2eff/0x3640 [ 25.841002] [] ? __lock_acquire+0x629/0x3640 [ 25.847117] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.854100] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.861169] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.868169] [] ? mark_held_locks+0xaf/0x100 [ 25.874124] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.880332] [] lock_acquire+0x12e/0x410 [ 25.885941] [] ? remove_wait_queue+0x14/0x40 [ 25.891972] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.898257] [] ? remove_wait_queue+0x14/0x40 [ 25.904289] [] remove_wait_queue+0x14/0x40 [ 25.910147] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.917126] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.924378] [] ? ep_free+0x1b0/0x1b0 [ 25.929710] [] ep_free+0x96/0x1b0 [ 25.934790] [] ? ep_free+0x1b0/0x1b0 [ 25.940129] [] ep_eventpoll_release+0x44/0x60 [ 25.946249] [] __fput+0x28c/0x6e0 [ 25.951318] [] ____fput+0x15/0x20 [ 25.956388] [] task_work_run+0x115/0x190 [ 25.962067] [] do_exit+0x7e7/0x2a40 [ 25.967316] [] ? selinux_file_ioctl+0x355/0x530 [ 25.973603] [] ? release_task+0x1240/0x1240 [ 25.979552] [] ? SyS_epoll_create+0x190/0x190 [ 25.985669] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 25.992302] [] do_group_exit+0x108/0x320 [ 25.997978] [] SyS_exit_group+0x1d/0x20 [ 26.003573] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 26.010184] Dumping ftrace buffer: [ 26.013699] (ftrace buffer empty) [ 26.017376] Kernel Offset: disabled [ 26.020970] Rebooting in 86400 seconds..