[....] Starting enhanced syslogd: rsyslogd[ 13.219860] audit: type=1400 audit(1515731347.386:4): avc: denied { syslog } for pid=3177 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.210' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.491739] ================================================================== [ 28.499119] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 28.505755] Read of size 8 at addr ffff8801c9374ab8 by task syzkaller223150/3333 [ 28.513261] [ 28.514872] CPU: 1 PID: 3333 Comm: syzkaller223150 Not tainted 4.9.76-g9154940 #10 [ 28.522550] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.531876] ffff8801c93cf8e0 ffffffff81d93149 ffffea000724dd00 ffff8801c9374ab8 [ 28.539834] 0000000000000000 ffff8801c9374ab8 ffff8801c9374ab8 ffff8801c93cf918 [ 28.547800] ffffffff8153cb43 ffff8801c9374ab8 0000000000000008 0000000000000000 [ 28.555741] Call Trace: [ 28.558296] [] dump_stack+0xc1/0x128 [ 28.563629] [] print_address_description+0x73/0x280 [ 28.570279] [] kasan_report+0x275/0x360 [ 28.575873] [] ? __lock_acquire+0x2eff/0x3640 [ 28.581993] [] __asan_report_load8_noabort+0x14/0x20 [ 28.588748] [] __lock_acquire+0x2eff/0x3640 [ 28.594700] [] ? __lock_acquire+0x629/0x3640 [ 28.600740] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.607727] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.614705] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 28.621683] [] ? mark_held_locks+0xaf/0x100 [ 28.627625] [] ? mutex_lock_nested+0x5e3/0x870 [ 28.633841] [] lock_acquire+0x12e/0x410 [ 28.639450] [] ? remove_wait_queue+0x14/0x40 [ 28.645495] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 28.651798] [] ? remove_wait_queue+0x14/0x40 [ 28.657834] [] remove_wait_queue+0x14/0x40 [ 28.663689] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 28.670670] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 28.677923] [] ? ep_free+0x1b0/0x1b0 [ 28.683275] [] ep_free+0x96/0x1b0 [ 28.688345] [] ? ep_free+0x1b0/0x1b0 [ 28.693691] [] ep_eventpoll_release+0x44/0x60 [ 28.699820] [] __fput+0x28c/0x6e0 [ 28.704892] [] ____fput+0x15/0x20 [ 28.709989] [] task_work_run+0x115/0x190 [ 28.715672] [] do_exit+0x7e7/0x2a40 [ 28.720922] [] ? selinux_file_ioctl+0x355/0x530 [ 28.727208] [] ? release_task+0x1240/0x1240 [ 28.733153] [] ? SyS_epoll_create+0x190/0x190 [ 28.739276] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 28.745941] [] do_group_exit+0x108/0x320 [ 28.751645] [] SyS_exit_group+0x1d/0x20 [ 28.757262] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 28.763821] [ 28.765425] Allocated by task 3333: [ 28.769040] save_stack_trace+0x16/0x20 [ 28.773000] save_stack+0x43/0xd0 [ 28.776431] kasan_kmalloc+0xad/0xe0 [ 28.780112] kmem_cache_alloc_trace+0xfb/0x2a0 [ 28.784668] binder_get_thread+0x15d/0x750 [ 28.788884] binder_poll+0x4a/0x210 [ 28.792494] SyS_epoll_ctl+0x11d7/0x2190 [ 28.796533] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 28.801258] [ 28.802865] Freed by task 3333: [ 28.806126] save_stack_trace+0x16/0x20 [ 28.810081] save_stack+0x43/0xd0 [ 28.813513] kasan_slab_free+0x72/0xc0 [ 28.817386] kfree+0x103/0x300 [ 28.820560] binder_thread_dec_tmpref+0x1cc/0x240 [ 28.825372] binder_thread_release+0x27d/0x540 [ 28.829930] binder_ioctl+0x9c0/0x11b0 [ 28.833802] do_vfs_ioctl+0x1aa/0x1140 [ 28.837677] SyS_ioctl+0x8f/0xc0 [ 28.841011] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 28.845727] [ 28.847323] The buggy address belongs to the object at ffff8801c9374a00 [ 28.847323] which belongs to the cache kmalloc-512 of size 512 [ 28.859971] The buggy address is located 184 bytes inside of [ 28.859971] 512-byte region [ffff8801c9374a00, ffff8801c9374c00) [ 28.871826] The buggy address belongs to the page: [ 28.876732] page:ffffea000724dd00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 28.886900] flags: 0x8000000000004080(slab|head) [ 28.891619] page dumped because: kasan: bad access detected [ 28.897289] [ 28.898881] Memory state around the buggy address: [ 28.903773] ffff8801c9374980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.911106] ffff8801c9374a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.918447] >ffff8801c9374a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.925772] ^ [ 28.930927] ffff8801c9374b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.938249] ffff8801c9374b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.945571] ================================================================== [ 28.952894] Disabling lock debugging due to kernel taint [ 28.958315] Kernel panic - not syncing: panic_on_warn set ... [ 28.958315] [ 28.965651] CPU: 1 PID: 3333 Comm: syzkaller223150 Tainted: G B 4.9.76-g9154940 #10 [ 28.974542] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.983873] ffff8801c93cf838 ffffffff81d93149 ffffffff84195c17 ffff8801c93cf910 [ 28.991849] 0000000000000000 ffff8801c9374ab8 ffff8801c9374ab8 ffff8801c93cf900 [ 28.999795] ffffffff8142e371 0000000041b58ab3 ffffffff84189678 ffffffff8142e1b5 [ 29.007761] Call Trace: [ 29.010319] [] dump_stack+0xc1/0x128 [ 29.015652] [] panic+0x1bc/0x3a8 [ 29.020641] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 29.028837] [] ? add_taint+0x40/0x50 [ 29.034174] [] kasan_end_report+0x50/0x50 [ 29.039971] [] kasan_report+0x167/0x360 [ 29.045580] [] ? __lock_acquire+0x2eff/0x3640 [ 29.051717] [] __asan_report_load8_noabort+0x14/0x20 [ 29.058449] [] __lock_acquire+0x2eff/0x3640 [ 29.064414] [] ? __lock_acquire+0x629/0x3640 [ 29.070455] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.077456] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.084459] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 29.091473] [] ? mark_held_locks+0xaf/0x100 [ 29.097443] [] ? mutex_lock_nested+0x5e3/0x870 [ 29.103668] [] lock_acquire+0x12e/0x410 [ 29.109258] [] ? remove_wait_queue+0x14/0x40 [ 29.115298] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 29.121580] [] ? remove_wait_queue+0x14/0x40 [ 29.127616] [] remove_wait_queue+0x14/0x40 [ 29.133486] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 29.140483] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 29.147725] [] ? ep_free+0x1b0/0x1b0 [ 29.153061] [] ep_free+0x96/0x1b0 [ 29.158131] [] ? ep_free+0x1b0/0x1b0 [ 29.163464] [] ep_eventpoll_release+0x44/0x60 [ 29.169576] [] __fput+0x28c/0x6e0 [ 29.174656] [] ____fput+0x15/0x20 [ 29.179723] [] task_work_run+0x115/0x190 [ 29.185399] [] do_exit+0x7e7/0x2a40 [ 29.190643] [] ? selinux_file_ioctl+0x355/0x530 [ 29.196929] [] ? release_task+0x1240/0x1240 [ 29.202873] [] ? SyS_epoll_create+0x190/0x190 [ 29.208990] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 29.215625] [] do_group_exit+0x108/0x320 [ 29.221302] [] SyS_exit_group+0x1d/0x20 [ 29.226902] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 29.233904] Dumping ftrace buffer: [ 29.237414] (ftrace buffer empty) [ 29.241089] Kernel Offset: disabled [ 29.244680] Rebooting in 86400 seconds..