[....] Starting enhanced syslogd: rsyslogd[ 10.227196] audit: type=1400 audit(1515850598.620:4): avc: denied { syslog } for pid=3175 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.202' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.784782] ================================================================== [ 25.785822] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 25.786695] Read of size 8 at addr ffff8801c8e0a838 by task syzkaller643708/3331 [ 25.787688] [ 25.787919] CPU: 1 PID: 3331 Comm: syzkaller643708 Not tainted 4.9.76-g8e170a5 #21 [ 25.788941] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.790159] ffff8801cb53f870 ffffffff81d93149 ffffea0007238280 ffff8801c8e0a838 [ 25.791301] 0000000000000000 ffff8801c8e0a838 ffff8801c8e0a838 ffff8801cb53f8a8 [ 25.792423] ffffffff8153cb43 ffff8801c8e0a838 0000000000000008 0000000000000000 [ 25.793552] Call Trace: [ 25.793908] [] dump_stack+0xc1/0x128 [ 25.794618] [] print_address_description+0x73/0x280 [ 25.795495] [] kasan_report+0x275/0x360 [ 25.796237] [] ? __lock_acquire+0x2eff/0x3640 [ 25.797046] [] __asan_report_load8_noabort+0x14/0x20 [ 25.797932] [] __lock_acquire+0x2eff/0x3640 [ 25.798720] [] ? __lock_acquire+0x629/0x3640 [ 25.799517] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.800436] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.802135] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.803105] [] ? mark_held_locks+0xaf/0x100 [ 25.803938] [] ? mutex_lock_nested+0x5e3/0x870 [ 25.804758] [] lock_acquire+0x12e/0x410 [ 25.809603] [] ? remove_wait_queue+0x14/0x40 [ 25.815626] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 25.821907] [] ? remove_wait_queue+0x14/0x40 [ 25.827930] [] remove_wait_queue+0x14/0x40 [ 25.833786] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 25.840763] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 25.848000] [] ? ep_free+0x1b0/0x1b0 [ 25.853326] [] ep_free+0x96/0x1b0 [ 25.858427] [] ? ep_free+0x1b0/0x1b0 [ 25.863757] [] ep_eventpoll_release+0x44/0x60 [ 25.869865] [] __fput+0x28c/0x6e0 [ 25.874930] [] ____fput+0x15/0x20 [ 25.880008] [] task_work_run+0x115/0x190 [ 25.885698] [] do_exit+0x7e7/0x2a40 [ 25.890942] [] ? __pmd_alloc+0x410/0x410 [ 25.896638] [] ? release_task+0x1240/0x1240 [ 25.902608] [] ? __do_page_fault+0x5ec/0xd40 [ 25.908661] [] ? up_read+0x1a/0x40 [ 25.913816] [] ? __do_page_fault+0x3bd/0xd40 [ 25.919840] [] do_group_exit+0x108/0x320 [ 25.925517] [] ? do_group_exit+0x320/0x320 [ 25.931364] [] SyS_exit_group+0x1d/0x20 [ 25.936951] [] do_fast_syscall_32+0x2f7/0x890 [ 25.943064] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.949696] [] entry_SYSENTER_compat+0x74/0x83 [ 25.955898] [ 25.957494] Allocated by task 3331: [ 25.961089] save_stack_trace+0x16/0x20 [ 25.965030] save_stack+0x43/0xd0 [ 25.968446] kasan_kmalloc+0xad/0xe0 [ 25.972122] kmem_cache_alloc_trace+0xfb/0x2a0 [ 25.976671] binder_get_thread+0x15d/0x750 [ 25.980871] binder_poll+0x4a/0x210 [ 25.984464] SyS_epoll_ctl+0x11d7/0x2190 [ 25.988499] do_fast_syscall_32+0x2f7/0x890 [ 25.992790] entry_SYSENTER_compat+0x74/0x83 [ 25.997161] [ 25.998752] Freed by task 3331: [ 26.001994] save_stack_trace+0x16/0x20 [ 26.005939] save_stack+0x43/0xd0 [ 26.009363] kasan_slab_free+0x72/0xc0 [ 26.013213] kfree+0x103/0x300 [ 26.016370] binder_thread_dec_tmpref+0x1cc/0x240 [ 26.021177] binder_thread_release+0x27d/0x540 [ 26.025720] binder_ioctl+0x9c0/0x11b0 [ 26.029571] compat_SyS_ioctl+0x15f/0x2050 [ 26.033774] do_fast_syscall_32+0x2f7/0x890 [ 26.038063] entry_SYSENTER_compat+0x74/0x83 [ 26.042441] [ 26.044036] The buggy address belongs to the object at ffff8801c8e0a780 [ 26.044036] which belongs to the cache kmalloc-512 of size 512 [ 26.056659] The buggy address is located 184 bytes inside of [ 26.056659] 512-byte region [ffff8801c8e0a780, ffff8801c8e0a980) [ 26.068500] The buggy address belongs to the page: [ 26.073400] page:ffffea0007238280 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 26.083558] flags: 0x8000000000004080(slab|head) [ 26.088274] page dumped because: kasan: bad access detected [ 26.093948] [ 26.095541] Memory state around the buggy address: [ 26.100433] ffff8801c8e0a700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.107757] ffff8801c8e0a780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.115082] >ffff8801c8e0a800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.122405] ^ [ 26.127557] ffff8801c8e0a880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.134878] ffff8801c8e0a900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.142203] ================================================================== [ 26.149536] Disabling lock debugging due to kernel taint [ 26.154954] Kernel panic - not syncing: panic_on_warn set ... [ 26.154954] [ 26.162289] CPU: 1 PID: 3331 Comm: syzkaller643708 Tainted: G B 4.9.76-g8e170a5 #21 [ 26.171173] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.180496] ffff8801cb53f7c8 ffffffff81d93149 ffffffff84195c17 ffff8801cb53f8a0 [ 26.188456] 0000000000000000 ffff8801c8e0a838 ffff8801c8e0a838 ffff8801cb53f890 [ 26.196413] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 26.204362] Call Trace: [ 26.206923] [] dump_stack+0xc1/0x128 [ 26.212261] [] panic+0x1bc/0x3a8 [ 26.217244] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 26.225457] [] ? add_taint+0x40/0x50 [ 26.230786] [] kasan_end_report+0x50/0x50 [ 26.236561] [] kasan_report+0x167/0x360 [ 26.242162] [] ? __lock_acquire+0x2eff/0x3640 [ 26.248273] [] __asan_report_load8_noabort+0x14/0x20 [ 26.254992] [] __lock_acquire+0x2eff/0x3640 [ 26.260926] [] ? __lock_acquire+0x629/0x3640 [ 26.266948] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.273925] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.280900] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 26.287882] [] ? mark_held_locks+0xaf/0x100 [ 26.293820] [] ? mutex_lock_nested+0x5e3/0x870 [ 26.300022] [] lock_acquire+0x12e/0x410 [ 26.305612] [] ? remove_wait_queue+0x14/0x40 [ 26.311637] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 26.317919] [] ? remove_wait_queue+0x14/0x40 [ 26.323943] [] remove_wait_queue+0x14/0x40 [ 26.329798] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 26.336776] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 26.344032] [] ? ep_free+0x1b0/0x1b0 [ 26.349361] [] ep_free+0x96/0x1b0 [ 26.354428] [] ? ep_free+0x1b0/0x1b0 [ 26.359756] [] ep_eventpoll_release+0x44/0x60 [ 26.365867] [] __fput+0x28c/0x6e0 [ 26.370934] [] ____fput+0x15/0x20 [ 26.376000] [] task_work_run+0x115/0x190 [ 26.381682] [] do_exit+0x7e7/0x2a40 [ 26.386924] [] ? __pmd_alloc+0x410/0x410 [ 26.392599] [] ? release_task+0x1240/0x1240 [ 26.398543] [] ? __do_page_fault+0x5ec/0xd40 [ 26.404579] [] ? up_read+0x1a/0x40 [ 26.409740] [] ? __do_page_fault+0x3bd/0xd40 [ 26.415777] [] do_group_exit+0x108/0x320 [ 26.421449] [] ? do_group_exit+0x320/0x320 [ 26.427298] [] SyS_exit_group+0x1d/0x20 [ 26.432887] [] do_fast_syscall_32+0x2f7/0x890 [ 26.438995] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 26.445722] [] entry_SYSENTER_compat+0x74/0x83 [ 26.452326] Dumping ftrace buffer: [ 26.455844] (ftrace buffer empty) [ 26.459532] Kernel Offset: disabled [ 26.463134] Rebooting in 86400 seconds..