[....] Starting enhanced syslogd: rsyslogd[ 11.233051] audit: type=1400 audit(1515683485.701: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.217' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 18.842297] ================================================================== [ 18.843445] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 18.844335] Read of size 8 at addr ffff8801c922e838 by task syzkaller989200/3321 [ 18.845332] [ 18.845562] CPU: 0 PID: 3321 Comm: syzkaller989200 Not tainted 4.9.76-g9154940 #20 [ 18.846570] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 18.847791] ffff8801c9cf7870 ffffffff81d93149 ffffea0007248b80 ffff8801c922e838 [ 18.848916] 0000000000000000 ffff8801c922e838 ffff8801c922e838 ffff8801c9cf78a8 [ 18.850081] ffffffff8153cb43 ffff8801c922e838 0000000000000008 0000000000000000 [ 18.851228] Call Trace: [ 18.851583] [] dump_stack+0xc1/0x128 [ 18.852293] [] print_address_description+0x73/0x280 [ 18.853181] [] kasan_report+0x275/0x360 [ 18.853921] [] ? __lock_acquire+0x2eff/0x3640 [ 18.854771] [] __asan_report_load8_noabort+0x14/0x20 [ 18.855701] [] __lock_acquire+0x2eff/0x3640 [ 18.856507] [] ? __lock_acquire+0x629/0x3640 [ 18.857316] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.858235] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.859156] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 18.860075] [] ? mark_held_locks+0xaf/0x100 [ 18.860863] [] ? mutex_lock_nested+0x5e3/0x870 [ 18.861693] [] lock_acquire+0x12e/0x410 [ 18.862951] [] ? remove_wait_queue+0x14/0x40 [ 18.868979] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 18.875261] [] ? remove_wait_queue+0x14/0x40 [ 18.881297] [] remove_wait_queue+0x14/0x40 [ 18.887149] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 18.894135] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 18.901372] [] ? ep_free+0x1b0/0x1b0 [ 18.906705] [] ep_free+0x96/0x1b0 [ 18.911770] [] ? ep_free+0x1b0/0x1b0 [ 18.917104] [] ep_eventpoll_release+0x44/0x60 [ 18.923214] [] __fput+0x28c/0x6e0 [ 18.928286] [] ____fput+0x15/0x20 [ 18.933356] [] task_work_run+0x115/0x190 [ 18.939034] [] do_exit+0x7e7/0x2a40 [ 18.944274] [] ? __pmd_alloc+0x410/0x410 [ 18.949950] [] ? release_task+0x1240/0x1240 [ 18.955893] [] ? __do_page_fault+0x5ec/0xd40 [ 18.961919] [] ? up_read+0x1a/0x40 [ 18.967077] [] ? __do_page_fault+0x3bd/0xd40 [ 18.973100] [] do_group_exit+0x108/0x320 [ 18.978774] [] ? do_group_exit+0x320/0x320 [ 18.984621] [] SyS_exit_group+0x1d/0x20 [ 18.990210] [] do_fast_syscall_32+0x2f7/0x890 [ 18.996321] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.002952] [] entry_SYSENTER_compat+0x74/0x83 [ 19.009144] [ 19.010739] Allocated by task 3321: [ 19.014332] save_stack_trace+0x16/0x20 [ 19.018271] save_stack+0x43/0xd0 [ 19.021689] kasan_kmalloc+0xad/0xe0 [ 19.025365] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.029912] binder_get_thread+0x15d/0x750 [ 19.034109] binder_poll+0x4a/0x210 [ 19.037704] SyS_epoll_ctl+0x11d7/0x2190 [ 19.041729] do_fast_syscall_32+0x2f7/0x890 [ 19.046015] entry_SYSENTER_compat+0x74/0x83 [ 19.050384] [ 19.051975] Freed by task 3321: [ 19.055223] save_stack_trace+0x16/0x20 [ 19.059160] save_stack+0x43/0xd0 [ 19.062578] kasan_slab_free+0x72/0xc0 [ 19.066429] kfree+0x103/0x300 [ 19.069588] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.074403] binder_thread_release+0x27d/0x540 [ 19.078954] binder_ioctl+0x9c0/0x11b0 [ 19.082807] compat_SyS_ioctl+0x15f/0x2050 [ 19.087004] do_fast_syscall_32+0x2f7/0x890 [ 19.091294] entry_SYSENTER_compat+0x74/0x83 [ 19.095663] [ 19.097258] The buggy address belongs to the object at ffff8801c922e780 [ 19.097258] which belongs to the cache kmalloc-512 of size 512 [ 19.109891] The buggy address is located 184 bytes inside of [ 19.109891] 512-byte region [ffff8801c922e780, ffff8801c922e980) [ 19.121726] The buggy address belongs to the page: [ 19.126621] page:ffffea0007248b80 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.136784] flags: 0x8000000000004080(slab|head) [ 19.141508] page dumped because: kasan: bad access detected [ 19.147181] [ 19.148772] Memory state around the buggy address: [ 19.153670] ffff8801c922e700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.160992] ffff8801c922e780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.168316] >ffff8801c922e800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.175636] ^ [ 19.180792] ffff8801c922e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.188161] ffff8801c922e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.195485] ================================================================== [ 19.202806] Disabling lock debugging due to kernel taint [ 19.208221] Kernel panic - not syncing: panic_on_warn set ... [ 19.208221] [ 19.215551] CPU: 0 PID: 3321 Comm: syzkaller989200 Tainted: G B 4.9.76-g9154940 #20 [ 19.224446] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.233765] ffff8801c9cf77c8 ffffffff81d93149 ffffffff84195c17 ffff8801c9cf78a0 [ 19.241714] 0000000000000000 ffff8801c922e838 ffff8801c922e838 ffff8801c9cf7890 [ 19.249668] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 19.257617] Call Trace: [ 19.260172] [] dump_stack+0xc1/0x128 [ 19.265501] [] panic+0x1bc/0x3a8 [ 19.270486] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 19.278679] [] ? add_taint+0x40/0x50 [ 19.284010] [] kasan_end_report+0x50/0x50 [ 19.289772] [] kasan_report+0x167/0x360 [ 19.295361] [] ? __lock_acquire+0x2eff/0x3640 [ 19.301480] [] __asan_report_load8_noabort+0x14/0x20 [ 19.308198] [] __lock_acquire+0x2eff/0x3640 [ 19.314134] [] ? __lock_acquire+0x629/0x3640 [ 19.320157] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.327135] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.334115] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.341103] [] ? mark_held_locks+0xaf/0x100 [ 19.347050] [] ? mutex_lock_nested+0x5e3/0x870 [ 19.353245] [] lock_acquire+0x12e/0x410 [ 19.358832] [] ? remove_wait_queue+0x14/0x40 [ 19.364853] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.371140] [] ? remove_wait_queue+0x14/0x40 [ 19.377167] [] remove_wait_queue+0x14/0x40 [ 19.383018] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.389995] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.397242] [] ? ep_free+0x1b0/0x1b0 [ 19.402569] [] ep_free+0x96/0x1b0 [ 19.407635] [] ? ep_free+0x1b0/0x1b0 [ 19.412963] [] ep_eventpoll_release+0x44/0x60 [ 19.419077] [] __fput+0x28c/0x6e0 [ 19.424148] [] ____fput+0x15/0x20 [ 19.429217] [] task_work_run+0x115/0x190 [ 19.434897] [] do_exit+0x7e7/0x2a40 [ 19.440137] [] ? __pmd_alloc+0x410/0x410 [ 19.445815] [] ? release_task+0x1240/0x1240 [ 19.451751] [] ? __do_page_fault+0x5ec/0xd40 [ 19.457773] [] ? up_read+0x1a/0x40 [ 19.462927] [] ? __do_page_fault+0x3bd/0xd40 [ 19.468948] [] do_group_exit+0x108/0x320 [ 19.474622] [] ? do_group_exit+0x320/0x320 [ 19.480471] [] SyS_exit_group+0x1d/0x20 [ 19.486063] [] do_fast_syscall_32+0x2f7/0x890 [ 19.492172] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.498803] [] entry_SYSENTER_compat+0x74/0x83 [ 19.505510] Dumping ftrace buffer: [ 19.509016] (ftrace buffer empty) [ 19.512691] Kernel Offset: disabled [ 19.516282] Rebooting in 86400 seconds..