[....] Starting enhanced syslogd: rsyslogd[ 13.586748] audit: type=1400 audit(1515682215.526:4): avc: denied { syslog } for pid=3179 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.33' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 31.885094] ================================================================== [ 31.892477] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 31.899108] Read of size 8 at addr ffff8801c85a9738 by task syzkaller162390/3336 [ 31.906604] [ 31.908200] CPU: 0 PID: 3336 Comm: syzkaller162390 Not tainted 4.9.76-g9154940 #20 [ 31.915876] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.925209] ffff8801c87e7870 ffffffff81d93149 ffffea0007216a00 ffff8801c85a9738 [ 31.933156] 0000000000000000 ffff8801c85a9738 ffff8801c85a9738 ffff8801c87e78a8 [ 31.941101] ffffffff8153cb43 ffff8801c85a9738 0000000000000008 0000000000000000 [ 31.949047] Call Trace: [ 31.951603] [] dump_stack+0xc1/0x128 [ 31.956933] [] print_address_description+0x73/0x280 [ 31.963575] [] kasan_report+0x275/0x360 [ 31.969166] [] ? __lock_acquire+0x2eff/0x3640 [ 31.975277] [] __asan_report_load8_noabort+0x14/0x20 [ 31.981997] [] __lock_acquire+0x2eff/0x3640 [ 31.987932] [] ? __lock_acquire+0x629/0x3640 [ 31.993956] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.000934] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.007919] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.014905] [] ? mark_held_locks+0xaf/0x100 [ 32.020847] [] ? mutex_lock_nested+0x5e3/0x870 [ 32.027043] [] lock_acquire+0x12e/0x410 [ 32.032633] [] ? remove_wait_queue+0x14/0x40 [ 32.038654] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 32.044938] [] ? remove_wait_queue+0x14/0x40 [ 32.050970] [] remove_wait_queue+0x14/0x40 [ 32.056821] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 32.063800] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 32.071037] [] ? ep_free+0x1b0/0x1b0 [ 32.076366] [] ep_free+0x96/0x1b0 [ 32.081432] [] ? ep_free+0x1b0/0x1b0 [ 32.086758] [] ep_eventpoll_release+0x44/0x60 [ 32.092872] [] __fput+0x28c/0x6e0 [ 32.097940] [] ____fput+0x15/0x20 [ 32.103009] [] task_work_run+0x115/0x190 [ 32.108691] [] do_exit+0x7e7/0x2a40 [ 32.113932] [] ? __pmd_alloc+0x410/0x410 [ 32.119608] [] ? release_task+0x1240/0x1240 [ 32.125544] [] ? __do_page_fault+0x5ec/0xd40 [ 32.131566] [] ? up_read+0x1a/0x40 [ 32.137277] [] ? __do_page_fault+0x3bd/0xd40 [ 32.143302] [] do_group_exit+0x108/0x320 [ 32.148981] [] ? do_group_exit+0x320/0x320 [ 32.154831] [] SyS_exit_group+0x1d/0x20 [ 32.160419] [] do_fast_syscall_32+0x2f7/0x890 [ 32.166527] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.173159] [] entry_SYSENTER_compat+0x74/0x83 [ 32.179352] [ 32.180954] Allocated by task 3336: [ 32.184547] save_stack_trace+0x16/0x20 [ 32.188486] save_stack+0x43/0xd0 [ 32.191903] kasan_kmalloc+0xad/0xe0 [ 32.195589] kmem_cache_alloc_trace+0xfb/0x2a0 [ 32.200140] binder_get_thread+0x15d/0x750 [ 32.204339] binder_poll+0x4a/0x210 [ 32.207930] SyS_epoll_ctl+0x11d7/0x2190 [ 32.211956] do_fast_syscall_32+0x2f7/0x890 [ 32.216240] entry_SYSENTER_compat+0x74/0x83 [ 32.220610] [ 32.222200] Freed by task 3336: [ 32.225445] save_stack_trace+0x16/0x20 [ 32.229388] save_stack+0x43/0xd0 [ 32.232805] kasan_slab_free+0x72/0xc0 [ 32.236656] kfree+0x103/0x300 [ 32.239810] binder_thread_dec_tmpref+0x1cc/0x240 [ 32.244615] binder_thread_release+0x27d/0x540 [ 32.249158] binder_ioctl+0x9c0/0x11b0 [ 32.253011] compat_SyS_ioctl+0x15f/0x2050 [ 32.257210] do_fast_syscall_32+0x2f7/0x890 [ 32.261494] entry_SYSENTER_compat+0x74/0x83 [ 32.265867] [ 32.267460] The buggy address belongs to the object at ffff8801c85a9680 [ 32.267460] which belongs to the cache kmalloc-512 of size 512 [ 32.280079] The buggy address is located 184 bytes inside of [ 32.280079] 512-byte region [ffff8801c85a9680, ffff8801c85a9880) [ 32.291914] The buggy address belongs to the page: [ 32.296807] page:ffffea0007216a00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 32.306960] flags: 0x8000000000004080(slab|head) [ 32.311676] page dumped because: kasan: bad access detected [ 32.317358] [ 32.318949] Memory state around the buggy address: [ 32.323843] ffff8801c85a9600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.331174] ffff8801c85a9680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.338495] >ffff8801c85a9700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.345824] ^ [ 32.350984] ffff8801c85a9780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.358309] ffff8801c85a9800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.365639] ================================================================== [ 32.372961] Disabling lock debugging due to kernel taint [ 32.378378] Kernel panic - not syncing: panic_on_warn set ... [ 32.378378] [ 32.385705] CPU: 0 PID: 3336 Comm: syzkaller162390 Tainted: G B 4.9.76-g9154940 #20 [ 32.394589] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.403911] ffff8801c87e77c8 ffffffff81d93149 ffffffff84195c17 ffff8801c87e78a0 [ 32.411855] 0000000000000000 ffff8801c85a9738 ffff8801c85a9738 ffff8801c87e7890 [ 32.419808] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 32.427757] Call Trace: [ 32.430311] [] dump_stack+0xc1/0x128 [ 32.435640] [] panic+0x1bc/0x3a8 [ 32.440620] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 32.448812] [] ? add_taint+0x40/0x50 [ 32.454150] [] kasan_end_report+0x50/0x50 [ 32.459913] [] kasan_report+0x167/0x360 [ 32.465504] [] ? __lock_acquire+0x2eff/0x3640 [ 32.471615] [] __asan_report_load8_noabort+0x14/0x20 [ 32.478343] [] __lock_acquire+0x2eff/0x3640 [ 32.484282] [] ? __lock_acquire+0x629/0x3640 [ 32.490306] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.497283] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.504259] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.511237] [] ? mark_held_locks+0xaf/0x100 [ 32.517177] [] ? mutex_lock_nested+0x5e3/0x870 [ 32.523374] [] lock_acquire+0x12e/0x410 [ 32.528960] [] ? remove_wait_queue+0x14/0x40 [ 32.534984] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 32.541269] [] ? remove_wait_queue+0x14/0x40 [ 32.547292] [] remove_wait_queue+0x14/0x40 [ 32.553154] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 32.560130] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 32.567368] [] ? ep_free+0x1b0/0x1b0 [ 32.572699] [] ep_free+0x96/0x1b0 [ 32.577764] [] ? ep_free+0x1b0/0x1b0 [ 32.583092] [] ep_eventpoll_release+0x44/0x60 [ 32.589204] [] __fput+0x28c/0x6e0 [ 32.594281] [] ____fput+0x15/0x20 [ 32.599356] [] task_work_run+0x115/0x190 [ 32.605033] [] do_exit+0x7e7/0x2a40 [ 32.610275] [] ? __pmd_alloc+0x410/0x410 [ 32.616037] [] ? release_task+0x1240/0x1240 [ 32.621974] [] ? __do_page_fault+0x5ec/0xd40 [ 32.627996] [] ? up_read+0x1a/0x40 [ 32.633152] [] ? __do_page_fault+0x3bd/0xd40 [ 32.639173] [] do_group_exit+0x108/0x320 [ 32.644848] [] ? do_group_exit+0x320/0x320 [ 32.650699] [] SyS_exit_group+0x1d/0x20 [ 32.656293] [] do_fast_syscall_32+0x2f7/0x890 [ 32.662405] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.669037] [] entry_SYSENTER_compat+0x74/0x83 [ 32.675662] Dumping ftrace buffer: [ 32.679167] (ftrace buffer empty) [ 32.682849] Kernel Offset: disabled [ 32.686439] Rebooting in 86400 seconds..