[....] Starting enhanced syslogd: rsyslogd[ 10.747223] audit: type=1400 audit(1515595224.445:4): avc: denied { syslog } for pid=3178 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.13' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 20.113990] ================================================================== [ 20.115065] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 20.115961] Read of size 8 at addr ffff8801cda2cfb8 by task syzkaller524019/3327 [ 20.116943] [ 20.117190] CPU: 0 PID: 3327 Comm: syzkaller524019 Not tainted 4.9.76-g9154940 #20 [ 20.118213] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.119453] ffff8801c866f870 ffffffff81d93149 ffffea0007368b00 ffff8801cda2cfb8 [ 20.120581] 0000000000000000 ffff8801cda2cfb8 ffff8801cda2cfb8 ffff8801c866f8a8 [ 20.121713] ffffffff8153cb43 ffff8801cda2cfb8 0000000000000008 0000000000000000 [ 20.122842] Call Trace: [ 20.123244] [] dump_stack+0xc1/0x128 [ 20.123954] [] print_address_description+0x73/0x280 [ 20.124828] [] kasan_report+0x275/0x360 [ 20.125581] [] ? __lock_acquire+0x2eff/0x3640 [ 20.126390] [] __asan_report_load8_noabort+0x14/0x20 [ 20.127287] [] __lock_acquire+0x2eff/0x3640 [ 20.128074] [] ? __lock_acquire+0x629/0x3640 [ 20.128874] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.129792] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.130711] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.131663] [] ? mark_held_locks+0xaf/0x100 [ 20.132480] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.133300] [] lock_acquire+0x12e/0x410 [ 20.134040] [] ? remove_wait_queue+0x14/0x40 [ 20.139796] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.146082] [] ? remove_wait_queue+0x14/0x40 [ 20.152110] [] remove_wait_queue+0x14/0x40 [ 20.157971] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.164948] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.172183] [] ? ep_free+0x1b0/0x1b0 [ 20.177517] [] ep_free+0x96/0x1b0 [ 20.182590] [] ? ep_free+0x1b0/0x1b0 [ 20.187916] [] ep_eventpoll_release+0x44/0x60 [ 20.194027] [] __fput+0x28c/0x6e0 [ 20.199093] [] ____fput+0x15/0x20 [ 20.204159] [] task_work_run+0x115/0x190 [ 20.209835] [] do_exit+0x7e7/0x2a40 [ 20.215080] [] ? __pmd_alloc+0x410/0x410 [ 20.220755] [] ? release_task+0x1240/0x1240 [ 20.226692] [] ? __do_page_fault+0x5ec/0xd40 [ 20.232717] [] ? up_read+0x1a/0x40 [ 20.237879] [] ? __do_page_fault+0x3bd/0xd40 [ 20.243901] [] do_group_exit+0x108/0x320 [ 20.249577] [] ? do_group_exit+0x320/0x320 [ 20.255425] [] SyS_exit_group+0x1d/0x20 [ 20.261020] [] do_fast_syscall_32+0x2f7/0x890 [ 20.267128] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.273758] [] entry_SYSENTER_compat+0x74/0x83 [ 20.279959] [ 20.281560] Allocated by task 3327: [ 20.285154] save_stack_trace+0x16/0x20 [ 20.289094] save_stack+0x43/0xd0 [ 20.292511] kasan_kmalloc+0xad/0xe0 [ 20.296197] kmem_cache_alloc_trace+0xfb/0x2a0 [ 20.300746] binder_get_thread+0x15d/0x750 [ 20.304943] binder_poll+0x4a/0x210 [ 20.308535] SyS_epoll_ctl+0x11d7/0x2190 [ 20.312560] do_fast_syscall_32+0x2f7/0x890 [ 20.316844] entry_SYSENTER_compat+0x74/0x83 [ 20.321212] [ 20.322804] Freed by task 3327: [ 20.326047] save_stack_trace+0x16/0x20 [ 20.329985] save_stack+0x43/0xd0 [ 20.333404] kasan_slab_free+0x72/0xc0 [ 20.337589] kfree+0x103/0x300 [ 20.340750] binder_thread_dec_tmpref+0x1cc/0x240 [ 20.345563] binder_thread_release+0x27d/0x540 [ 20.350116] binder_ioctl+0x9c0/0x11b0 [ 20.353975] compat_SyS_ioctl+0x15f/0x2050 [ 20.358173] do_fast_syscall_32+0x2f7/0x890 [ 20.362467] entry_SYSENTER_compat+0x74/0x83 [ 20.366838] [ 20.368521] The buggy address belongs to the object at ffff8801cda2cf00 [ 20.368521] which belongs to the cache kmalloc-512 of size 512 [ 20.381142] The buggy address is located 184 bytes inside of [ 20.381142] 512-byte region [ffff8801cda2cf00, ffff8801cda2d100) [ 20.392984] The buggy address belongs to the page: [ 20.397881] page:ffffea0007368b00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 20.408036] flags: 0x8000000000004080(slab|head) [ 20.412753] page dumped because: kasan: bad access detected [ 20.418432] [ 20.420023] Memory state around the buggy address: [ 20.424915] ffff8801cda2ce80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.432239] ffff8801cda2cf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.439561] >ffff8801cda2cf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.446882] ^ [ 20.452035] ffff8801cda2d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.459359] ffff8801cda2d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.466679] ================================================================== [ 20.474001] Disabling lock debugging due to kernel taint [ 20.479423] Kernel panic - not syncing: panic_on_warn set ... [ 20.479423] [ 20.486749] CPU: 0 PID: 3327 Comm: syzkaller524019 Tainted: G B 4.9.76-g9154940 #20 [ 20.495634] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.504954] ffff8801c866f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801c866f8a0 [ 20.512896] 0000000000000000 ffff8801cda2cfb8 ffff8801cda2cfb8 ffff8801c866f890 [ 20.520845] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 20.528814] Call Trace: [ 20.531377] [] dump_stack+0xc1/0x128 [ 20.536706] [] panic+0x1bc/0x3a8 [ 20.541689] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.549883] [] ? add_taint+0x40/0x50 [ 20.555214] [] kasan_end_report+0x50/0x50 [ 20.560975] [] kasan_report+0x167/0x360 [ 20.566566] [] ? __lock_acquire+0x2eff/0x3640 [ 20.572676] [] __asan_report_load8_noabort+0x14/0x20 [ 20.579404] [] __lock_acquire+0x2eff/0x3640 [ 20.585342] [] ? __lock_acquire+0x629/0x3640 [ 20.591366] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.598344] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.605323] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.612301] [] ? mark_held_locks+0xaf/0x100 [ 20.618237] [] ? mutex_lock_nested+0x5e3/0x870 [ 20.624438] [] lock_acquire+0x12e/0x410 [ 20.630028] [] ? remove_wait_queue+0x14/0x40 [ 20.636049] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.642338] [] ? remove_wait_queue+0x14/0x40 [ 20.648361] [] remove_wait_queue+0x14/0x40 [ 20.654212] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.661190] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.668427] [] ? ep_free+0x1b0/0x1b0 [ 20.673754] [] ep_free+0x96/0x1b0 [ 20.678820] [] ? ep_free+0x1b0/0x1b0 [ 20.684147] [] ep_eventpoll_release+0x44/0x60 [ 20.690258] [] __fput+0x28c/0x6e0 [ 20.695323] [] ____fput+0x15/0x20 [ 20.700391] [] task_work_run+0x115/0x190 [ 20.706073] [] do_exit+0x7e7/0x2a40 [ 20.711315] [] ? __pmd_alloc+0x410/0x410 [ 20.716991] [] ? release_task+0x1240/0x1240 [ 20.722930] [] ? __do_page_fault+0x5ec/0xd40 [ 20.728960] [] ? up_read+0x1a/0x40 [ 20.734112] [] ? __do_page_fault+0x3bd/0xd40 [ 20.740143] [] do_group_exit+0x108/0x320 [ 20.745817] [] ? do_group_exit+0x320/0x320 [ 20.751664] [] SyS_exit_group+0x1d/0x20 [ 20.757253] [] do_fast_syscall_32+0x2f7/0x890 [ 20.763363] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.769993] [] entry_SYSENTER_compat+0x74/0x83 [ 20.776649] Dumping ftrace buffer: [ 20.780153] (ftrace buffer empty) [ 20.783830] Kernel Offset: disabled [ 20.787420] Rebooting in 86400 seconds..