[....] Starting enhanced syslogd: rsyslogd[ 13.114500] audit: type=1400 audit(1515934529.823:4): avc: denied { syslog } for pid=3175 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.15.227' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 39.382668] ================================================================== [ 39.390094] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 39.396739] Read of size 8 at addr ffff8801c9358fb8 by task syzkaller502570/3341 [ 39.404264] [ 39.405884] CPU: 0 PID: 3341 Comm: syzkaller502570 Not tainted 4.9.76-gf0f6293 #12 [ 39.413561] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.422891] ffff8801c97df8e0 ffffffff81d93149 ffffea000724d600 ffff8801c9358fb8 [ 39.430923] 0000000000000000 ffff8801c9358fb8 ffff8801c9358fb8 ffff8801c97df918 [ 39.438904] ffffffff8153cb43 ffff8801c9358fb8 0000000000000008 0000000000000000 [ 39.446892] Call Trace: [ 39.449457] [] dump_stack+0xc1/0x128 [ 39.454812] [] print_address_description+0x73/0x280 [ 39.461562] [] kasan_report+0x275/0x360 [ 39.467162] [] ? __lock_acquire+0x2eff/0x3640 [ 39.473284] [] __asan_report_load8_noabort+0x14/0x20 [ 39.480009] [] __lock_acquire+0x2eff/0x3640 [ 39.485954] [] ? __lock_acquire+0x629/0x3640 [ 39.492001] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 39.498987] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 39.505976] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 39.512964] [] ? mark_held_locks+0xaf/0x100 [ 39.518918] [] ? mutex_lock_nested+0x5e3/0x870 [ 39.525129] [] lock_acquire+0x12e/0x410 [ 39.530726] [] ? remove_wait_queue+0x14/0x40 [ 39.536768] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 39.543074] [] ? remove_wait_queue+0x14/0x40 [ 39.549103] [] remove_wait_queue+0x14/0x40 [ 39.554965] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 39.561966] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 39.569227] [] ? ep_free+0x1b0/0x1b0 [ 39.574596] [] ep_free+0x96/0x1b0 [ 39.579694] [] ? ep_free+0x1b0/0x1b0 [ 39.585036] [] ep_eventpoll_release+0x44/0x60 [ 39.591155] [] __fput+0x28c/0x6e0 [ 39.596233] [] ____fput+0x15/0x20 [ 39.601309] [] task_work_run+0x115/0x190 [ 39.606996] [] do_exit+0x7e7/0x2a40 [ 39.612252] [] ? selinux_file_ioctl+0x355/0x530 [ 39.618543] [] ? release_task+0x1240/0x1240 [ 39.624491] [] ? SyS_epoll_create+0x190/0x190 [ 39.630612] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 39.637262] [] do_group_exit+0x108/0x320 [ 39.642949] [] SyS_exit_group+0x1d/0x20 [ 39.648558] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 39.655119] [ 39.656722] Allocated by task 3341: [ 39.660322] save_stack_trace+0x16/0x20 [ 39.664285] save_stack+0x43/0xd0 [ 39.667710] kasan_kmalloc+0xad/0xe0 [ 39.671405] kmem_cache_alloc_trace+0xfb/0x2a0 [ 39.675965] binder_get_thread+0x15d/0x750 [ 39.680180] binder_poll+0x4a/0x210 [ 39.683781] SyS_epoll_ctl+0x11d7/0x2190 [ 39.687813] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 39.692538] [ 39.694137] Freed by task 3341: [ 39.697385] save_stack_trace+0x16/0x20 [ 39.701332] save_stack+0x43/0xd0 [ 39.704772] kasan_slab_free+0x72/0xc0 [ 39.708630] kfree+0x103/0x300 [ 39.711796] binder_thread_dec_tmpref+0x1cc/0x240 [ 39.716608] binder_thread_release+0x27d/0x540 [ 39.721161] binder_ioctl+0x9c0/0x11b0 [ 39.725020] do_vfs_ioctl+0x1aa/0x1140 [ 39.728896] SyS_ioctl+0x8f/0xc0 [ 39.732235] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 39.736961] [ 39.738560] The buggy address belongs to the object at ffff8801c9358f00 [ 39.738560] which belongs to the cache kmalloc-512 of size 512 [ 39.751202] The buggy address is located 184 bytes inside of [ 39.751202] 512-byte region [ffff8801c9358f00, ffff8801c9359100) [ 39.763061] The buggy address belongs to the page: [ 39.767962] page:ffffea000724d600 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 39.778134] flags: 0x8000000000004080(slab|head) [ 39.782859] page dumped because: kasan: bad access detected [ 39.788535] [ 39.790133] Memory state around the buggy address: [ 39.795032] ffff8801c9358e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 39.802366] ffff8801c9358f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.809697] >ffff8801c9358f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.817029] ^ [ 39.822190] ffff8801c9359000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.829522] ffff8801c9359080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 39.836854] ================================================================== [ 39.844187] Disabling lock debugging due to kernel taint [ 39.849607] Kernel panic - not syncing: panic_on_warn set ... [ 39.849607] [ 39.856956] CPU: 0 PID: 3341 Comm: syzkaller502570 Tainted: G B 4.9.76-gf0f6293 #12 [ 39.866544] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.875879] ffff8801c97df838 ffffffff81d93149 ffffffff84195c17 ffff8801c97df910 [ 39.883866] 0000000000000000 ffff8801c9358fb8 ffff8801c9358fb8 ffff8801c97df900 [ 39.891867] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 39.899882] Call Trace: [ 39.902447] [] dump_stack+0xc1/0x128 [ 39.907785] [] panic+0x1bc/0x3a8 [ 39.912788] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 39.920991] [] ? add_taint+0x40/0x50 [ 39.926331] [] kasan_end_report+0x50/0x50 [ 39.932101] [] kasan_report+0x167/0x360 [ 39.937699] [] ? __lock_acquire+0x2eff/0x3640 [ 39.943820] [] __asan_report_load8_noabort+0x14/0x20 [ 39.950545] [] __lock_acquire+0x2eff/0x3640 [ 39.956491] [] ? __lock_acquire+0x629/0x3640 [ 39.962525] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 39.969512] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 39.976500] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 39.983500] [] ? mark_held_locks+0xaf/0x100 [ 39.989446] [] ? mutex_lock_nested+0x5e3/0x870 [ 39.995653] [] lock_acquire+0x12e/0x410 [ 40.001251] [] ? remove_wait_queue+0x14/0x40 [ 40.007281] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 40.013571] [] ? remove_wait_queue+0x14/0x40 [ 40.019604] [] remove_wait_queue+0x14/0x40 [ 40.025475] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 40.032477] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 40.039726] [] ? ep_free+0x1b0/0x1b0 [ 40.045065] [] ep_free+0x96/0x1b0 [ 40.050141] [] ? ep_free+0x1b0/0x1b0 [ 40.055477] [] ep_eventpoll_release+0x44/0x60 [ 40.061596] [] __fput+0x28c/0x6e0 [ 40.066673] [] ____fput+0x15/0x20 [ 40.071753] [] task_work_run+0x115/0x190 [ 40.077451] [] do_exit+0x7e7/0x2a40 [ 40.082712] [] ? selinux_file_ioctl+0x355/0x530 [ 40.089010] [] ? release_task+0x1240/0x1240 [ 40.094972] [] ? SyS_epoll_create+0x190/0x190 [ 40.101095] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 40.107739] [] do_group_exit+0x108/0x320 [ 40.113426] [] SyS_exit_group+0x1d/0x20 [ 40.119023] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 40.126022] Dumping ftrace buffer: [ 40.129536] (ftrace buffer empty) [ 40.133219] Kernel Offset: disabled [ 40.136817] Rebooting in 86400 seconds..