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-7,10.128.0.25' (ECDSA) to the list of known hosts. 2017/08/21 05:01:40 parsed 1 programs 2017/08/21 05:01:40 executed programs: 0 syzkaller login: [ 53.120626] ================================================================== [ 53.128082] BUG: KASAN: use-after-free in free_ldt_struct.part.2+0x10a/0x150 [ 53.135258] Read of size 4 at addr ffff8801c5410908 by task syz-executor1/4128 [ 53.142610] [ 53.144229] CPU: 0 PID: 4128 Comm: syz-executor1 Not tainted 4.13.0-rc5+ #43 [ 53.151403] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 53.160751] Call Trace: [ 53.163329] dump_stack+0x194/0x257 [ 53.166957] ? arch_local_irq_restore+0x53/0x53 [ 53.171619] ? show_regs_print_info+0x65/0x65 [ 53.176122] ? free_ldt_struct.part.2+0x10a/0x150 [ 53.180960] print_address_description+0x73/0x250 [ 53.185802] ? free_ldt_struct.part.2+0x10a/0x150 [ 53.190643] kasan_report+0x24e/0x340 [ 53.194450] __asan_report_load4_noabort+0x14/0x20 [ 53.199375] free_ldt_struct.part.2+0x10a/0x150 [ 53.204037] ? rcu_pm_notify+0xc0/0xc0 [ 53.207921] destroy_context_ldt+0x60/0x80 [ 53.212156] __mmdrop+0xe9/0x530 [ 53.215521] ? sighand_ctor+0x50/0x50 [ 53.219313] ? trace_hardirqs_on+0xd/0x10 [ 53.223462] ? percpu_counter_add_batch+0xce/0x130 [ 53.228395] ? free_modinfo_version+0x70/0x70 [ 53.232883] ? __khugepaged_exit+0x43d/0x650 [ 53.237284] ? SyS_munmap+0x30/0x30 [ 53.240913] ? ___might_sleep+0x1/0x470 [ 53.244903] ? __might_sleep+0x95/0x190 [ 53.248878] mmput+0x541/0x6e0 [ 53.252072] ? get_task_exe_file+0xc0/0xc0 [ 53.256314] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 53.261148] ? do_exit+0x979/0x1b10 [ 53.264770] ? lock_downgrade+0x990/0x990 [ 53.268923] ? do_raw_spin_trylock+0x190/0x190 [ 53.273507] ? down_read+0x96/0x150 [ 53.277125] ? do_exit+0x49c/0x1b10 [ 53.280746] ? __down_interruptible+0x6a0/0x6a0 [ 53.285408] ? trace_hardirqs_on+0xd/0x10 [ 53.289552] ? _raw_spin_unlock_irq+0x27/0x70 [ 53.294055] do_exit+0x989/0x1b10 [ 53.297506] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 53.302720] ? mm_update_next_owner+0x930/0x930 [ 53.307405] ? __cleanup_sighand+0x40/0x40 [ 53.311692] ? perf_trace_lock+0xf1/0x860 [ 53.315851] ? check_noncircular+0x20/0x20 [ 53.320095] ? find_held_lock+0x35/0x1d0 [ 53.324138] ? get_signal+0x855/0x17e0 [ 53.328001] ? lock_downgrade+0x990/0x990 [ 53.332148] do_group_exit+0x149/0x400 [ 53.336012] ? __lock_is_held+0xb6/0x140 [ 53.340056] ? SyS_exit+0x30/0x30 [ 53.343484] ? _raw_spin_unlock_irq+0x27/0x70 [ 53.348221] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.353226] get_signal+0x7e8/0x17e0 [ 53.356958] ? ptrace_notify+0x130/0x130 [ 53.361048] do_signal+0x94/0x1ee0 [ 53.364581] ? _do_fork+0x1ef/0xfb0 [ 53.368179] ? _do_fork+0x2dc/0xfb0 [ 53.371787] ? setup_sigcontext+0x7d0/0x7d0 [ 53.376094] ? fork_idle+0x2d0/0x2d0 [ 53.379799] ? __perf_event_task_sched_in+0x219/0xa10 [ 53.384972] ? find_held_lock+0x35/0x1d0 [ 53.389012] ? exit_to_usermode_loop+0x98/0x300 [ 53.393671] exit_to_usermode_loop+0x224/0x300 [ 53.398233] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 53.403741] ? do_raw_spin_trylock+0x190/0x190 [ 53.408306] do_syscall_64+0x5d4/0x800 [ 53.412174] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.417171] ? syscall_return_slowpath+0x450/0x450 [ 53.422074] ? syscall_return_slowpath+0x22f/0x450 [ 53.426979] ? prepare_exit_to_usermode+0x220/0x220 [ 53.431969] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 53.436788] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 53.441613] ? sys_vfork+0x30/0x30 [ 53.445131] entry_SYSCALL64_slow_path+0x25/0x25 [ 53.449856] RIP: 0033:0x4512e9 [ 53.453021] RSP: 002b:00007f3abcc1fc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 53.460708] RAX: fffffffffffffdff RBX: 00000000007180a8 RCX: 00000000004512e9 [ 53.467950] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 53.475199] RBP: 00000000000003b0 R08: 0000000020a8a000 R09: 0000000000000000 [ 53.482440] R10: 0000000020117ffc R11: 0000000000000216 R12: 00000000004b65e0 [ 53.489685] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 53.496946] [ 53.498547] Allocated by task 4111: [ 53.502148] save_stack_trace+0x16/0x20 [ 53.506092] save_stack+0x43/0xd0 [ 53.509515] kasan_kmalloc+0xad/0xe0 [ 53.513200] kmem_cache_alloc_trace+0x12f/0x740 [ 53.517844] alloc_ldt_struct+0x52/0x140 [ 53.521873] write_ldt+0x7b4/0xac0 [ 53.525382] sys_modify_ldt+0x1ef/0x240 [ 53.529333] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 53.534062] [ 53.535660] Freed by task 4128: [ 53.538913] save_stack_trace+0x16/0x20 [ 53.542859] save_stack+0x43/0xd0 [ 53.546282] kasan_slab_free+0x71/0xc0 [ 53.550147] kfree+0xca/0x250 [ 53.553223] free_ldt_struct.part.2+0xdd/0x150 [ 53.557774] destroy_context_ldt+0x60/0x80 [ 53.561994] __mmdrop+0xe9/0x530 [ 53.565344] mmput+0x541/0x6e0 [ 53.568528] copy_process.part.34+0x2315/0x4bd0 [ 53.573169] _do_fork+0x1ef/0xfb0 [ 53.576593] SyS_clone+0x37/0x50 [ 53.579929] do_syscall_64+0x26c/0x800 [ 53.583789] return_from_SYSCALL_64+0x0/0x7a [ 53.588162] [ 53.589763] The buggy address belongs to the object at ffff8801c5410900 [ 53.589763] which belongs to the cache kmalloc-32 of size 32 [ 53.602236] The buggy address is located 8 bytes inside of [ 53.602236] 32-byte region [ffff8801c5410900, ffff8801c5410920) [ 53.613828] The buggy address belongs to the page: [ 53.618727] page:ffffea0007150400 count:1 mapcount:0 mapping:ffff8801c5410000 index:0xffff8801c5410fc1 [ 53.628141] flags: 0x200000000000100(slab) [ 53.632345] raw: 0200000000000100 ffff8801c5410000 ffff8801c5410fc1 000000010000003f [ 53.640194] raw: ffffea00071675e0 ffffea0007163960 ffff8801dac001c0 0000000000000000 [ 53.648045] page dumped because: kasan: bad access detected [ 53.653729] [ 53.655324] Memory state around the buggy address: [ 53.660222] ffff8801c5410800: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 53.667550] ffff8801c5410880: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 53.674876] >ffff8801c5410900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 53.682202] ^ [ 53.685809] ffff8801c5410980: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 53.693135] ffff8801c5410a00: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc [ 53.700469] ================================================================== [ 53.707794] Disabling lock debugging due to kernel taint [ 53.713385] Kernel panic - not syncing: panic_on_warn set ... [ 53.713385] [ 53.720741] CPU: 0 PID: 4128 Comm: syz-executor1 Tainted: G B 4.13.0-rc5+ #43 [ 53.729118] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 53.738455] Call Trace: [ 53.741017] dump_stack+0x194/0x257 [ 53.744623] ? arch_local_irq_restore+0x53/0x53 [ 53.749283] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 53.754016] ? free_ldt_struct.part.2+0x30/0x150 [ 53.758747] panic+0x1e4/0x417 [ 53.761906] ? __warn+0x1d9/0x1d9 [ 53.765345] ? free_ldt_struct.part.2+0x10a/0x150 [ 53.770165] kasan_end_report+0x50/0x50 [ 53.774109] kasan_report+0x137/0x340 [ 53.777895] __asan_report_load4_noabort+0x14/0x20 [ 53.782803] free_ldt_struct.part.2+0x10a/0x150 [ 53.787442] ? rcu_pm_notify+0xc0/0xc0 [ 53.791297] destroy_context_ldt+0x60/0x80 [ 53.795501] __mmdrop+0xe9/0x530 [ 53.798838] ? sighand_ctor+0x50/0x50 [ 53.802606] ? trace_hardirqs_on+0xd/0x10 [ 53.806728] ? percpu_counter_add_batch+0xce/0x130 [ 53.811631] ? free_modinfo_version+0x70/0x70 [ 53.816103] ? __khugepaged_exit+0x43d/0x650 [ 53.820480] ? SyS_munmap+0x30/0x30 [ 53.824077] ? ___might_sleep+0x1/0x470 [ 53.828034] ? __might_sleep+0x95/0x190 [ 53.831982] mmput+0x541/0x6e0 [ 53.835153] ? get_task_exe_file+0xc0/0xc0 [ 53.839359] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 53.844166] ? do_exit+0x979/0x1b10 [ 53.847762] ? lock_downgrade+0x990/0x990 [ 53.851889] ? do_raw_spin_trylock+0x190/0x190 [ 53.856441] ? down_read+0x96/0x150 [ 53.860039] ? do_exit+0x49c/0x1b10 [ 53.863635] ? __down_interruptible+0x6a0/0x6a0 [ 53.868273] ? trace_hardirqs_on+0xd/0x10 [ 53.872386] ? _raw_spin_unlock_irq+0x27/0x70 [ 53.876854] do_exit+0x989/0x1b10 [ 53.880285] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 53.885450] ? mm_update_next_owner+0x930/0x930 [ 53.890105] ? __cleanup_sighand+0x40/0x40 [ 53.894325] ? perf_trace_lock+0xf1/0x860 [ 53.898449] ? check_noncircular+0x20/0x20 [ 53.902665] ? find_held_lock+0x35/0x1d0 [ 53.906706] ? get_signal+0x855/0x17e0 [ 53.910563] ? lock_downgrade+0x990/0x990 [ 53.914690] do_group_exit+0x149/0x400 [ 53.918543] ? __lock_is_held+0xb6/0x140 [ 53.922570] ? SyS_exit+0x30/0x30 [ 53.925990] ? _raw_spin_unlock_irq+0x27/0x70 [ 53.930455] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.935451] get_signal+0x7e8/0x17e0 [ 53.939151] ? ptrace_notify+0x130/0x130 [ 53.943216] do_signal+0x94/0x1ee0 [ 53.946731] ? _do_fork+0x1ef/0xfb0 [ 53.950326] ? _do_fork+0x2dc/0xfb0 [ 53.953923] ? setup_sigcontext+0x7d0/0x7d0 [ 53.958214] ? fork_idle+0x2d0/0x2d0 [ 53.961904] ? __perf_event_task_sched_in+0x219/0xa10 [ 53.967077] ? find_held_lock+0x35/0x1d0 [ 53.971121] ? exit_to_usermode_loop+0x98/0x300 [ 53.975764] exit_to_usermode_loop+0x224/0x300 [ 53.980329] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 53.985833] ? do_raw_spin_trylock+0x190/0x190 [ 53.990388] do_syscall_64+0x5d4/0x800 [ 53.994242] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.999229] ? syscall_return_slowpath+0x450/0x450 [ 54.004127] ? syscall_return_slowpath+0x22f/0x450 [ 54.009029] ? prepare_exit_to_usermode+0x220/0x220 [ 54.014023] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 54.018845] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 54.023659] ? sys_vfork+0x30/0x30 [ 54.027173] entry_SYSCALL64_slow_path+0x25/0x25 [ 54.031902] RIP: 0033:0x4512e9 [ 54.035080] RSP: 002b:00007f3abcc1fc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 54.042762] RAX: fffffffffffffdff RBX: 00000000007180a8 RCX: 00000000004512e9 [ 54.050000] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 54.057246] RBP: 00000000000003b0 R08: 0000000020a8a000 R09: 0000000000000000 [ 54.064483] R10: 0000000020117ffc R11: 0000000000000216 R12: 00000000004b65e0 [ 54.071719] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 54.079269] Dumping ftrace buffer: [ 54.082783] (ftrace buffer empty) [ 54.086470] Kernel Offset: disabled [ 54.090065] Rebooting in 86400 seconds..