[....] Starting enhanced syslogd: rsyslogd[ 12.828290] audit: type=1400 audit(1517869840.243:4): avc: denied { syslog } for pid=3646 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: [ 70.462600] ================================================================== [ 70.470003] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 70.476646] Read of size 8 at addr ffff8801c0db3738 by task syzkaller788536/3830 [ 70.484162] [ 70.485767] CPU: 1 PID: 3830 Comm: syzkaller788536 Not tainted 4.9.80-gb30d2b5 #36 [ 70.493453] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 70.502781] ffff8801b3077870 ffffffff81d94b69 ffffea0007036c80 ffff8801c0db3738 [ 70.510763] 0000000000000000 ffff8801c0db3738 ffff8801c0db3738 ffff8801b30778a8 [ 70.518749] ffffffff8153e093 ffff8801c0db3738 0000000000000008 0000000000000000 [ 70.526728] Call Trace: [ 70.529290] [] dump_stack+0xc1/0x128 [ 70.534627] [] print_address_description+0x73/0x280 [ 70.541262] [] kasan_report+0x275/0x360 [ 70.546864] [] ? __lock_acquire+0x2eff/0x3640 [ 70.552980] [] __asan_report_load8_noabort+0x14/0x20 [ 70.559705] [] __lock_acquire+0x2eff/0x3640 [ 70.565649] [] ? __lock_acquire+0x629/0x3640 [ 70.571677] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 70.578662] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 70.585643] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 70.592626] [] ? mark_held_locks+0xaf/0x100 [ 70.598577] [] ? mutex_lock_nested+0x5e3/0x870 [ 70.604780] [] lock_acquire+0x12e/0x410 [ 70.610374] [] ? remove_wait_queue+0x14/0x40 [ 70.616406] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 70.622693] [] ? remove_wait_queue+0x14/0x40 [ 70.628719] [] remove_wait_queue+0x14/0x40 [ 70.634574] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 70.641557] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 70.648800] [] ? ep_free+0x1b0/0x1b0 [ 70.654133] [] ep_free+0x96/0x1b0 [ 70.659204] [] ? ep_free+0x1b0/0x1b0 [ 70.664534] [] ep_eventpoll_release+0x44/0x60 [ 70.670650] [] __fput+0x28c/0x6e0 [ 70.675728] [] ____fput+0x15/0x20 [ 70.680804] [] task_work_run+0x115/0x190 [ 70.686487] [] do_exit+0x7e7/0x2a40 [ 70.691733] [] ? __pmd_alloc+0x410/0x410 [ 70.697420] [] ? release_task+0x1240/0x1240 [ 70.703372] [] ? __do_page_fault+0x5ec/0xd40 [ 70.709400] [] ? up_read+0x1a/0x40 [ 70.714560] [] ? __do_page_fault+0x3bd/0xd40 [ 70.720588] [] do_group_exit+0x108/0x320 [ 70.726268] [] ? do_group_exit+0x320/0x320 [ 70.732123] [] SyS_exit_group+0x1d/0x20 [ 70.737716] [] do_fast_syscall_32+0x2f7/0x890 [ 70.743839] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 70.750485] [] entry_SYSENTER_compat+0x74/0x83 [ 70.756683] [ 70.758282] Allocated by task 3830: [ 70.761878] save_stack_trace+0x16/0x20 [ 70.765823] save_stack+0x43/0xd0 [ 70.769246] kasan_kmalloc+0xad/0xe0 [ 70.772927] kmem_cache_alloc_trace+0xfb/0x2a0 [ 70.777480] binder_get_thread+0x15d/0x750 [ 70.781681] binder_poll+0x4a/0x210 [ 70.785277] SyS_epoll_ctl+0x11d7/0x2190 [ 70.789308] do_fast_syscall_32+0x2f7/0x890 [ 70.793601] entry_SYSENTER_compat+0x74/0x83 [ 70.797975] [ 70.799570] Freed by task 3830: [ 70.802820] save_stack_trace+0x16/0x20 [ 70.806761] save_stack+0x43/0xd0 [ 70.810182] kasan_slab_free+0x72/0xc0 [ 70.814038] kfree+0x103/0x300 [ 70.817199] binder_thread_dec_tmpref+0x1cc/0x240 [ 70.822027] binder_thread_release+0x27d/0x540 [ 70.826579] binder_ioctl+0x9c0/0x11b0 [ 70.830436] compat_SyS_ioctl+0x15f/0x2050 [ 70.834639] do_fast_syscall_32+0x2f7/0x890 [ 70.838930] entry_SYSENTER_compat+0x74/0x83 [ 70.843305] [ 70.844903] The buggy address belongs to the object at ffff8801c0db3680 [ 70.844903] which belongs to the cache kmalloc-512 of size 512 [ 70.857527] The buggy address is located 184 bytes inside of [ 70.857527] 512-byte region [ffff8801c0db3680, ffff8801c0db3880) [ 70.869371] The buggy address belongs to the page: [ 70.874273] page:ffffea0007036c80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 70.884438] flags: 0x8000000000004080(slab|head) [ 70.889158] page dumped because: kasan: bad access detected [ 70.894834] [ 70.896430] Memory state around the buggy address: [ 70.901328] ffff8801c0db3600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 70.908656] ffff8801c0db3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.915984] >ffff8801c0db3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.923315] ^ [ 70.928471] ffff8801c0db3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.935798] ffff8801c0db3800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 70.943126] ================================================================== [ 70.950452] Disabling lock debugging due to kernel taint [ 70.955872] Kernel panic - not syncing: panic_on_warn set ... [ 70.955872] [ 70.963213] CPU: 1 PID: 3830 Comm: syzkaller788536 Tainted: G B 4.9.80-gb30d2b5 #36 [ 70.972112] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 70.981439] ffff8801b30777c8 ffffffff81d94b69 ffffffff841970af ffff8801b30778a0 [ 70.989433] 0000000000000000 ffff8801c0db3738 ffff8801c0db3738 ffff8801b3077890 [ 70.997397] ffffffff8142f541 0000000041b58ab3 ffffffff8418ab20 ffffffff8142f385 [ 71.005375] Call Trace: [ 71.007934] [] dump_stack+0xc1/0x128 [ 71.013268] [] panic+0x1bc/0x3a8 [ 71.018253] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 71.026452] [] ? add_taint+0x40/0x50 [ 71.031785] [] kasan_end_report+0x50/0x50 [ 71.037560] [] kasan_report+0x167/0x360 [ 71.043156] [] ? __lock_acquire+0x2eff/0x3640 [ 71.049294] [] __asan_report_load8_noabort+0x14/0x20 [ 71.056024] [] __lock_acquire+0x2eff/0x3640 [ 71.061963] [] ? __lock_acquire+0x629/0x3640 [ 71.068006] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 71.074990] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 71.081975] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 71.088955] [] ? mark_held_locks+0xaf/0x100 [ 71.094897] [] ? mutex_lock_nested+0x5e3/0x870 [ 71.101095] [] lock_acquire+0x12e/0x410 [ 71.106694] [] ? remove_wait_queue+0x14/0x40 [ 71.112722] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 71.119011] [] ? remove_wait_queue+0x14/0x40 [ 71.125037] [] remove_wait_queue+0x14/0x40 [ 71.130891] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 71.137871] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 71.145112] [] ? ep_free+0x1b0/0x1b0 [ 71.150445] [] ep_free+0x96/0x1b0 [ 71.155526] [] ? ep_free+0x1b0/0x1b0 [ 71.160856] [] ep_eventpoll_release+0x44/0x60 [ 71.166980] [] __fput+0x28c/0x6e0 [ 71.172068] [] ____fput+0x15/0x20 [ 71.177140] [] task_work_run+0x115/0x190 [ 71.182842] [] do_exit+0x7e7/0x2a40 [ 71.188090] [] ? __pmd_alloc+0x410/0x410 [ 71.193771] [] ? release_task+0x1240/0x1240 [ 71.199713] [] ? __do_page_fault+0x5ec/0xd40 [ 71.205740] [] ? up_read+0x1a/0x40 [ 71.210900] [] ? __do_page_fault+0x3bd/0xd40 [ 71.216927] [] do_group_exit+0x108/0x320 [ 71.222608] [] ? do_group_exit+0x320/0x320 [ 71.228478] [] SyS_exit_group+0x1d/0x20 [ 71.234085] [] do_fast_syscall_32+0x2f7/0x890 [ 71.240201] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 71.246839] [] entry_SYSENTER_compat+0x74/0x83 [ 71.253464] Dumping ftrace buffer: [ 71.256978] (ftrace buffer empty) [ 71.260663] Kernel Offset: disabled [ 71.264260] Rebooting in 86400 seconds..