[....] Starting enhanced syslogd: rsyslogd[ 11.235253] audit: type=1400 audit(1515935184.955:4): avc: denied { syslog } for pid=3171 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.236' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 29.281763] ================================================================== [ 29.283179] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 29.284259] Read of size 8 at addr ffff8801c84f2d38 by task syzkaller566972/3329 [ 29.285521] [ 29.285774] CPU: 0 PID: 3329 Comm: syzkaller566972 Not tainted 4.9.76-gf0f6293 #12 [ 29.287078] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.288425] ffff8801c8f178e0 ffffffff81d93149 ffffea0007213c80 ffff8801c84f2d38 [ 29.289980] 0000000000000000 ffff8801c84f2d38 ffff8801c84f2d38 ffff8801c8f17918 [ 29.291321] ffffffff8153cb43 ffff8801c84f2d38 0000000000000008 0000000000000000 [ 29.292718] Call Trace: [ 29.293116] [] dump_stack+0xc1/0x128 [ 29.293888] [] print_address_description+0x73/0x280 [ 29.294771] [] kasan_report+0x275/0x360 [ 29.295549] [] ? __lock_acquire+0x2eff/0x3640 [ 29.296408] [] __asan_report_load8_noabort+0x14/0x20 [ 29.297485] [] __lock_acquire+0x2eff/0x3640 [ 29.298570] [] ? __lock_acquire+0x629/0x3640 [ 29.299594] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.300713] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.301702] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.307575] [] ? mark_held_locks+0xaf/0x100 [ 29.313554] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.319792] [] lock_acquire+0x12e/0x410 [ 29.325413] [] ? remove_wait_queue+0x14/0x40 [ 29.331450] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.337767] [] ? remove_wait_queue+0x14/0x40 [ 29.343811] [] remove_wait_queue+0x14/0x40 [ 29.349686] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.356676] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.363945] [] ? ep_free+0x1b0/0x1b0 [ 29.369281] [] ep_free+0x96/0x1b0 [ 29.374355] [] ? ep_free+0x1b0/0x1b0 [ 29.379693] [] ep_eventpoll_release+0x44/0x60 [ 29.385816] [] __fput+0x28c/0x6e0 [ 29.390901] [] ____fput+0x15/0x20 [ 29.395991] [] task_work_run+0x115/0x190 [ 29.401675] [] do_exit+0x7e7/0x2a40 [ 29.406941] [] ? selinux_file_ioctl+0x355/0x530 [ 29.413234] [] ? release_task+0x1240/0x1240 [ 29.419179] [] ? SyS_epoll_create+0x190/0x190 [ 29.425558] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 29.432554] [] do_group_exit+0x108/0x320 [ 29.438250] [] SyS_exit_group+0x1d/0x20 [ 29.443848] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.450398] [ 29.451999] Allocated by task 3329: [ 29.455607] save_stack_trace+0x16/0x20 [ 29.459554] save_stack+0x43/0xd0 [ 29.462991] kasan_kmalloc+0xad/0xe0 [ 29.466682] kmem_cache_alloc_trace+0xfb/0x2a0 [ 29.471241] binder_get_thread+0x15d/0x750 [ 29.475458] binder_poll+0x4a/0x210 [ 29.479065] SyS_epoll_ctl+0x11d7/0x2190 [ 29.483098] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.487833] [ 29.489432] Freed by task 3329: [ 29.492681] save_stack_trace+0x16/0x20 [ 29.496630] save_stack+0x43/0xd0 [ 29.500064] kasan_slab_free+0x72/0xc0 [ 29.503922] kfree+0x103/0x300 [ 29.507088] binder_thread_dec_tmpref+0x1cc/0x240 [ 29.511901] binder_thread_release+0x27d/0x540 [ 29.516459] binder_ioctl+0x9c0/0x11b0 [ 29.520343] do_vfs_ioctl+0x1aa/0x1140 [ 29.524210] SyS_ioctl+0x8f/0xc0 [ 29.527559] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.532295] [ 29.533898] The buggy address belongs to the object at ffff8801c84f2c80 [ 29.533898] which belongs to the cache kmalloc-512 of size 512 [ 29.546532] The buggy address is located 184 bytes inside of [ 29.546532] 512-byte region [ffff8801c84f2c80, ffff8801c84f2e80) [ 29.558381] The buggy address belongs to the page: [ 29.563285] page:ffffea0007213c80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 29.573490] flags: 0x8000000000004080(slab|head) [ 29.578219] page dumped because: kasan: bad access detected [ 29.583914] [ 29.585515] Memory state around the buggy address: [ 29.590417] ffff8801c84f2c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.597754] ffff8801c84f2c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.605102] >ffff8801c84f2d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.612865] ^ [ 29.618026] ffff8801c84f2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.625359] ffff8801c84f2e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.632689] ================================================================== [ 29.640032] Disabling lock debugging due to kernel taint [ 29.645467] Kernel panic - not syncing: panic_on_warn set ... [ 29.645467] [ 29.652802] CPU: 0 PID: 3329 Comm: syzkaller566972 Tainted: G B 4.9.76-gf0f6293 #12 [ 29.661720] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.671059] ffff8801c8f17838 ffffffff81d93149 ffffffff84195c17 ffff8801c8f17910 [ 29.679055] 0000000000000000 ffff8801c84f2d38 ffff8801c84f2d38 ffff8801c8f17900 [ 29.687037] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 29.695024] Call Trace: [ 29.697588] [] dump_stack+0xc1/0x128 [ 29.702926] [] panic+0x1bc/0x3a8 [ 29.707917] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.716125] [] ? add_taint+0x40/0x50 [ 29.721482] [] kasan_end_report+0x50/0x50 [ 29.727279] [] kasan_report+0x167/0x360 [ 29.732898] [] ? __lock_acquire+0x2eff/0x3640 [ 29.739029] [] __asan_report_load8_noabort+0x14/0x20 [ 29.745769] [] __lock_acquire+0x2eff/0x3640 [ 29.751716] [] ? __lock_acquire+0x629/0x3640 [ 29.757764] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.764751] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.771750] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.778742] [] ? mark_held_locks+0xaf/0x100 [ 29.784692] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.790902] [] lock_acquire+0x12e/0x410 [ 29.796505] [] ? remove_wait_queue+0x14/0x40 [ 29.802538] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.808838] [] ? remove_wait_queue+0x14/0x40 [ 29.814880] [] remove_wait_queue+0x14/0x40 [ 29.820745] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.827737] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.835002] [] ? ep_free+0x1b0/0x1b0 [ 29.840341] [] ep_free+0x96/0x1b0 [ 29.845423] [] ? ep_free+0x1b0/0x1b0 [ 29.850765] [] ep_eventpoll_release+0x44/0x60 [ 29.856897] [] __fput+0x28c/0x6e0 [ 29.861974] [] ____fput+0x15/0x20 [ 29.867398] [] task_work_run+0x115/0x190 [ 29.873095] [] do_exit+0x7e7/0x2a40 [ 29.878350] [] ? selinux_file_ioctl+0x355/0x530 [ 29.884642] [] ? release_task+0x1240/0x1240 [ 29.890587] [] ? SyS_epoll_create+0x190/0x190 [ 29.896712] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 29.903355] [] do_group_exit+0x108/0x320 [ 29.909065] [] SyS_exit_group+0x1d/0x20 [ 29.914669] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.921708] Dumping ftrace buffer: [ 29.925237] (ftrace buffer empty) [ 29.928925] Kernel Offset: disabled [ 29.932523] Rebooting in 86400 seconds..