[....] Starting enhanced syslogd: rsyslogd[ 11.143398] audit: type=1400 audit(1515983597.576:4): avc: denied { syslog } for pid=3179 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.6' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.453892] ================================================================== [ 26.455078] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.456010] Read of size 8 at addr ffff8801c8856338 by task syzkaller084813/3337 [ 26.457015] [ 26.457248] CPU: 1 PID: 3337 Comm: syzkaller084813 Not tainted 4.9.76-gf0f6293 #12 [ 26.458267] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.459511] ffff8801c831f8e0 ffffffff81d93149 ffffea0007221580 ffff8801c8856338 [ 26.460677] 0000000000000000 ffff8801c8856338 ffff8801c8856338 ffff8801c831f918 [ 26.461827] ffffffff8153cb43 ffff8801c8856338 0000000000000008 0000000000000000 [ 26.462970] Call Trace: [ 26.463329] [] dump_stack+0xc1/0x128 [ 26.464046] [] print_address_description+0x73/0x280 [ 26.464924] [] kasan_report+0x275/0x360 [ 26.465678] [] ? __lock_acquire+0x2eff/0x3640 [ 26.466515] [] __asan_report_load8_noabort+0x14/0x20 [ 26.467407] [] __lock_acquire+0x2eff/0x3640 [ 26.468252] [] ? __lock_acquire+0x629/0x3640 [ 26.469125] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.470070] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.470992] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.471961] [] ? mark_held_locks+0xaf/0x100 [ 26.472782] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.473628] [] lock_acquire+0x12e/0x410 [ 26.477357] [] ? remove_wait_queue+0x14/0x40 [ 26.483385] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.489674] [] ? remove_wait_queue+0x14/0x40 [ 26.495706] [] remove_wait_queue+0x14/0x40 [ 26.501579] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.508565] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.515810] [] ? ep_free+0x1b0/0x1b0 [ 26.521146] [] ep_free+0x96/0x1b0 [ 26.526218] [] ? ep_free+0x1b0/0x1b0 [ 26.531550] [] ep_eventpoll_release+0x44/0x60 [ 26.537678] [] __fput+0x28c/0x6e0 [ 26.542751] [] ____fput+0x15/0x20 [ 26.547825] [] task_work_run+0x115/0x190 [ 26.553509] [] do_exit+0x7e7/0x2a40 [ 26.558767] [] ? selinux_file_ioctl+0x355/0x530 [ 26.565061] [] ? release_task+0x1240/0x1240 [ 26.571005] [] ? SyS_epoll_create+0x190/0x190 [ 26.577120] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 26.583765] [] do_group_exit+0x108/0x320 [ 26.589445] [] SyS_exit_group+0x1d/0x20 [ 26.595049] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 26.601596] [ 26.603195] Allocated by task 3337: [ 26.606794] save_stack_trace+0x16/0x20 [ 26.610739] save_stack+0x43/0xd0 [ 26.614166] kasan_kmalloc+0xad/0xe0 [ 26.617855] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.622416] binder_get_thread+0x15d/0x750 [ 26.626619] binder_poll+0x4a/0x210 [ 26.630220] SyS_epoll_ctl+0x11d7/0x2190 [ 26.634249] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 26.638972] [ 26.640571] Freed by task 3337: [ 26.643818] save_stack_trace+0x16/0x20 [ 26.647769] save_stack+0x43/0xd0 [ 26.651197] kasan_slab_free+0x72/0xc0 [ 26.655050] kfree+0x103/0x300 [ 26.658213] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.663026] binder_thread_release+0x27d/0x540 [ 26.667578] binder_ioctl+0x9c0/0x11b0 [ 26.671442] do_vfs_ioctl+0x1aa/0x1140 [ 26.675298] SyS_ioctl+0x8f/0xc0 [ 26.678634] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 26.683358] [ 26.684954] The buggy address belongs to the object at ffff8801c8856280 [ 26.684954] which belongs to the cache kmalloc-512 of size 512 [ 26.697580] The buggy address is located 184 bytes inside of [ 26.697580] 512-byte region [ffff8801c8856280, ffff8801c8856480) [ 26.709420] The buggy address belongs to the page: [ 26.714320] page:ffffea0007221580 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.724497] flags: 0x8000000000004080(slab|head) [ 26.729218] page dumped because: kasan: bad access detected [ 26.734895] [ 26.736492] Memory state around the buggy address: [ 26.741391] ffff8801c8856200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.748719] ffff8801c8856280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.756044] >ffff8801c8856300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.763373] ^ [ 26.768529] ffff8801c8856380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.775864] ffff8801c8856400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.783196] ================================================================== [ 26.790520] Disabling lock debugging due to kernel taint [ 26.796025] Kernel panic - not syncing: panic_on_warn set ... [ 26.796025] [ 26.803357] CPU: 1 PID: 3337 Comm: syzkaller084813 Tainted: G B 4.9.76-gf0f6293 #12 [ 26.812247] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.821585] ffff8801c831f838 ffffffff81d93149 ffffffff84195c17 ffff8801c831f910 [ 26.829550] 0000000000000000 ffff8801c8856338 ffff8801c8856338 ffff8801c831f900 [ 26.837524] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 26.845491] Call Trace: [ 26.848052] [] dump_stack+0xc1/0x128 [ 26.853385] [] panic+0x1bc/0x3a8 [ 26.858371] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.866572] [] ? add_taint+0x40/0x50 [ 26.871918] [] kasan_end_report+0x50/0x50 [ 26.877684] [] kasan_report+0x167/0x360 [ 26.883282] [] ? __lock_acquire+0x2eff/0x3640 [ 26.889404] [] __asan_report_load8_noabort+0x14/0x20 [ 26.896131] [] __lock_acquire+0x2eff/0x3640 [ 26.902073] [] ? __lock_acquire+0x629/0x3640 [ 26.908100] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.915083] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.922066] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.929048] [] ? mark_held_locks+0xaf/0x100 [ 26.934991] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.941207] [] lock_acquire+0x12e/0x410 [ 26.946808] [] ? remove_wait_queue+0x14/0x40 [ 26.952835] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.959136] [] ? remove_wait_queue+0x14/0x40 [ 26.965163] [] remove_wait_queue+0x14/0x40 [ 26.971018] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.978001] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.985259] [] ? ep_free+0x1b0/0x1b0 [ 26.990606] [] ep_free+0x96/0x1b0 [ 26.995701] [] ? ep_free+0x1b0/0x1b0 [ 27.001052] [] ep_eventpoll_release+0x44/0x60 [ 27.007177] [] __fput+0x28c/0x6e0 [ 27.012357] [] ____fput+0x15/0x20 [ 27.017436] [] task_work_run+0x115/0x190 [ 27.023121] [] do_exit+0x7e7/0x2a40 [ 27.028370] [] ? selinux_file_ioctl+0x355/0x530 [ 27.034665] [] ? release_task+0x1240/0x1240 [ 27.040611] [] ? SyS_epoll_create+0x190/0x190 [ 27.046725] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 27.053363] [] do_group_exit+0x108/0x320 [ 27.059051] [] SyS_exit_group+0x1d/0x20 [ 27.064645] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.071674] Dumping ftrace buffer: [ 27.075184] (ftrace buffer empty) [ 27.078862] Kernel Offset: disabled [ 27.082459] Rebooting in 86400 seconds..