[....] Starting enhanced syslogd: rsyslogd[ 10.521037] audit: type=1400 audit(1515222426.960:4): avc: denied { syslog } for pid=3171 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.61' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.636294] ================================================================== [ 19.637440] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 19.638323] Read of size 8 at addr ffff8801c94925b8 by task syzkaller760212/3320 [ 19.639326] [ 19.639556] CPU: 1 PID: 3320 Comm: syzkaller760212 Not tainted 4.9.75-gbc7ff9b #15 [ 19.640578] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.641806] ffff8801ca037850 ffffffff81d93049 ffffea0007252480 ffff8801c94925b8 [ 19.642942] 0000000000000000 ffff8801c94925b8 ffff8801c94925b8 ffff8801ca037888 [ 19.644094] ffffffff8153ca53 ffff8801c94925b8 0000000000000008 0000000000000000 [ 19.645256] Call Trace: [ 19.645612] [] dump_stack+0xc1/0x128 [ 19.646336] [] print_address_description+0x73/0x280 [ 19.647210] [] kasan_report+0x275/0x360 [ 19.647951] [] ? __lock_acquire+0x2eff/0x3640 [ 19.648758] [] __asan_report_load8_noabort+0x14/0x20 [ 19.649659] [] __lock_acquire+0x2eff/0x3640 [ 19.650498] [] ? __lock_acquire+0x629/0x3640 [ 19.651348] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.652272] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 19.653199] [] ? __lock_is_held+0xa1/0xf0 [ 19.653965] [] lock_acquire+0x12e/0x410 [ 19.654709] [] ? remove_wait_queue+0x14/0x40 [ 19.655567] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 19.656400] [] ? remove_wait_queue+0x14/0x40 [ 19.662431] [] remove_wait_queue+0x14/0x40 [ 19.668281] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 19.675258] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 19.682497] [] ep_remove+0x41/0x290 [ 19.687746] [] eventpoll_release_file+0xc5/0x140 [ 19.694125] [] __fput+0x5a8/0x6e0 [ 19.699190] [] ____fput+0x15/0x20 [ 19.704256] [] task_work_run+0x115/0x190 [ 19.709946] [] do_exit+0x7e7/0x2a40 [ 19.715191] [] ? __pmd_alloc+0x410/0x410 [ 19.720866] [] ? release_task+0x1240/0x1240 [ 19.726806] [] ? __do_page_fault+0x5ec/0xd40 [ 19.732836] [] ? up_read+0x1a/0x40 [ 19.737993] [] ? __do_page_fault+0x3bd/0xd40 [ 19.744015] [] do_group_exit+0x108/0x320 [ 19.749690] [] ? do_group_exit+0x320/0x320 [ 19.755545] [] SyS_exit_group+0x1d/0x20 [ 19.761133] [] do_fast_syscall_32+0x2f7/0x890 [ 19.767244] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 19.773880] [] entry_SYSENTER_compat+0x74/0x83 [ 19.780073] [ 19.781667] Allocated by task 3320: [ 19.785264] save_stack_trace+0x16/0x20 [ 19.789203] save_stack+0x43/0xd0 [ 19.792626] kasan_kmalloc+0xad/0xe0 [ 19.796303] kmem_cache_alloc_trace+0xfb/0x2a0 [ 19.800850] binder_get_thread+0x15d/0x750 [ 19.805048] binder_poll+0x4a/0x210 [ 19.808642] SyS_epoll_ctl+0x11d7/0x2190 [ 19.812674] do_fast_syscall_32+0x2f7/0x890 [ 19.816972] entry_SYSENTER_compat+0x74/0x83 [ 19.821348] [ 19.822946] Freed by task 3320: [ 19.826203] save_stack_trace+0x16/0x20 [ 19.830152] save_stack+0x43/0xd0 [ 19.833581] kasan_slab_free+0x72/0xc0 [ 19.837434] kfree+0x103/0x300 [ 19.840590] binder_thread_dec_tmpref+0x1cc/0x240 [ 19.845396] binder_thread_release+0x27d/0x540 [ 19.849949] binder_ioctl+0x9c0/0x11b0 [ 19.853811] compat_SyS_ioctl+0x15f/0x2050 [ 19.858012] do_fast_syscall_32+0x2f7/0x890 [ 19.862299] entry_SYSENTER_compat+0x74/0x83 [ 19.866668] [ 19.868262] The buggy address belongs to the object at ffff8801c9492500 [ 19.868262] which belongs to the cache kmalloc-512 of size 512 [ 19.880896] The buggy address is located 184 bytes inside of [ 19.880896] 512-byte region [ffff8801c9492500, ffff8801c9492700) [ 19.892744] The buggy address belongs to the page: [ 19.897646] page:ffffea0007252480 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 19.907818] flags: 0x8000000000004080(slab|head) [ 19.912537] page dumped because: kasan: bad access detected [ 19.918209] [ 19.919798] Memory state around the buggy address: [ 19.924691] ffff8801c9492480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.932021] ffff8801c9492500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.939358] >ffff8801c9492580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.946682] ^ [ 19.951838] ffff8801c9492600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.959174] ffff8801c9492680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.966507] ================================================================== [ 19.973836] Disabling lock debugging due to kernel taint [ 19.979261] Kernel panic - not syncing: panic_on_warn set ... [ 19.979261] [ 19.986596] CPU: 1 PID: 3320 Comm: syzkaller760212 Tainted: G B 4.9.75-gbc7ff9b #15 [ 19.995486] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.004815] ffff8801ca0377a8 ffffffff81d93049 ffffffff84195be7 ffff8801ca037880 [ 20.012800] 0000000000000000 ffff8801c94925b8 ffff8801c94925b8 ffff8801ca037870 [ 20.020778] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 20.028752] Call Trace: [ 20.031310] [] dump_stack+0xc1/0x128 [ 20.036645] [] panic+0x1bc/0x3a8 [ 20.041636] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 20.049845] [] ? add_taint+0x40/0x50 [ 20.055186] [] kasan_end_report+0x50/0x50 [ 20.060951] [] kasan_report+0x167/0x360 [ 20.066540] [] ? __lock_acquire+0x2eff/0x3640 [ 20.072648] [] __asan_report_load8_noabort+0x14/0x20 [ 20.079367] [] __lock_acquire+0x2eff/0x3640 [ 20.085305] [] ? __lock_acquire+0x629/0x3640 [ 20.091326] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.098310] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.105294] [] ? __lock_is_held+0xa1/0xf0 [ 20.111066] [] lock_acquire+0x12e/0x410 [ 20.116663] [] ? remove_wait_queue+0x14/0x40 [ 20.122691] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 20.128979] [] ? remove_wait_queue+0x14/0x40 [ 20.135011] [] remove_wait_queue+0x14/0x40 [ 20.140873] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 20.147861] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 20.155107] [] ep_remove+0x41/0x290 [ 20.160359] [] eventpoll_release_file+0xc5/0x140 [ 20.166739] [] __fput+0x5a8/0x6e0 [ 20.171817] [] ____fput+0x15/0x20 [ 20.176885] [] task_work_run+0x115/0x190 [ 20.182559] [] do_exit+0x7e7/0x2a40 [ 20.187813] [] ? __pmd_alloc+0x410/0x410 [ 20.193493] [] ? release_task+0x1240/0x1240 [ 20.199436] [] ? __do_page_fault+0x5ec/0xd40 [ 20.205458] [] ? up_read+0x1a/0x40 [ 20.210611] [] ? __do_page_fault+0x3bd/0xd40 [ 20.216643] [] do_group_exit+0x108/0x320 [ 20.222318] [] ? do_group_exit+0x320/0x320 [ 20.228175] [] SyS_exit_group+0x1d/0x20 [ 20.233767] [] do_fast_syscall_32+0x2f7/0x890 [ 20.239880] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 20.246511] [] entry_SYSENTER_compat+0x74/0x83 [ 20.253174] Dumping ftrace buffer: [ 20.256678] (ftrace buffer empty) [ 20.260351] Kernel Offset: disabled [ 20.263941] Rebooting in 86400 seconds..