INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?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 'ci-upstream-kasan-gce-5,10.128.0.7' (ECDSA) to the list of known hosts. 2017/08/22 09:16:28 parsed 1 programs 2017/08/22 09:16:28 executed programs: 0 syzkaller login: [ 43.325389] ================================================================== [ 43.326722] BUG: KASAN: use-after-free in free_ldt_struct.part.2+0x10a/0x150 [ 43.327822] Read of size 4 at addr ffff8801c6205408 by task syz-executor0/4028 [ 43.329147] [ 43.329446] CPU: 0 PID: 4028 Comm: syz-executor0 Not tainted 4.13.0-rc6+ #45 [ 43.330575] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.332466] Call Trace: [ 43.332842] dump_stack+0x194/0x257 [ 43.333423] ? arch_local_irq_restore+0x53/0x53 [ 43.334266] ? show_regs_print_info+0x65/0x65 [ 43.335192] ? free_ldt_struct.part.2+0x10a/0x150 [ 43.335895] print_address_description+0x73/0x250 [ 43.336597] ? free_ldt_struct.part.2+0x10a/0x150 [ 43.337371] kasan_report+0x24e/0x340 [ 43.337967] __asan_report_load4_noabort+0x14/0x20 [ 43.339029] free_ldt_struct.part.2+0x10a/0x150 [ 43.339923] ? rcu_pm_notify+0xc0/0xc0 [ 43.340564] destroy_context_ldt+0x60/0x80 [ 43.341332] __mmdrop+0xe9/0x530 [ 43.341927] ? sighand_ctor+0x50/0x50 [ 43.342567] ? trace_hardirqs_on+0xd/0x10 [ 43.343150] ? percpu_counter_add_batch+0xce/0x130 [ 43.344019] ? free_modinfo_version+0x70/0x70 [ 43.344722] ? __khugepaged_exit+0x43d/0x650 [ 43.345567] ? SyS_munmap+0x30/0x30 [ 43.349189] ? ___might_sleep+0x1/0x470 [ 43.353176] ? __might_sleep+0x95/0x190 [ 43.357149] mmput+0x541/0x6e0 [ 43.360357] ? get_task_exe_file+0xc0/0xc0 [ 43.364591] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 43.369425] ? do_exit+0x979/0x1b10 [ 43.373043] ? lock_downgrade+0x990/0x990 [ 43.377191] ? do_raw_spin_trylock+0x190/0x190 [ 43.381784] ? down_read+0x96/0x150 [ 43.385400] ? do_exit+0x49c/0x1b10 [ 43.389030] ? __down_interruptible+0x6a0/0x6a0 [ 43.393718] ? trace_hardirqs_on+0xd/0x10 [ 43.397852] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.402351] do_exit+0x989/0x1b10 [ 43.405799] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.411003] ? mm_update_next_owner+0x930/0x930 [ 43.415685] ? __cleanup_sighand+0x40/0x40 [ 43.419923] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 43.425143] ? perf_trace_lock+0xf1/0x860 [ 43.429283] ? check_noncircular+0x20/0x20 [ 43.433513] ? check_noncircular+0x20/0x20 [ 43.437737] ? check_noncircular+0x20/0x20 [ 43.442005] ? find_held_lock+0x35/0x1d0 [ 43.446075] ? get_signal+0x855/0x17e0 [ 43.449953] ? lock_downgrade+0x990/0x990 [ 43.454112] do_group_exit+0x149/0x400 [ 43.457994] ? __lock_is_held+0xb6/0x140 [ 43.462043] ? SyS_exit+0x30/0x30 [ 43.465495] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.469989] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.475007] get_signal+0x7e8/0x17e0 [ 43.478772] ? ptrace_notify+0x130/0x130 [ 43.482835] ? preempt_notifier_dec+0x20/0x20 [ 43.487346] ? __schedule+0x8f0/0x2070 [ 43.491250] do_signal+0x94/0x1ee0 [ 43.494817] ? _do_fork+0x1ef/0xfb0 [ 43.498437] ? _do_fork+0x2dc/0xfb0 [ 43.502068] ? setup_sigcontext+0x7d0/0x7d0 [ 43.506381] ? fork_idle+0x2d0/0x2d0 [ 43.510106] ? __perf_event_task_sched_in+0x219/0xa10 [ 43.515296] ? schedule+0x108/0x440 [ 43.518916] ? __schedule+0x2070/0x2070 [ 43.522886] ? find_held_lock+0x35/0x1d0 [ 43.526947] ? exit_to_usermode_loop+0x98/0x300 [ 43.531618] exit_to_usermode_loop+0x224/0x300 [ 43.536215] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 43.541762] do_syscall_64+0x5d4/0x800 [ 43.545645] ? _raw_spin_unlock_irq+0x56/0x70 [ 43.550127] ? syscall_return_slowpath+0x450/0x450 [ 43.555046] ? syscall_return_slowpath+0x22f/0x450 [ 43.559970] ? prepare_exit_to_usermode+0x220/0x220 [ 43.564970] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 43.569829] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 43.574643] ? sys_vfork+0x30/0x30 [ 43.578155] entry_SYSCALL64_slow_path+0x25/0x25 [ 43.582881] RIP: 0033:0x4512e9 [ 43.586043] RSP: 002b:00007f7063002c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 43.593720] RAX: fffffffffffffdff RBX: 00000000007180a8 RCX: 00000000004512e9 [ 43.600957] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 43.608194] RBP: 00000000000003b0 R08: 0000000020a8a000 R09: 0000000000000000 [ 43.615434] R10: 0000000020117ffc R11: 0000000000000216 R12: 00000000004b65e0 [ 43.622672] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 43.629928] [ 43.631534] Allocated by task 4008: [ 43.635131] save_stack_trace+0x16/0x20 [ 43.639075] save_stack+0x43/0xd0 [ 43.642495] kasan_kmalloc+0xad/0xe0 [ 43.646176] kmem_cache_alloc_trace+0x12f/0x740 [ 43.650813] alloc_ldt_struct+0x52/0x140 [ 43.654842] write_ldt+0x7b4/0xac0 [ 43.658348] sys_modify_ldt+0x1ef/0x240 [ 43.662291] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.667024] [ 43.668624] Freed by task 4028: [ 43.671870] save_stack_trace+0x16/0x20 [ 43.675813] save_stack+0x43/0xd0 [ 43.679233] kasan_slab_free+0x71/0xc0 [ 43.683086] kfree+0xca/0x250 [ 43.686159] free_ldt_struct.part.2+0xdd/0x150 [ 43.690712] destroy_context_ldt+0x60/0x80 [ 43.694928] __mmdrop+0xe9/0x530 [ 43.698261] mmput+0x541/0x6e0 [ 43.701421] copy_process.part.34+0x2315/0x4bd0 [ 43.706056] _do_fork+0x1ef/0xfb0 [ 43.709479] SyS_clone+0x37/0x50 [ 43.712812] do_syscall_64+0x26c/0x800 [ 43.716667] return_from_SYSCALL_64+0x0/0x7a [ 43.721052] [ 43.722666] The buggy address belongs to the object at ffff8801c6205400 [ 43.722666] which belongs to the cache kmalloc-32 of size 32 [ 43.735124] The buggy address is located 8 bytes inside of [ 43.735124] 32-byte region [ffff8801c6205400, ffff8801c6205420) [ 43.746712] The buggy address belongs to the page: [ 43.751610] page:ffffea0007188140 count:1 mapcount:0 mapping:ffff8801c6205000 index:0xffff8801c6205fc1 [ 43.761039] flags: 0x200000000000100(slab) [ 43.765252] raw: 0200000000000100 ffff8801c6205000 ffff8801c6205fc1 000000010000003f [ 43.773100] raw: ffffea0007187b60 ffffea0007185ee0 ffff8801dac001c0 0000000000000000 [ 43.780945] page dumped because: kasan: bad access detected [ 43.786619] [ 43.788212] Memory state around the buggy address: [ 43.793109] ffff8801c6205300: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 43.800437] ffff8801c6205380: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc [ 43.807776] >ffff8801c6205400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 43.815109] ^ [ 43.818719] ffff8801c6205480: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc [ 43.826052] ffff8801c6205500: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc [ 43.833378] ================================================================== [ 43.840702] Disabling lock debugging due to kernel taint [ 43.846227] Kernel panic - not syncing: panic_on_warn set ... [ 43.846227] [ 43.853575] CPU: 0 PID: 4028 Comm: syz-executor0 Tainted: G B 4.13.0-rc6+ #45 [ 43.861950] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.871273] Call Trace: [ 43.873845] dump_stack+0x194/0x257 [ 43.877441] ? arch_local_irq_restore+0x53/0x53 [ 43.882078] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.886805] ? free_ldt_struct.part.2+0x30/0x150 [ 43.891543] panic+0x1e4/0x417 [ 43.894711] ? __warn+0x1d9/0x1d9 [ 43.898147] ? free_ldt_struct.part.2+0x10a/0x150 [ 43.902958] kasan_end_report+0x50/0x50 [ 43.906899] kasan_report+0x137/0x340 [ 43.910681] __asan_report_load4_noabort+0x14/0x20 [ 43.915576] free_ldt_struct.part.2+0x10a/0x150 [ 43.920213] ? rcu_pm_notify+0xc0/0xc0 [ 43.924069] destroy_context_ldt+0x60/0x80 [ 43.928274] __mmdrop+0xe9/0x530 [ 43.931618] ? sighand_ctor+0x50/0x50 [ 43.935397] ? trace_hardirqs_on+0xd/0x10 [ 43.939518] ? percpu_counter_add_batch+0xce/0x130 [ 43.944421] ? free_modinfo_version+0x70/0x70 [ 43.948920] ? __khugepaged_exit+0x43d/0x650 [ 43.953300] ? SyS_munmap+0x30/0x30 [ 43.956898] ? ___might_sleep+0x1/0x470 [ 43.960844] ? __might_sleep+0x95/0x190 [ 43.964789] mmput+0x541/0x6e0 [ 43.967958] ? get_task_exe_file+0xc0/0xc0 [ 43.972164] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 43.976972] ? do_exit+0x979/0x1b10 [ 43.980567] ? lock_downgrade+0x990/0x990 [ 43.984684] ? do_raw_spin_trylock+0x190/0x190 [ 43.989238] ? down_read+0x96/0x150 [ 43.992831] ? do_exit+0x49c/0x1b10 [ 43.996425] ? __down_interruptible+0x6a0/0x6a0 [ 44.001061] ? trace_hardirqs_on+0xd/0x10 [ 44.005177] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.009642] do_exit+0x989/0x1b10 [ 44.013064] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 44.018228] ? mm_update_next_owner+0x930/0x930 [ 44.022869] ? __cleanup_sighand+0x40/0x40 [ 44.027074] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 44.032244] ? perf_trace_lock+0xf1/0x860 [ 44.036367] ? check_noncircular+0x20/0x20 [ 44.040583] ? check_noncircular+0x20/0x20 [ 44.044785] ? check_noncircular+0x20/0x20 [ 44.049001] ? find_held_lock+0x35/0x1d0 [ 44.053045] ? get_signal+0x855/0x17e0 [ 44.056900] ? lock_downgrade+0x990/0x990 [ 44.061029] do_group_exit+0x149/0x400 [ 44.064900] ? __lock_is_held+0xb6/0x140 [ 44.068940] ? SyS_exit+0x30/0x30 [ 44.072361] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.076825] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.081913] get_signal+0x7e8/0x17e0 [ 44.085613] ? ptrace_notify+0x130/0x130 [ 44.089645] ? preempt_notifier_dec+0x20/0x20 [ 44.094116] ? __schedule+0x8f0/0x2070 [ 44.097978] do_signal+0x94/0x1ee0 [ 44.101489] ? _do_fork+0x1ef/0xfb0 [ 44.105082] ? _do_fork+0x2dc/0xfb0 [ 44.108679] ? setup_sigcontext+0x7d0/0x7d0 [ 44.112968] ? fork_idle+0x2d0/0x2d0 [ 44.116655] ? __perf_event_task_sched_in+0x219/0xa10 [ 44.121815] ? schedule+0x108/0x440 [ 44.125412] ? __schedule+0x2070/0x2070 [ 44.129353] ? find_held_lock+0x35/0x1d0 [ 44.133383] ? exit_to_usermode_loop+0x98/0x300 [ 44.138031] exit_to_usermode_loop+0x224/0x300 [ 44.142593] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 44.148102] do_syscall_64+0x5d4/0x800 [ 44.151957] ? _raw_spin_unlock_irq+0x56/0x70 [ 44.156420] ? syscall_return_slowpath+0x450/0x450 [ 44.161317] ? syscall_return_slowpath+0x22f/0x450 [ 44.166214] ? prepare_exit_to_usermode+0x220/0x220 [ 44.171196] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 44.176012] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.180831] ? sys_vfork+0x30/0x30 [ 44.184339] entry_SYSCALL64_slow_path+0x25/0x25 [ 44.189060] RIP: 0033:0x4512e9 [ 44.192217] RSP: 002b:00007f7063002c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 44.199889] RAX: fffffffffffffdff RBX: 00000000007180a8 RCX: 00000000004512e9 [ 44.207126] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 44.214361] RBP: 00000000000003b0 R08: 0000000020a8a000 R09: 0000000000000000 [ 44.221597] R10: 0000000020117ffc R11: 0000000000000216 R12: 00000000004b65e0 [ 44.228833] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 44.236423] Dumping ftrace buffer: [ 44.239932] (ftrace buffer empty) [ 44.243608] Kernel Offset: disabled [ 44.247206] Rebooting in 86400 seconds..