[....] Starting enhanced syslogd: rsyslogd[ 12.355471] audit: type=1400 audit(1516077455.774:4): avc: denied { syslog } for pid=3163 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.0.28' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.031672] ================================================================== [ 27.039060] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 27.045694] Read of size 8 at addr ffff8801cc9359b8 by task syzkaller605626/3326 [ 27.053189] [ 27.054782] CPU: 1 PID: 3326 Comm: syzkaller605626 Not tainted 4.9.76-g8dec074 #13 [ 27.062452] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.071769] ffff8801c8b878e0 ffffffff81d93169 ffffea0007324d00 ffff8801cc9359b8 [ 27.079724] 0000000000000000 ffff8801cc9359b8 ffff8801cc9359b8 ffff8801c8b87918 [ 27.087687] ffffffff8153cb43 ffff8801cc9359b8 0000000000000008 0000000000000000 [ 27.095629] Call Trace: [ 27.098184] [] dump_stack+0xc1/0x128 [ 27.103511] [] print_address_description+0x73/0x280 [ 27.110144] [] kasan_report+0x275/0x360 [ 27.115736] [] ? __lock_acquire+0x2eff/0x3640 [ 27.121849] [] __asan_report_load8_noabort+0x14/0x20 [ 27.128565] [] __lock_acquire+0x2eff/0x3640 [ 27.134503] [] ? __lock_acquire+0x629/0x3640 [ 27.140526] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.147504] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.154488] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.161466] [] ? mark_held_locks+0xaf/0x100 [ 27.167405] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.173618] [] lock_acquire+0x12e/0x410 [ 27.179209] [] ? remove_wait_queue+0x14/0x40 [ 27.185233] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.191531] [] ? remove_wait_queue+0x14/0x40 [ 27.197556] [] remove_wait_queue+0x14/0x40 [ 27.203406] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.210385] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.217622] [] ? ep_free+0x1b0/0x1b0 [ 27.222956] [] ep_free+0x96/0x1b0 [ 27.228021] [] ? ep_free+0x1b0/0x1b0 [ 27.233349] [] ep_eventpoll_release+0x44/0x60 [ 27.239459] [] __fput+0x28c/0x6e0 [ 27.244525] [] ____fput+0x15/0x20 [ 27.249600] [] task_work_run+0x115/0x190 [ 27.255283] [] do_exit+0x7e7/0x2a40 [ 27.260536] [] ? selinux_file_ioctl+0x355/0x530 [ 27.266820] [] ? release_task+0x1240/0x1240 [ 27.273284] [] ? SyS_epoll_create+0x190/0x190 [ 27.279584] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 27.286211] [] do_group_exit+0x108/0x320 [ 27.291895] [] SyS_exit_group+0x1d/0x20 [ 27.297483] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.304030] [ 27.305622] Allocated by task 3326: [ 27.309217] save_stack_trace+0x16/0x20 [ 27.313156] save_stack+0x43/0xd0 [ 27.316574] kasan_kmalloc+0xad/0xe0 [ 27.320251] kmem_cache_alloc_trace+0xfb/0x2a0 [ 27.324800] binder_get_thread+0x15d/0x750 [ 27.328996] binder_poll+0x4a/0x210 [ 27.332588] SyS_epoll_ctl+0x11d7/0x2190 [ 27.336610] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.341327] [ 27.342917] Freed by task 3326: [ 27.346164] save_stack_trace+0x16/0x20 [ 27.350102] save_stack+0x43/0xd0 [ 27.353534] kasan_slab_free+0x72/0xc0 [ 27.357394] kfree+0x103/0x300 [ 27.360553] binder_thread_dec_tmpref+0x1cc/0x240 [ 27.365360] binder_thread_release+0x27d/0x540 [ 27.369907] binder_ioctl+0x9c0/0x11b0 [ 27.373758] do_vfs_ioctl+0x1aa/0x1140 [ 27.377614] SyS_ioctl+0x8f/0xc0 [ 27.380944] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.385666] [ 27.387258] The buggy address belongs to the object at ffff8801cc935900 [ 27.387258] which belongs to the cache kmalloc-512 of size 512 [ 27.399877] The buggy address is located 184 bytes inside of [ 27.399877] 512-byte region [ffff8801cc935900, ffff8801cc935b00) [ 27.411719] The buggy address belongs to the page: [ 27.416614] page:ffffea0007324d00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 27.426907] flags: 0x8000000000004080(slab|head) [ 27.431630] page dumped because: kasan: bad access detected [ 27.437307] [ 27.438900] Memory state around the buggy address: [ 27.443795] ffff8801cc935880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.451120] ffff8801cc935900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.458448] >ffff8801cc935980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.465778] ^ [ 27.470936] ffff8801cc935a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.478259] ffff8801cc935a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.485581] ================================================================== [ 27.492909] Disabling lock debugging due to kernel taint [ 27.498323] Kernel panic - not syncing: panic_on_warn set ... [ 27.498323] [ 27.505654] CPU: 1 PID: 3326 Comm: syzkaller605626 Tainted: G B 4.9.76-g8dec074 #13 [ 27.514547] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.523868] ffff8801c8b87838 ffffffff81d93169 ffffffff84195c2f ffff8801c8b87910 [ 27.531813] 0000000000000000 ffff8801cc9359b8 ffff8801cc9359b8 ffff8801c8b87900 [ 27.539762] ffffffff8142e371 0000000041b58ab3 ffffffff84189690 ffffffff8142e1b5 [ 27.547704] Call Trace: [ 27.550257] [] dump_stack+0xc1/0x128 [ 27.555585] [] panic+0x1bc/0x3a8 [ 27.560567] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 27.568761] [] ? add_taint+0x40/0x50 [ 27.574104] [] kasan_end_report+0x50/0x50 [ 27.579871] [] kasan_report+0x167/0x360 [ 27.585460] [] ? __lock_acquire+0x2eff/0x3640 [ 27.591569] [] __asan_report_load8_noabort+0x14/0x20 [ 27.598286] [] __lock_acquire+0x2eff/0x3640 [ 27.604224] [] ? __lock_acquire+0x629/0x3640 [ 27.610246] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.617226] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.624203] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 27.631182] [] ? mark_held_locks+0xaf/0x100 [ 27.637120] [] ? mutex_lock_nested+0x5e3/0x870 [ 27.643316] [] lock_acquire+0x12e/0x410 [ 27.648904] [] ? remove_wait_queue+0x14/0x40 [ 27.654928] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 27.661212] [] ? remove_wait_queue+0x14/0x40 [ 27.667234] [] remove_wait_queue+0x14/0x40 [ 27.673083] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 27.680070] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 27.687307] [] ? ep_free+0x1b0/0x1b0 [ 27.692641] [] ep_free+0x96/0x1b0 [ 27.697708] [] ? ep_free+0x1b0/0x1b0 [ 27.703039] [] ep_eventpoll_release+0x44/0x60 [ 27.709154] [] __fput+0x28c/0x6e0 [ 27.714224] [] ____fput+0x15/0x20 [ 27.719293] [] task_work_run+0x115/0x190 [ 27.724969] [] do_exit+0x7e7/0x2a40 [ 27.730215] [] ? selinux_file_ioctl+0x355/0x530 [ 27.736507] [] ? release_task+0x1240/0x1240 [ 27.742444] [] ? SyS_epoll_create+0x190/0x190 [ 27.748561] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 27.755191] [] do_group_exit+0x108/0x320 [ 27.760868] [] SyS_exit_group+0x1d/0x20 [ 27.766454] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 27.773386] Dumping ftrace buffer: [ 27.776894] (ftrace buffer empty) [ 27.780569] Kernel Offset: disabled [ 27.784157] Rebooting in 86400 seconds..