[....] Starting enhanced syslogd: rsyslogd[ 13.019933] audit: type=1400 audit(1515626028.889: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 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.15.245' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.643594] ================================================================== [ 20.650980] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.657617] Read of size 8 at addr ffff8801cd5259b8 by task syzkaller996818/3326 [ 20.665113] [ 20.666709] CPU: 0 PID: 3326 Comm: syzkaller996818 Not tainted 4.9.76-g9154940 #10 [ 20.674379] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.683701] ffff8801c88b78e0 ffffffff81d93149 ffffea0007354900 ffff8801cd5259b8 [ 20.691647] 0000000000000000 ffff8801cd5259b8 ffff8801cd5259b8 ffff8801c88b7918 [ 20.699602] ffffffff8153cb43 ffff8801cd5259b8 0000000000000008 0000000000000000 [ 20.707551] Call Trace: [ 20.710109] [] dump_stack+0xc1/0x128 [ 20.715442] [] print_address_description+0x73/0x280 [ 20.722074] [] kasan_report+0x275/0x360 [ 20.727667] [] ? __lock_acquire+0x2eff/0x3640 [ 20.733779] [] __asan_report_load8_noabort+0x14/0x20 [ 20.740507] [] __lock_acquire+0x2eff/0x3640 [ 20.746443] [] ? __lock_acquire+0x629/0x3640 [ 20.752466] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.759444] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.766425] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.773410] [] ? mark_held_locks+0xaf/0x100 [ 20.779348] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.785548] [] lock_acquire+0x12e/0x410 [ 20.791138] [] ? remove_wait_queue+0x14/0x40 [ 20.797164] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.803452] [] ? remove_wait_queue+0x14/0x40 [ 20.809486] [] remove_wait_queue+0x14/0x40 [ 20.815348] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.822327] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.829566] [] ? ep_free+0x1b0/0x1b0 [ 20.834900] [] ep_free+0x96/0x1b0 [ 20.839968] [] ? ep_free+0x1b0/0x1b0 [ 20.845299] [] ep_eventpoll_release+0x44/0x60 [ 20.851412] [] __fput+0x28c/0x6e0 [ 20.856481] [] ____fput+0x15/0x20 [ 20.861551] [] task_work_run+0x115/0x190 [ 20.867238] [] do_exit+0x7e7/0x2a40 [ 20.872492] [] ? selinux_file_ioctl+0x355/0x530 [ 20.878777] [] ? release_task+0x1240/0x1240 [ 20.884718] [] ? SyS_epoll_create+0x190/0x190 [ 20.890833] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 20.897467] [] do_group_exit+0x108/0x320 [ 20.903144] [] SyS_exit_group+0x1d/0x20 [ 20.908735] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 20.915278] [ 20.916872] Allocated by task 3326: [ 20.920470] save_stack_trace+0x16/0x20 [ 20.924409] save_stack+0x43/0xd0 [ 20.927828] kasan_kmalloc+0xad/0xe0 [ 20.931514] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.936064] binder_get_thread+0x15d/0x750 [ 20.940274] binder_poll+0x4a/0x210 [ 20.943866] SyS_epoll_ctl+0x11d7/0x2190 [ 20.947893] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 20.952610] [ 20.954203] Freed by task 3326: [ 20.957458] save_stack_trace+0x16/0x20 [ 20.961401] save_stack+0x43/0xd0 [ 20.964829] kasan_slab_free+0x72/0xc0 [ 20.968681] kfree+0x103/0x300 [ 20.971839] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.976648] binder_thread_release+0x27d/0x540 [ 20.981193] binder_ioctl+0x9c0/0x11b0 [ 20.985056] do_vfs_ioctl+0x1aa/0x1140 [ 20.988915] SyS_ioctl+0x8f/0xc0 [ 20.992245] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 20.996963] [ 20.998559] The buggy address belongs to the object at ffff8801cd525900 [ 20.998559] which belongs to the cache kmalloc-512 of size 512 [ 21.011180] The buggy address is located 184 bytes inside of [ 21.011180] 512-byte region [ffff8801cd525900, ffff8801cd525b00) [ 21.023016] The buggy address belongs to the page: [ 21.027911] page:ffffea0007354900 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 21.038065] flags: 0x8000000000004080(slab|head) [ 21.042782] page dumped because: kasan: bad access detected [ 21.048453] [ 21.050044] Memory state around the buggy address: [ 21.054941] ffff8801cd525880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.062262] ffff8801cd525900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.069587] >ffff8801cd525980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.076913] ^ [ 21.082067] ffff8801cd525a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.089392] ffff8801cd525a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.096718] ================================================================== [ 21.104038] Disabling lock debugging due to kernel taint [ 21.109451] Kernel panic - not syncing: panic_on_warn set ... [ 21.109451] [ 21.116780] CPU: 0 PID: 3326 Comm: syzkaller996818 Tainted: G B 4.9.76-g9154940 #10 [ 21.125667] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.134990] ffff8801c88b7838 ffffffff81d93149 ffffffff84195c17 ffff8801c88b7910 [ 21.142954] 0000000000000000 ffff8801cd5259b8 ffff8801cd5259b8 ffff8801c88b7900 [ 21.150904] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 21.158852] Call Trace: [ 21.161409] [] dump_stack+0xc1/0x128 [ 21.166741] [] panic+0x1bc/0x3a8 [ 21.171726] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.179920] [] ? add_taint+0x40/0x50 [ 21.185249] [] kasan_end_report+0x50/0x50 [ 21.191014] [] kasan_report+0x167/0x360 [ 21.196605] [] ? __lock_acquire+0x2eff/0x3640 [ 21.202715] [] __asan_report_load8_noabort+0x14/0x20 [ 21.209434] [] __lock_acquire+0x2eff/0x3640 [ 21.215372] [] ? __lock_acquire+0x629/0x3640 [ 21.222102] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.229081] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.236068] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.243048] [] ? mark_held_locks+0xaf/0x100 [ 21.248996] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.255195] [] lock_acquire+0x12e/0x410 [ 21.260799] [] ? remove_wait_queue+0x14/0x40 [ 21.266824] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.273118] [] ? remove_wait_queue+0x14/0x40 [ 21.279143] [] remove_wait_queue+0x14/0x40 [ 21.284997] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.291975] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.299215] [] ? ep_free+0x1b0/0x1b0 [ 21.304545] [] ep_free+0x96/0x1b0 [ 21.309611] [] ? ep_free+0x1b0/0x1b0 [ 21.314938] [] ep_eventpoll_release+0x44/0x60 [ 21.321061] [] __fput+0x28c/0x6e0 [ 21.326130] [] ____fput+0x15/0x20 [ 21.331199] [] task_work_run+0x115/0x190 [ 21.336875] [] do_exit+0x7e7/0x2a40 [ 21.342116] [] ? selinux_file_ioctl+0x355/0x530 [ 21.348400] [] ? release_task+0x1240/0x1240 [ 21.354347] [] ? SyS_epoll_create+0x190/0x190 [ 21.360465] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 21.367099] [] do_group_exit+0x108/0x320 [ 21.372777] [] SyS_exit_group+0x1d/0x20 [ 21.378373] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 21.384956] Dumping ftrace buffer: [ 21.388471] (ftrace buffer empty) [ 21.392147] Kernel Offset: disabled [ 21.395745] Rebooting in 86400 seconds..