[....] Starting enhanced syslogd: rsyslogd[ 10.255773] audit: type=1400 audit(1515089106.576:4): avc: denied { syslog } for pid=3170 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.8' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 22.342643] ================================================================== [ 22.343771] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 22.344681] Read of size 8 at addr ffff8801c84f9c38 by task syzkaller498576/3331 [ 22.345680] [ 22.345913] CPU: 0 PID: 3331 Comm: syzkaller498576 Not tainted 4.9.74-g173c52e #4 [ 22.346910] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.348185] ffff8801c991f8e0 ffffffff81d91b09 ffffea0007213e00 ffff8801c84f9c38 [ 22.349407] 0000000000000000 ffff8801c84f9c38 ffff8801c84f9c38 ffff8801c991f918 [ 22.350550] ffffffff8153b503 ffff8801c84f9c38 0000000000000008 0000000000000000 [ 22.351677] Call Trace: [ 22.352035] [] dump_stack+0xc1/0x128 [ 22.352749] [] print_address_description+0x73/0x280 [ 22.353642] [] kasan_report+0x275/0x360 [ 22.354414] [] ? __lock_acquire+0x2eff/0x3640 [ 22.355270] [] __asan_report_load8_noabort+0x14/0x20 [ 22.356158] [] __lock_acquire+0x2eff/0x3640 [ 22.356962] [] ? __lock_acquire+0x629/0x3640 [ 22.357761] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.358681] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.359612] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.360555] [] ? mark_held_locks+0xaf/0x100 [ 22.361419] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.362238] [] lock_acquire+0x12e/0x410 [ 22.364303] [] ? remove_wait_queue+0x14/0x40 [ 22.370327] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.376610] [] ? remove_wait_queue+0x14/0x40 [ 22.382644] [] remove_wait_queue+0x14/0x40 [ 22.388498] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.395485] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.402723] [] ? ep_free+0x1b0/0x1b0 [ 22.408054] [] ep_free+0x96/0x1b0 [ 22.413122] [] ? ep_free+0x1b0/0x1b0 [ 22.418448] [] ep_eventpoll_release+0x44/0x60 [ 22.424560] [] __fput+0x28c/0x6e0 [ 22.429630] [] ____fput+0x15/0x20 [ 22.434710] [] task_work_run+0x115/0x190 [ 22.440387] [] do_exit+0x7e7/0x2a40 [ 22.445631] [] ? selinux_file_ioctl+0x355/0x530 [ 22.451915] [] ? release_task+0x1240/0x1240 [ 22.457854] [] ? SyS_epoll_create+0x190/0x190 [ 22.463964] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 22.470597] [] do_group_exit+0x108/0x320 [ 22.476283] [] SyS_exit_group+0x1d/0x20 [ 22.481881] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.488424] [ 22.490021] Allocated by task 3331: [ 22.493613] save_stack_trace+0x16/0x20 [ 22.497558] save_stack+0x43/0xd0 [ 22.500990] kasan_kmalloc+0xad/0xe0 [ 22.504668] kmem_cache_alloc_trace+0xfb/0x2a0 [ 22.509223] binder_get_thread+0x15d/0x750 [ 22.513424] binder_poll+0x4a/0x210 [ 22.517016] SyS_epoll_ctl+0x11d7/0x2190 [ 22.521045] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.525763] [ 22.527365] Freed by task 3331: [ 22.530610] save_stack_trace+0x16/0x20 [ 22.534548] save_stack+0x43/0xd0 [ 22.537969] kasan_slab_free+0x72/0xc0 [ 22.541830] kfree+0x103/0x300 [ 22.544987] binder_thread_dec_tmpref+0x1cc/0x240 [ 22.549795] binder_thread_release+0x27d/0x540 [ 22.554342] binder_ioctl+0x9c0/0x11b0 [ 22.558194] do_vfs_ioctl+0x1aa/0x1140 [ 22.562045] SyS_ioctl+0x8f/0xc0 [ 22.565376] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.570094] [ 22.571690] The buggy address belongs to the object at ffff8801c84f9b80 [ 22.571690] which belongs to the cache kmalloc-512 of size 512 [ 22.584310] The buggy address is located 184 bytes inside of [ 22.584310] 512-byte region [ffff8801c84f9b80, ffff8801c84f9d80) [ 22.596159] The buggy address belongs to the page: [ 22.601053] page:ffffea0007213e00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 22.611212] flags: 0x8000000000004080(slab|head) [ 22.615930] page dumped because: kasan: bad access detected [ 22.621604] [ 22.623196] Memory state around the buggy address: [ 22.628098] ffff8801c84f9b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.635434] ffff8801c84f9b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.642759] >ffff8801c84f9c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.650098] ^ [ 22.655252] ffff8801c84f9c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.662576] ffff8801c84f9d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.669901] ================================================================== [ 22.677223] Disabling lock debugging due to kernel taint [ 22.682636] Kernel panic - not syncing: panic_on_warn set ... [ 22.682636] [ 22.689966] CPU: 0 PID: 3331 Comm: syzkaller498576 Tainted: G B 4.9.74-g173c52e #4 [ 22.698774] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.708098] ffff8801c991f838 ffffffff81d91b09 ffffffff841955df ffff8801c991f910 [ 22.716073] 0000000000000000 ffff8801c84f9c38 ffff8801c84f9c38 ffff8801c991f900 [ 22.724032] ffffffff8142d161 0000000041b58ab3 ffffffff84189020 ffffffff8142cfa5 [ 22.731996] Call Trace: [ 22.734547] [] dump_stack+0xc1/0x128 [ 22.739879] [] panic+0x1bc/0x3a8 [ 22.744861] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 22.753067] [] ? add_taint+0x40/0x50 [ 22.758395] [] kasan_end_report+0x50/0x50 [ 22.764157] [] kasan_report+0x167/0x360 [ 22.769749] [] ? __lock_acquire+0x2eff/0x3640 [ 22.775858] [] __asan_report_load8_noabort+0x14/0x20 [ 22.782576] [] __lock_acquire+0x2eff/0x3640 [ 22.788513] [] ? __lock_acquire+0x629/0x3640 [ 22.794537] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.801515] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.808500] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 22.815479] [] ? mark_held_locks+0xaf/0x100 [ 22.821417] [] ? mutex_lock_nested+0x5e3/0x870 [ 22.827614] [] lock_acquire+0x12e/0x410 [ 22.833217] [] ? remove_wait_queue+0x14/0x40 [ 22.839239] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 22.845525] [] ? remove_wait_queue+0x14/0x40 [ 22.851546] [] remove_wait_queue+0x14/0x40 [ 22.857402] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 22.864397] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 22.871649] [] ? ep_free+0x1b0/0x1b0 [ 22.876977] [] ep_free+0x96/0x1b0 [ 22.882054] [] ? ep_free+0x1b0/0x1b0 [ 22.887393] [] ep_eventpoll_release+0x44/0x60 [ 22.893504] [] __fput+0x28c/0x6e0 [ 22.898572] [] ____fput+0x15/0x20 [ 22.903641] [] task_work_run+0x115/0x190 [ 22.909326] [] do_exit+0x7e7/0x2a40 [ 22.914571] [] ? selinux_file_ioctl+0x355/0x530 [ 22.920855] [] ? release_task+0x1240/0x1240 [ 22.926791] [] ? SyS_epoll_create+0x190/0x190 [ 22.932905] [] ? entry_SYSCALL_64_fastpath+0x5/0xc6 [ 22.939539] [] do_group_exit+0x108/0x320 [ 22.945216] [] SyS_exit_group+0x1d/0x20 [ 22.950818] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 22.957747] Dumping ftrace buffer: [ 22.961253] (ftrace buffer empty) [ 22.964942] Kernel Offset: disabled [ 22.968535] Rebooting in 86400 seconds..