[....] Starting enhanced syslogd: rsyslogd[ 12.705531] audit: type=1400 audit(1515739264.032:4): avc: denied { syslog } for pid=3169 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.0.21' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 21.337336] ================================================================== [ 21.344726] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 21.351363] Read of size 8 at addr ffff8801c930b4b8 by task syzkaller917172/3322 [ 21.358857] [ 21.360452] CPU: 0 PID: 3322 Comm: syzkaller917172 Not tainted 4.9.76-g9154940 #10 [ 21.368138] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.377462] ffff8801c93478e0 ffffffff81d93149 ffffea000724c280 ffff8801c930b4b8 [ 21.385407] 0000000000000000 ffff8801c930b4b8 ffff8801c930b4b8 ffff8801c9347918 [ 21.393354] ffffffff8153cb43 ffff8801c930b4b8 0000000000000008 0000000000000000 [ 21.401309] Call Trace: [ 21.403864] [] dump_stack+0xc1/0x128 [ 21.409192] [] print_address_description+0x73/0x280 [ 21.415831] [] kasan_report+0x275/0x360 [ 21.421428] [] ? __lock_acquire+0x2eff/0x3640 [ 21.427539] [] __asan_report_load8_noabort+0x14/0x20 [ 21.434257] [] __lock_acquire+0x2eff/0x3640 [ 21.440194] [] ? __lock_acquire+0x629/0x3640 [ 21.446218] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.453212] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.460190] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.467168] [] ? mark_held_locks+0xaf/0x100 [ 21.473115] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.479313] [] lock_acquire+0x12e/0x410 [ 21.484910] [] ? remove_wait_queue+0x14/0x40 [ 21.490933] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.497217] [] ? remove_wait_queue+0x14/0x40 [ 21.503242] [] remove_wait_queue+0x14/0x40 [ 21.509091] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.516070] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.523309] [] ? ep_free+0x1b0/0x1b0 [ 21.528636] [] ep_free+0x96/0x1b0 [ 21.533710] [] ? ep_free+0x1b0/0x1b0 [ 21.539039] [] ep_eventpoll_release+0x44/0x60 [ 21.545152] [] __fput+0x28c/0x6e0 [ 21.550220] [] ____fput+0x15/0x20 [ 21.555292] [] task_work_run+0x115/0x190 [ 21.560975] [] do_exit+0x7e7/0x2a40 [ 21.566219] [] ? selinux_file_ioctl+0x355/0x530 [ 21.572503] [] ? release_task+0x1240/0x1240 [ 21.578448] [] ? SyS_epoll_create+0x190/0x190 [ 21.584564] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 21.591203] [] do_group_exit+0x108/0x320 [ 21.596884] [] SyS_exit_group+0x1d/0x20 [ 21.602472] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 21.609015] [ 21.610610] Allocated by task 3322: [ 21.614209] save_stack_trace+0x16/0x20 [ 21.618235] save_stack+0x43/0xd0 [ 21.621652] kasan_kmalloc+0xad/0xe0 [ 21.625329] kmem_cache_alloc_trace+0xfb/0x2a0 [ 21.629877] binder_get_thread+0x15d/0x750 [ 21.634076] binder_poll+0x4a/0x210 [ 21.637666] SyS_epoll_ctl+0x11d7/0x2190 [ 21.641692] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 21.646416] [ 21.648006] Freed by task 3322: [ 21.651251] save_stack_trace+0x16/0x20 [ 21.655202] save_stack+0x43/0xd0 [ 21.658618] kasan_slab_free+0x72/0xc0 [ 21.662475] kfree+0x103/0x300 [ 21.665632] binder_thread_dec_tmpref+0x1cc/0x240 [ 21.670437] binder_thread_release+0x27d/0x540 [ 21.674988] binder_ioctl+0x9c0/0x11b0 [ 21.678841] do_vfs_ioctl+0x1aa/0x1140 [ 21.682691] SyS_ioctl+0x8f/0xc0 [ 21.686021] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 21.690740] [ 21.692334] The buggy address belongs to the object at ffff8801c930b400 [ 21.692334] which belongs to the cache kmalloc-512 of size 512 [ 21.704959] The buggy address is located 184 bytes inside of [ 21.704959] 512-byte region [ffff8801c930b400, ffff8801c930b600) [ 21.716800] The buggy address belongs to the page: [ 21.721696] page:ffffea000724c280 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 21.731850] flags: 0x8000000000004080(slab|head) [ 21.736572] page dumped because: kasan: bad access detected [ 21.742243] [ 21.743835] Memory state around the buggy address: [ 21.748732] ffff8801c930b380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.756056] ffff8801c930b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.763380] >ffff8801c930b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.770713] ^ [ 21.775870] ffff8801c930b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.783192] ffff8801c930b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.790512] ================================================================== [ 21.797833] Disabling lock debugging due to kernel taint [ 21.803248] Kernel panic - not syncing: panic_on_warn set ... [ 21.803248] [ 21.810576] CPU: 0 PID: 3322 Comm: syzkaller917172 Tainted: G B 4.9.76-g9154940 #10 [ 21.819461] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 21.828782] ffff8801c9347838 ffffffff81d93149 ffffffff84195c17 ffff8801c9347910 [ 21.836728] 0000000000000000 ffff8801c930b4b8 ffff8801c930b4b8 ffff8801c9347900 [ 21.844669] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 21.852614] Call Trace: [ 21.855170] [] dump_stack+0xc1/0x128 [ 21.860498] [] panic+0x1bc/0x3a8 [ 21.865481] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 21.873693] [] ? add_taint+0x40/0x50 [ 21.879030] [] kasan_end_report+0x50/0x50 [ 21.884795] [] kasan_report+0x167/0x360 [ 21.890384] [] ? __lock_acquire+0x2eff/0x3640 [ 21.896494] [] __asan_report_load8_noabort+0x14/0x20 [ 21.903212] [] __lock_acquire+0x2eff/0x3640 [ 21.909152] [] ? __lock_acquire+0x629/0x3640 [ 21.915176] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.922155] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.929133] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 21.936113] [] ? mark_held_locks+0xaf/0x100 [ 21.942053] [] ? mutex_lock_nested+0x5e3/0x870 [ 21.948249] [] lock_acquire+0x12e/0x410 [ 21.953839] [] ? remove_wait_queue+0x14/0x40 [ 21.959869] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 21.966168] [] ? remove_wait_queue+0x14/0x40 [ 21.972197] [] remove_wait_queue+0x14/0x40 [ 21.978062] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 21.985044] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 21.992283] [] ? ep_free+0x1b0/0x1b0 [ 21.997611] [] ep_free+0x96/0x1b0 [ 22.002682] [] ? ep_free+0x1b0/0x1b0 [ 22.008014] [] ep_eventpoll_release+0x44/0x60 [ 22.014123] [] __fput+0x28c/0x6e0 [ 22.019191] [] ____fput+0x15/0x20 [ 22.024260] [] task_work_run+0x115/0x190 [ 22.029939] [] do_exit+0x7e7/0x2a40 [ 22.035188] [] ? selinux_file_ioctl+0x355/0x530 [ 22.041470] [] ? release_task+0x1240/0x1240 [ 22.047408] [] ? SyS_epoll_create+0x190/0x190 [ 22.053529] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 22.060159] [] do_group_exit+0x108/0x320 [ 22.065835] [] SyS_exit_group+0x1d/0x20 [ 22.071427] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 22.078421] Dumping ftrace buffer: [ 22.081927] (ftrace buffer empty) [ 22.085604] Kernel Offset: disabled [ 22.089199] Rebooting in 86400 seconds..