[....] Starting enhanced syslogd: rsyslogd[ 10.593272] audit: type=1400 audit(1516970743.178:4): avc: denied { syslog } for pid=3187 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.15.204' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 23.741316] ================================================================== [ 23.742415] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 23.743293] Read of size 8 at addr ffff8801c94ac5b8 by task syzkaller706352/3343 [ 23.744277] [ 23.744509] CPU: 0 PID: 3343 Comm: syzkaller706352 Not tainted 4.9.78-gf518fe4 #22 [ 23.745531] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.746753] ffff8801c81e78e0 ffffffff81d943a9 ffffea0007252b00 ffff8801c94ac5b8 [ 23.747930] 0000000000000000 ffff8801c94ac5b8 ffff8801c94ac5b8 ffff8801c81e7918 [ 23.749077] ffffffff8153dc23 ffff8801c94ac5b8 0000000000000008 0000000000000000 [ 23.750321] Call Trace: [ 23.750680] [] dump_stack+0xc1/0x128 [ 23.751393] [] print_address_description+0x73/0x280 [ 23.752292] [] kasan_report+0x275/0x360 [ 23.753040] [] ? __lock_acquire+0x2eff/0x3640 [ 23.753865] [] __asan_report_load8_noabort+0x14/0x20 [ 23.754772] [] __lock_acquire+0x2eff/0x3640 [ 23.755561] [] ? __lock_acquire+0x629/0x3640 [ 23.756379] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.757304] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.758247] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 23.759172] [] ? mark_held_locks+0xaf/0x100 [ 23.759963] [] ? mutex_lock_nested+0x5e3/0x870 [ 23.760834] [] lock_acquire+0x12e/0x410 [ 23.761594] [] ? remove_wait_queue+0x14/0x40 [ 23.767619] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 23.773910] [] ? remove_wait_queue+0x14/0x40 [ 23.779935] [] remove_wait_queue+0x14/0x40 [ 23.785789] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 23.792773] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 23.800102] [] ? ep_free+0x1b0/0x1b0 [ 23.805443] [] ep_free+0x96/0x1b0 [ 23.810516] [] ? ep_free+0x1b0/0x1b0 [ 23.815848] [] ep_eventpoll_release+0x44/0x60 [ 23.821973] [] __fput+0x28c/0x6e0 [ 23.827043] [] ____fput+0x15/0x20 [ 23.832127] [] task_work_run+0x115/0x190 [ 23.837815] [] do_exit+0x7e7/0x2a40 [ 23.843061] [] ? selinux_file_ioctl+0x355/0x530 [ 23.849346] [] ? release_task+0x1240/0x1240 [ 23.855284] [] ? SyS_epoll_create+0x190/0x190 [ 23.861403] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 23.868038] [] do_group_exit+0x108/0x320 [ 23.873717] [] SyS_exit_group+0x1d/0x20 [ 23.879308] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 23.885850] [ 23.887446] Allocated by task 3343: [ 23.891043] save_stack_trace+0x16/0x20 [ 23.894983] save_stack+0x43/0xd0 [ 23.898403] kasan_kmalloc+0xad/0xe0 [ 23.902089] kmem_cache_alloc_trace+0xfb/0x2a0 [ 23.906640] binder_get_thread+0x15d/0x750 [ 23.910851] binder_poll+0x4a/0x210 [ 23.914444] SyS_epoll_ctl+0x11d7/0x2190 [ 23.918472] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 23.923193] [ 23.924786] Freed by task 3343: [ 23.928036] save_stack_trace+0x16/0x20 [ 23.931975] save_stack+0x43/0xd0 [ 23.935397] kasan_slab_free+0x72/0xc0 [ 23.939253] kfree+0x103/0x300 [ 23.942415] binder_thread_dec_tmpref+0x1cc/0x240 [ 23.947223] binder_thread_release+0x27d/0x540 [ 23.951774] binder_ioctl+0x9c0/0x11b0 [ 23.955631] do_vfs_ioctl+0x1aa/0x1140 [ 23.959489] SyS_ioctl+0x8f/0xc0 [ 23.962821] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 23.967544] [ 23.969138] The buggy address belongs to the object at ffff8801c94ac500 [ 23.969138] which belongs to the cache kmalloc-512 of size 512 [ 23.981764] The buggy address is located 184 bytes inside of [ 23.981764] 512-byte region [ffff8801c94ac500, ffff8801c94ac700) [ 23.993603] The buggy address belongs to the page: [ 23.998510] page:ffffea0007252b00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.008679] flags: 0x8000000000004080(slab|head) [ 24.013401] page dumped because: kasan: bad access detected [ 24.019077] [ 24.020672] Memory state around the buggy address: [ 24.025566] ffff8801c94ac480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.032893] ffff8801c94ac500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.040224] >ffff8801c94ac580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.047560] ^ [ 24.052716] ffff8801c94ac600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.060047] ffff8801c94ac680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.067381] ================================================================== [ 24.074710] Disabling lock debugging due to kernel taint [ 24.080130] Kernel panic - not syncing: panic_on_warn set ... [ 24.080130] [ 24.087461] CPU: 0 PID: 3343 Comm: syzkaller706352 Tainted: G B 4.9.78-gf518fe4 #22 [ 24.096348] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.105670] ffff8801c81e7838 ffffffff81d943a9 ffffffff841971bf ffff8801c81e7910 [ 24.113640] 0000000000000000 ffff8801c94ac5b8 ffff8801c94ac5b8 ffff8801c81e7900 [ 24.121603] ffffffff8142f451 0000000041b58ab3 ffffffff8418ac30 ffffffff8142f295 [ 24.129571] Call Trace: [ 24.132131] [] dump_stack+0xc1/0x128 [ 24.137465] [] panic+0x1bc/0x3a8 [ 24.142449] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 24.150648] [] ? add_taint+0x40/0x50 [ 24.155990] [] kasan_end_report+0x50/0x50 [ 24.161766] [] kasan_report+0x167/0x360 [ 24.167370] [] ? __lock_acquire+0x2eff/0x3640 [ 24.173482] [] __asan_report_load8_noabort+0x14/0x20 [ 24.180205] [] __lock_acquire+0x2eff/0x3640 [ 24.186152] [] ? __lock_acquire+0x629/0x3640 [ 24.192178] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.199158] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.206139] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 24.213125] [] ? mark_held_locks+0xaf/0x100 [ 24.219066] [] ? mutex_lock_nested+0x5e3/0x870 [ 24.225273] [] lock_acquire+0x12e/0x410 [ 24.230869] [] ? remove_wait_queue+0x14/0x40 [ 24.236894] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 24.243197] [] ? remove_wait_queue+0x14/0x40 [ 24.249232] [] remove_wait_queue+0x14/0x40 [ 24.255085] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 24.262066] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 24.269307] [] ? ep_free+0x1b0/0x1b0 [ 24.274651] [] ep_free+0x96/0x1b0 [ 24.279722] [] ? ep_free+0x1b0/0x1b0 [ 24.285051] [] ep_eventpoll_release+0x44/0x60 [ 24.291163] [] __fput+0x28c/0x6e0 [ 24.296232] [] ____fput+0x15/0x20 [ 24.301303] [] task_work_run+0x115/0x190 [ 24.306983] [] do_exit+0x7e7/0x2a40 [ 24.312228] [] ? selinux_file_ioctl+0x355/0x530 [ 24.318514] [] ? release_task+0x1240/0x1240 [ 24.324461] [] ? SyS_epoll_create+0x190/0x190 [ 24.330584] [] ? entry_SYSCALL_64_fastpath+0x5/0xe8 [ 24.337218] [] do_group_exit+0x108/0x320 [ 24.342895] [] SyS_exit_group+0x1d/0x20 [ 24.348487] [] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 24.355420] Dumping ftrace buffer: [ 24.358933] (ftrace buffer empty) [ 24.362612] Kernel Offset: disabled [ 24.366205] Rebooting in 86400 seconds..