[....] Starting enhanced syslogd: rsyslogd[ 11.631634] audit: type=1400 audit(1515611171.751:4): avc: denied { syslog } for pid=3174 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.49' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.503529] ================================================================== [ 26.510922] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 26.517564] Read of size 8 at addr ffff8801cb7b5c38 by task syzkaller031327/3331 [ 26.525078] [ 26.526689] CPU: 1 PID: 3331 Comm: syzkaller031327 Not tainted 4.9.76-g9154940 #10 [ 26.534359] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.543682] ffff8801cc0378e0 ffffffff81d93149 ffffea00072ded00 ffff8801cb7b5c38 [ 26.551627] 0000000000000000 ffff8801cb7b5c38 ffff8801cb7b5c38 ffff8801cc037918 [ 26.559570] ffffffff8153cb43 ffff8801cb7b5c38 0000000000000008 0000000000000000 [ 26.567513] Call Trace: [ 26.570069] [] dump_stack+0xc1/0x128 [ 26.575399] [] print_address_description+0x73/0x280 [ 26.582029] [] kasan_report+0x275/0x360 [ 26.587617] [] ? __lock_acquire+0x2eff/0x3640 [ 26.593740] [] __asan_report_load8_noabort+0x14/0x20 [ 26.600476] [] __lock_acquire+0x2eff/0x3640 [ 26.606428] [] ? __lock_acquire+0x629/0x3640 [ 26.612461] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.619441] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.626419] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.633395] [] ? mark_held_locks+0xaf/0x100 [ 26.639340] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.645539] [] lock_acquire+0x12e/0x410 [ 26.651128] [] ? remove_wait_queue+0x14/0x40 [ 26.657151] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.663434] [] ? remove_wait_queue+0x14/0x40 [ 26.669455] [] remove_wait_queue+0x14/0x40 [ 26.675305] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.682288] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.689524] [] ? ep_free+0x1b0/0x1b0 [ 26.694851] [] ep_free+0x96/0x1b0 [ 26.699921] [] ? ep_free+0x1b0/0x1b0 [ 26.705250] [] ep_eventpoll_release+0x44/0x60 [ 26.711360] [] __fput+0x28c/0x6e0 [ 26.716435] [] ____fput+0x15/0x20 [ 26.721505] [] task_work_run+0x115/0x190 [ 26.727186] [] do_exit+0x7e7/0x2a40 [ 26.732427] [] ? selinux_file_ioctl+0x355/0x530 [ 26.738716] [] ? release_task+0x1240/0x1240 [ 26.744653] [] ? SyS_epoll_create+0x190/0x190 [ 26.750762] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 26.757391] [] do_group_exit+0x108/0x320 [ 26.763064] [] SyS_exit_group+0x1d/0x20 [ 26.768649] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 26.775196] [ 26.776789] Allocated by task 3331: [ 26.780380] save_stack_trace+0x16/0x20 [ 26.784317] save_stack+0x43/0xd0 [ 26.787731] kasan_kmalloc+0xad/0xe0 [ 26.791407] kmem_cache_alloc_trace+0xfb/0x2a0 [ 26.795955] binder_get_thread+0x15d/0x750 [ 26.800157] binder_poll+0x4a/0x210 [ 26.803748] SyS_epoll_ctl+0x11d7/0x2190 [ 26.807771] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 26.812486] [ 26.814077] Freed by task 3331: [ 26.817319] save_stack_trace+0x16/0x20 [ 26.821266] save_stack+0x43/0xd0 [ 26.824682] kasan_slab_free+0x72/0xc0 [ 26.828529] kfree+0x103/0x300 [ 26.831684] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.836493] binder_thread_release+0x27d/0x540 [ 26.841036] binder_ioctl+0x9c0/0x11b0 [ 26.844887] do_vfs_ioctl+0x1aa/0x1140 [ 26.848737] SyS_ioctl+0x8f/0xc0 [ 26.852066] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 26.856781] [ 26.858374] The buggy address belongs to the object at ffff8801cb7b5b80 [ 26.858374] which belongs to the cache kmalloc-512 of size 512 [ 26.870992] The buggy address is located 184 bytes inside of [ 26.870992] 512-byte region [ffff8801cb7b5b80, ffff8801cb7b5d80) [ 26.882827] The buggy address belongs to the page: [ 26.887725] page:ffffea00072ded00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.897879] flags: 0x8000000000004080(slab|head) [ 26.902596] page dumped because: kasan: bad access detected [ 26.908269] [ 26.909860] Memory state around the buggy address: [ 26.914753] ffff8801cb7b5b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.922072] ffff8801cb7b5b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.929397] >ffff8801cb7b5c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.936719] ^ [ 26.941870] ffff8801cb7b5c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.949194] ffff8801cb7b5d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.956687] ================================================================== [ 26.964008] Disabling lock debugging due to kernel taint [ 26.969426] Kernel panic - not syncing: panic_on_warn set ... [ 26.969426] [ 26.976752] CPU: 1 PID: 3331 Comm: syzkaller031327 Tainted: G B 4.9.76-g9154940 #10 [ 26.985637] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.994957] ffff8801cc037838 ffffffff81d93149 ffffffff84195c17 ffff8801cc037910 [ 27.002901] 0000000000000000 ffff8801cb7b5c38 ffff8801cb7b5c38 ffff8801cc037900 [ 27.010843] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 27.018794] Call Trace: [ 27.021352] [] dump_stack+0xc1/0x128 [ 27.026679] [] panic+0x1bc/0x3a8 [ 27.031659] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.039851] [] ? add_taint+0x40/0x50 [ 27.045177] [] kasan_end_report+0x50/0x50 [ 27.050946] [] kasan_report+0x167/0x360 [ 27.056532] [] ? __lock_acquire+0x2eff/0x3640 [ 27.062641] [] __asan_report_load8_noabort+0x14/0x20 [ 27.069357] [] __lock_acquire+0x2eff/0x3640 [ 27.075290] [] ? __lock_acquire+0x629/0x3640 [ 27.081311] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.088291] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.095268] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.102243] [] ? mark_held_locks+0xaf/0x100 [ 27.108182] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.114385] [] lock_acquire+0x12e/0x410 [ 27.119981] [] ? remove_wait_queue+0x14/0x40 [ 27.126021] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.132308] [] ? remove_wait_queue+0x14/0x40 [ 27.138332] [] remove_wait_queue+0x14/0x40 [ 27.144185] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.151164] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.158404] [] ? ep_free+0x1b0/0x1b0 [ 27.163733] [] ep_free+0x96/0x1b0 [ 27.168802] [] ? ep_free+0x1b0/0x1b0 [ 27.174133] [] ep_eventpoll_release+0x44/0x60 [ 27.180252] [] __fput+0x28c/0x6e0 [ 27.185320] [] ____fput+0x15/0x20 [ 27.190386] [] task_work_run+0x115/0x190 [ 27.196061] [] do_exit+0x7e7/0x2a40 [ 27.201302] [] ? selinux_file_ioctl+0x355/0x530 [ 27.207584] [] ? release_task+0x1240/0x1240 [ 27.213519] [] ? SyS_epoll_create+0x190/0x190 [ 27.219628] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 27.226259] [] do_group_exit+0x108/0x320 [ 27.231934] [] SyS_exit_group+0x1d/0x20 [ 27.237520] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.244459] Dumping ftrace buffer: [ 27.247976] (ftrace buffer empty) [ 27.251649] Kernel Offset: disabled [ 27.255239] Rebooting in 86400 seconds..