[....] Starting enhanced syslogd: rsyslogd[ 10.512697] audit: type=1400 audit(1515309979.236:4): avc: denied { syslog } for pid=3172 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 OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.25' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 31.705930] ================================================================== [ 31.707027] BUG: KASAN: use-after-free in __lock_acquire+0x2eff/0x3640 [ 31.707930] Read of size 8 at addr ffff8801c9603c38 by task syzkaller261955/3336 [ 31.708987] [ 31.709218] CPU: 1 PID: 3336 Comm: syzkaller261955 Not tainted 4.9.75-g5f5e5d4 #7 [ 31.710213] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.711451] ffff8801c8a878e0 ffffffff81d93049 ffffea0007258080 ffff8801c9603c38 [ 31.712580] 0000000000000000 ffff8801c9603c38 ffff8801c9603c38 ffff8801c8a87918 [ 31.713709] ffffffff8153ca53 ffff8801c9603c38 0000000000000008 0000000000000000 [ 31.714867] Call Trace: [ 31.715241] [] dump_stack+0xc1/0x128 [ 31.715952] [] print_address_description+0x73/0x280 [ 31.716826] [] kasan_report+0x275/0x360 [ 31.717580] [] ? __lock_acquire+0x2eff/0x3640 [ 31.718389] [] __asan_report_load8_noabort+0x14/0x20 [ 31.719289] [] __lock_acquire+0x2eff/0x3640 [ 31.720076] [] ? __lock_acquire+0x629/0x3640 [ 31.720874] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 31.721796] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 31.722790] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 31.723711] [] ? mark_held_locks+0xaf/0x100 [ 31.724499] [] ? mutex_lock_nested+0x5e3/0x870 [ 31.725319] [] lock_acquire+0x12e/0x410 [ 31.726063] [] ? remove_wait_queue+0x14/0x40 [ 31.732091] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 31.738375] [] ? remove_wait_queue+0x14/0x40 [ 31.744400] [] remove_wait_queue+0x14/0x40 [ 31.750266] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 31.757246] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 31.764486] [] ? ep_free+0x1b0/0x1b0 [ 31.769814] [] ep_free+0x96/0x1b0 [ 31.774889] [] ? ep_free+0x1b0/0x1b0 [ 31.780231] [] ep_eventpoll_release+0x44/0x60 [ 31.786343] [] __fput+0x28c/0x6e0 [ 31.791429] [] ____fput+0x15/0x20 [ 31.796499] [] task_work_run+0x115/0x190 [ 31.802176] [] do_exit+0x7e7/0x2a40 [ 31.807423] [] ? selinux_file_ioctl+0x355/0x530 [ 31.813707] [] ? release_task+0x1240/0x1240 [ 31.819645] [] ? SyS_epoll_create+0x190/0x190 [ 31.825757] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 31.832392] [] do_group_exit+0x108/0x320 [ 31.838070] [] SyS_exit_group+0x1d/0x20 [ 31.843661] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 31.850209] [ 31.851810] Allocated by task 3336: [ 31.855404] save_stack_trace+0x16/0x20 [ 31.859345] save_stack+0x43/0xd0 [ 31.862760] kasan_kmalloc+0xad/0xe0 [ 31.866438] kmem_cache_alloc_trace+0xfb/0x2a0 [ 31.870985] binder_get_thread+0x15d/0x750 [ 31.875183] binder_poll+0x4a/0x210 [ 31.878773] SyS_epoll_ctl+0x11d7/0x2190 [ 31.882798] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 31.887518] [ 31.889114] Freed by task 3336: [ 31.892357] save_stack_trace+0x16/0x20 [ 31.896312] save_stack+0x43/0xd0 [ 31.899728] kasan_slab_free+0x72/0xc0 [ 31.903579] kfree+0x103/0x300 [ 31.906735] binder_thread_dec_tmpref+0x1cc/0x240 [ 31.911541] binder_thread_release+0x27d/0x540 [ 31.916086] binder_ioctl+0x9c0/0x11b0 [ 31.919937] do_vfs_ioctl+0x1aa/0x1140 [ 31.923788] SyS_ioctl+0x8f/0xc0 [ 31.927120] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 31.931838] [ 31.933433] The buggy address belongs to the object at ffff8801c9603b80 [ 31.933433] which belongs to the cache kmalloc-512 of size 512 [ 31.946054] The buggy address is located 184 bytes inside of [ 31.946054] 512-byte region [ffff8801c9603b80, ffff8801c9603d80) [ 31.957890] The buggy address belongs to the page: [ 31.962797] page:ffffea0007258080 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 31.972960] flags: 0x8000000000004080(slab|head) [ 31.977677] page dumped because: kasan: bad access detected [ 31.983351] [ 31.984942] Memory state around the buggy address: [ 31.989843] ffff8801c9603b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.997175] ffff8801c9603b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.004501] >ffff8801c9603c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.011824] ^ [ 32.016983] ffff8801c9603c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.024308] ffff8801c9603d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.031631] ================================================================== [ 32.038960] Disabling lock debugging due to kernel taint [ 32.044376] Kernel panic - not syncing: panic_on_warn set ... [ 32.044376] [ 32.051702] CPU: 1 PID: 3336 Comm: syzkaller261955 Tainted: G B 4.9.75-g5f5e5d4 #7 [ 32.060500] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.069823] ffff8801c8a87838 ffffffff81d93049 ffffffff84195be7 ffff8801c8a87910 [ 32.077781] 0000000000000000 ffff8801c9603c38 ffff8801c9603c38 ffff8801c8a87900 [ 32.085741] ffffffff8142e281 0000000041b58ab3 ffffffff84189648 ffffffff8142e0c5 [ 32.093692] Call Trace: [ 32.096250] [] dump_stack+0xc1/0x128 [ 32.101579] [] panic+0x1bc/0x3a8 [ 32.106561] [] ? percpu_up_read_preempt_enable.constprop.53+0xd7/0xd7 [ 32.114757] [] ? add_taint+0x40/0x50 [ 32.120093] [] kasan_end_report+0x50/0x50 [ 32.125857] [] kasan_report+0x167/0x360 [ 32.131447] [] ? __lock_acquire+0x2eff/0x3640 [ 32.137557] [] __asan_report_load8_noabort+0x14/0x20 [ 32.144274] [] __lock_acquire+0x2eff/0x3640 [ 32.150209] [] ? __lock_acquire+0x629/0x3640 [ 32.156247] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.163234] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.170213] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 32.177206] [] ? mark_held_locks+0xaf/0x100 [ 32.183148] [] ? mutex_lock_nested+0x5e3/0x870 [ 32.189352] [] lock_acquire+0x12e/0x410 [ 32.194959] [] ? remove_wait_queue+0x14/0x40 [ 32.200983] [] _raw_spin_lock_irqsave+0x4e/0x70 [ 32.207275] [] ? remove_wait_queue+0x14/0x40 [ 32.213298] [] remove_wait_queue+0x14/0x40 [ 32.219154] [] ep_unregister_pollwait.isra.6+0xaf/0x240 [ 32.226133] [] ? ep_unregister_pollwait.isra.6+0x12a/0x240 [ 32.233371] [] ? ep_free+0x1b0/0x1b0 [ 32.238698] [] ep_free+0x96/0x1b0 [ 32.243766] [] ? ep_free+0x1b0/0x1b0 [ 32.249095] [] ep_eventpoll_release+0x44/0x60 [ 32.255206] [] __fput+0x28c/0x6e0 [ 32.260274] [] ____fput+0x15/0x20 [ 32.265344] [] task_work_run+0x115/0x190 [ 32.271029] [] do_exit+0x7e7/0x2a40 [ 32.276272] [] ? selinux_file_ioctl+0x355/0x530 [ 32.282555] [] ? release_task+0x1240/0x1240 [ 32.288492] [] ? SyS_epoll_create+0x190/0x190 [ 32.294605] [] ? entry_SYSCALL_64_fastpath+0x5/0xe2 [ 32.301236] [] do_group_exit+0x108/0x320 [ 32.306917] [] SyS_exit_group+0x1d/0x20 [ 32.312510] [] entry_SYSCALL_64_fastpath+0x23/0xe2 [ 32.319093] Dumping ftrace buffer: [ 32.322609] (ftrace buffer empty) [ 32.326287] Kernel Offset: disabled [ 32.329878] Rebooting in 86400 seconds..