[....] Starting enhanced syslogd: rsyslogd[ 13.706054] audit: type=1400 audit(1515429794.905:4): avc: denied { syslog } for pid=3173 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.15.247' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 39.926222] ================================================================== [ 39.933595] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 39.940233] Read of size 8 at addr ffff8801c8dca5b8 by task syzkaller479686/3338 [ 39.947731] [ 39.949337] CPU: 1 PID: 3338 Comm: syzkaller479686 Not tainted 4.9.75-g5f5e5d4 #17 [ 39.957007] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 39.966329] ffff8801c908f870 ffffffff81d93049 ffffea0007237280 ffff8801c8dca5b8 [ 39.974284] 0000000000000000 ffff8801c8dca5b8 ffff8801c8dca5b8 ffff8801c908f8a8 [ 39.982248] ffffffff8153ca53 ffff8801c8dca5b8 0000000000000008 0000000000000000 [ 39.990188] Call Trace: [ 39.992745] [] dump_stack+0xc1/0x128 [ 39.998082] [] print_address_description+0x73/0x280 [ 40.004713] [] kasan_report+0x275/0x360 [ 40.010301] [] ? __lock_acquire+0x2eff/0x3640 [ 40.016410] [] __asan_report_load8_noabort+0x14/0x20 [ 40.023127] [] __lock_acquire+0x2eff/0x3640 [ 40.029061] [] ? __lock_acquire+0x629/0x3640 [ 40.035084] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 40.042063] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 40.049051] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 40.056030] [] ? mark_held_locks+0xaf/0x100 [ 40.061978] [] ? mutex_lock_nested+0x5e3/0x870 [ 40.068175] [] lock_acquire+0x12e/0x410 [ 40.073764] [] ? remove_wait_queue+0x14/0x40 [ 40.079785] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 40.086068] [] ? remove_wait_queue+0x14/0x40 [ 40.092091] [] remove_wait_queue+0x14/0x40 [ 40.097944] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 40.104923] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 40.112174] [] ? ep_free+0x1b0/0x1b0 [ 40.117500] [] ep_free+0x96/0x1b0 [ 40.122566] [] ? ep_free+0x1b0/0x1b0 [ 40.127900] [] ep_eventpoll_release+0x44/0x60 [ 40.134010] [] __fput+0x28c/0x6e0 [ 40.139077] [] ____fput+0x15/0x20 [ 40.144147] [] task_work_run+0x115/0x190 [ 40.149824] [] do_exit+0x7e7/0x2a40 [ 40.155074] [] ? __pmd_alloc+0x410/0x410 [ 40.160748] [] ? release_task+0x1240/0x1240 [ 40.166685] [] ? __do_page_fault+0x5ec/0xd40 [ 40.172707] [] ? up_read+0x1a/0x40 [ 40.177863] [] ? __do_page_fault+0x3bd/0xd40 [ 40.183889] [] do_group_exit+0x108/0x320 [ 40.189567] [] ? do_group_exit+0x320/0x320 [ 40.195424] [] SyS_exit_group+0x1d/0x20 [ 40.201027] [] do_fast_syscall_32+0x2f7/0x890 [ 40.207139] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.213775] [] entry_SYSENTER_compat+0x74/0x83 [ 40.219970] [ 40.221570] Allocated by task 3338: [ 40.225164] save_stack_trace+0x16/0x20 [ 40.229101] save_stack+0x43/0xd0 [ 40.232520] kasan_kmalloc+0xad/0xe0 [ 40.236198] kmem_cache_alloc_trace+0xfb/0x2a0 [ 40.240749] binder_get_thread+0x15d/0x750 [ 40.244952] binder_poll+0x4a/0x210 [ 40.248545] SyS_epoll_ctl+0x11d7/0x2190 [ 40.252574] do_fast_syscall_32+0x2f7/0x890 [ 40.256859] entry_SYSENTER_compat+0x74/0x83 [ 40.261238] [ 40.262837] Freed by task 3338: [ 40.266084] save_stack_trace+0x16/0x20 [ 40.270021] save_stack+0x43/0xd0 [ 40.273438] kasan_slab_free+0x72/0xc0 [ 40.277290] kfree+0x103/0x300 [ 40.280450] binder_thread_dec_tmpref+0x1cc/0x240 [ 40.285257] binder_thread_release+0x27d/0x540 [ 40.289802] binder_ioctl+0x9c0/0x11b0 [ 40.293654] compat_SyS_ioctl+0x15f/0x2050 [ 40.297853] do_fast_syscall_32+0x2f7/0x890 [ 40.302137] entry_SYSENTER_compat+0x74/0x83 [ 40.306507] [ 40.308101] The buggy address belongs to the object at ffff8801c8dca500 [ 40.308101] which belongs to the cache kmalloc-512 of size 512 [ 40.320729] The buggy address is located 184 bytes inside of [ 40.320729] 512-byte region [ffff8801c8dca500, ffff8801c8dca700) [ 40.332567] The buggy address belongs to the page: [ 40.337463] page:ffffea0007237280 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 40.347619] flags: 0x8000000000004080(slab|head) [ 40.352336] page dumped because: kasan: bad access detected [ 40.358008] [ 40.359601] Memory state around the buggy address: [ 40.364495] ffff8801c8dca480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 40.371817] ffff8801c8dca500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.379140] >ffff8801c8dca580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.386465] ^ [ 40.391619] ffff8801c8dca600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.398943] ffff8801c8dca680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 40.406267] ================================================================== [ 40.413591] Disabling lock debugging due to kernel taint [ 40.419010] Kernel panic - not syncing: panic_on_warn set ... [ 40.419010] [ 40.426340] CPU: 1 PID: 3338 Comm: syzkaller479686 Tainted: G B 4.9.75-g5f5e5d4 #17 [ 40.435225] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.444547] ffff8801c908f7c8 ffffffff81d93049 ffffffff84195be7 ffff8801c908f8a0 [ 40.452497] 0000000000000000 ffff8801c8dca5b8 ffff8801c8dca5b8 ffff8801c908f890 [ 40.460460] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 40.468407] Call Trace: [ 40.470963] [] dump_stack+0xc1/0x128 [ 40.476294] [] panic+0x1bc/0x3a8 [ 40.481273] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 40.489467] [] ? add_taint+0x40/0x50 [ 40.494798] [] kasan_end_report+0x50/0x50 [ 40.500562] [] kasan_report+0x167/0x360 [ 40.506160] [] ? __lock_acquire+0x2eff/0x3640 [ 40.512270] [] __asan_report_load8_noabort+0x14/0x20 [ 40.518988] [] __lock_acquire+0x2eff/0x3640 [ 40.524927] [] ? __lock_acquire+0x629/0x3640 [ 40.530963] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 40.537954] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 40.544934] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 40.551914] [] ? mark_held_locks+0xaf/0x100 [ 40.557854] [] ? mutex_lock_nested+0x5e3/0x870 [ 40.564063] [] lock_acquire+0x12e/0x410 [ 40.569656] [] ? remove_wait_queue+0x14/0x40 [ 40.575680] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 40.581963] [] ? remove_wait_queue+0x14/0x40 [ 40.588000] [] remove_wait_queue+0x14/0x40 [ 40.593854] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 40.600837] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 40.608076] [] ? ep_free+0x1b0/0x1b0 [ 40.613403] [] ep_free+0x96/0x1b0 [ 40.618469] [] ? ep_free+0x1b0/0x1b0 [ 40.623798] [] ep_eventpoll_release+0x44/0x60 [ 40.629914] [] __fput+0x28c/0x6e0 [ 40.634984] [] ____fput+0x15/0x20 [ 40.640057] [] task_work_run+0x115/0x190 [ 40.645736] [] do_exit+0x7e7/0x2a40 [ 40.650977] [] ? __pmd_alloc+0x410/0x410 [ 40.656654] [] ? release_task+0x1240/0x1240 [ 40.662593] [] ? __do_page_fault+0x5ec/0xd40 [ 40.668616] [] ? up_read+0x1a/0x40 [ 40.673786] [] ? __do_page_fault+0x3bd/0xd40 [ 40.679811] [] do_group_exit+0x108/0x320 [ 40.685488] [] ? do_group_exit+0x320/0x320 [ 40.691336] [] SyS_exit_group+0x1d/0x20 [ 40.697011] [] do_fast_syscall_32+0x2f7/0x890 [ 40.703121] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 40.709752] [] entry_SYSENTER_compat+0x74/0x83 [ 40.715992] Dumping ftrace buffer: [ 40.719504] (ftrace buffer empty) [ 40.723179] Kernel Offset: disabled [ 40.726771] Rebooting in 86400 seconds..