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-1,10.128.0.54' (ECDSA) to the list of known hosts. 2017/08/21 05:57:39 parsed 1 programs 2017/08/21 05:57:39 executed programs: 0 syzkaller login: [ 48.121826] ================================================================== [ 48.123135] BUG: KASAN: use-after-free in free_ldt_struct.part.2+0x10a/0x150 [ 48.124142] Read of size 4 at addr ffff8801d9b3ca08 by task syz-executor1/5088 [ 48.125295] [ 48.125582] CPU: 0 PID: 5088 Comm: syz-executor1 Not tainted 4.13.0-rc5+ #43 [ 48.126598] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.128022] Call Trace: [ 48.128409] dump_stack+0x194/0x257 [ 48.129236] ? arch_local_irq_restore+0x53/0x53 [ 48.129902] ? show_regs_print_info+0x65/0x65 [ 48.130584] ? free_ldt_struct.part.2+0x10a/0x150 [ 48.131427] print_address_description+0x73/0x250 [ 48.132096] ? free_ldt_struct.part.2+0x10a/0x150 [ 48.132837] kasan_report+0x24e/0x340 [ 48.133404] __asan_report_load4_noabort+0x14/0x20 [ 48.134128] free_ldt_struct.part.2+0x10a/0x150 [ 48.135065] ? rcu_pm_notify+0xc0/0xc0 [ 48.135646] destroy_context_ldt+0x60/0x80 [ 48.136276] __mmdrop+0xe9/0x530 [ 48.136780] ? sighand_ctor+0x50/0x50 [ 48.137365] ? trace_hardirqs_on+0xd/0x10 [ 48.137950] ? percpu_counter_add_batch+0xce/0x130 [ 48.138655] ? free_modinfo_version+0x70/0x70 [ 48.139342] ? __khugepaged_exit+0x43d/0x650 [ 48.140006] ? SyS_munmap+0x30/0x30 [ 48.140539] ? ___might_sleep+0x1/0x470 [ 48.141198] ? __might_sleep+0x95/0x190 [ 48.141781] mmput+0x541/0x6e0 [ 48.143875] ? get_task_exe_file+0xc0/0xc0 [ 48.148112] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 48.152943] ? do_exit+0x979/0x1b10 [ 48.156563] ? lock_downgrade+0x990/0x990 [ 48.160802] ? do_raw_spin_trylock+0x190/0x190 [ 48.165427] ? down_read+0x96/0x150 [ 48.169045] ? do_exit+0x49c/0x1b10 [ 48.172667] ? __down_interruptible+0x6a0/0x6a0 [ 48.177326] ? trace_hardirqs_on+0xd/0x10 [ 48.181471] ? _raw_spin_unlock_irq+0x27/0x70 [ 48.185974] do_exit+0x989/0x1b10 [ 48.189432] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 48.194621] ? mm_update_next_owner+0x930/0x930 [ 48.199287] ? __cleanup_sighand+0x40/0x40 [ 48.203527] ? perf_trace_lock+0xf1/0x860 [ 48.208184] ? check_noncircular+0x20/0x20 [ 48.212441] ? find_held_lock+0x35/0x1d0 [ 48.216484] ? get_signal+0x855/0x17e0 [ 48.220345] ? lock_downgrade+0x990/0x990 [ 48.224476] do_group_exit+0x149/0x400 [ 48.228338] ? __lock_is_held+0xb6/0x140 [ 48.232374] ? SyS_exit+0x30/0x30 [ 48.235801] ? _raw_spin_unlock_irq+0x27/0x70 [ 48.240273] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 48.245284] get_signal+0x7e8/0x17e0 [ 48.249023] ? ptrace_notify+0x130/0x130 [ 48.253103] do_signal+0x94/0x1ee0 [ 48.256626] ? _do_fork+0x1ef/0xfb0 [ 48.260223] ? _do_fork+0x2dc/0xfb0 [ 48.263825] ? setup_sigcontext+0x7d0/0x7d0 [ 48.268119] ? fork_idle+0x2d0/0x2d0 [ 48.271818] ? __perf_event_task_sched_in+0x219/0xa10 [ 48.276994] ? find_held_lock+0x35/0x1d0 [ 48.281041] ? exit_to_usermode_loop+0x98/0x300 [ 48.285697] exit_to_usermode_loop+0x224/0x300 [ 48.290257] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 48.295765] ? do_raw_spin_trylock+0x190/0x190 [ 48.300679] do_syscall_64+0x5d4/0x800 [ 48.304540] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 48.309530] ? syscall_return_slowpath+0x450/0x450 [ 48.314431] ? syscall_return_slowpath+0x22f/0x450 [ 48.319336] ? prepare_exit_to_usermode+0x220/0x220 [ 48.324330] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 48.329153] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.333974] ? sys_vfork+0x30/0x30 [ 48.337492] entry_SYSCALL64_slow_path+0x25/0x25 [ 48.342226] RIP: 0033:0x4512e9 [ 48.345388] RSP: 002b:00007f60c9618c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 48.353077] RAX: fffffffffffffdff RBX: 00000000007180a8 RCX: 00000000004512e9 [ 48.360321] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 48.367563] RBP: 00000000000003b0 R08: 0000000020a8a000 R09: 0000000000000000 [ 48.374807] R10: 0000000020117ffc R11: 0000000000000216 R12: 00000000004b65e0 [ 48.382287] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 48.389550] [ 48.391150] Allocated by task 5074: [ 48.394760] save_stack_trace+0x16/0x20 [ 48.398717] save_stack+0x43/0xd0 [ 48.402147] kasan_kmalloc+0xad/0xe0 [ 48.405839] kmem_cache_alloc_trace+0x12f/0x740 [ 48.410499] alloc_ldt_struct+0x52/0x140 [ 48.414540] write_ldt+0x7b4/0xac0 [ 48.418054] sys_modify_ldt+0x1ef/0x240 [ 48.422001] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 48.426733] [ 48.428331] Freed by task 5088: [ 48.431586] save_stack_trace+0x16/0x20 [ 48.435531] save_stack+0x43/0xd0 [ 48.438956] kasan_slab_free+0x71/0xc0 [ 48.442814] kfree+0xca/0x250 [ 48.445892] free_ldt_struct.part.2+0xdd/0x150 [ 48.450443] destroy_context_ldt+0x60/0x80 [ 48.454654] __mmdrop+0xe9/0x530 [ 48.457990] mmput+0x541/0x6e0 [ 48.461158] copy_process.part.34+0x2315/0x4bd0 [ 48.465797] _do_fork+0x1ef/0xfb0 [ 48.469228] SyS_clone+0x37/0x50 [ 48.472569] do_syscall_64+0x26c/0x800 [ 48.476427] return_from_SYSCALL_64+0x0/0x7a [ 48.480801] [ 48.482403] The buggy address belongs to the object at ffff8801d9b3ca00 [ 48.482403] which belongs to the cache kmalloc-32 of size 32 [ 48.494859] The buggy address is located 8 bytes inside of [ 48.494859] 32-byte region [ffff8801d9b3ca00, ffff8801d9b3ca20) [ 48.506442] The buggy address belongs to the page: [ 48.511343] page:ffffea000766cf00 count:1 mapcount:0 mapping:ffff8801d9b3c000 index:0xffff8801d9b3cfc1 [ 48.520758] flags: 0x200000000000100(slab) [ 48.524964] raw: 0200000000000100 ffff8801d9b3c000 ffff8801d9b3cfc1 000000010000003f [ 48.532816] raw: ffffea000766eb20 ffffea000766f4e0 ffff8801dac001c0 0000000000000000 [ 48.540665] page dumped because: kasan: bad access detected [ 48.546351] [ 48.547948] Memory state around the buggy address: [ 48.552847] ffff8801d9b3c900: 00 00 fc fc fc fc fc fc 00 07 fc fc fc fc fc fc [ 48.560175] ffff8801d9b3c980: 00 07 fc fc fc fc fc fc fb fb fb fb fc fc fc fc [ 48.567504] >ffff8801d9b3ca00: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 48.574832] ^ [ 48.578428] ffff8801d9b3ca80: 00 05 fc fc fc fc fc fc 00 05 fc fc fc fc fc fc [ 48.585786] ffff8801d9b3cb00: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc [ 48.593114] ================================================================== [ 48.600440] Disabling lock debugging due to kernel taint [ 48.605965] Kernel panic - not syncing: panic_on_warn set ... [ 48.605965] [ 48.613323] CPU: 0 PID: 5088 Comm: syz-executor1 Tainted: G B 4.13.0-rc5+ #43 [ 48.621706] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.631042] Call Trace: [ 48.633616] dump_stack+0x194/0x257 [ 48.637229] ? arch_local_irq_restore+0x53/0x53 [ 48.641880] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 48.646622] ? free_ldt_struct.part.2+0x30/0x150 [ 48.651356] panic+0x1e4/0x417 [ 48.654530] ? __warn+0x1d9/0x1d9 [ 48.657980] ? free_ldt_struct.part.2+0x10a/0x150 [ 48.662802] kasan_end_report+0x50/0x50 [ 48.666754] kasan_report+0x137/0x340 [ 48.670543] __asan_report_load4_noabort+0x14/0x20 [ 48.675453] free_ldt_struct.part.2+0x10a/0x150 [ 48.680102] ? rcu_pm_notify+0xc0/0xc0 [ 48.683970] destroy_context_ldt+0x60/0x80 [ 48.688185] __mmdrop+0xe9/0x530 [ 48.691537] ? sighand_ctor+0x50/0x50 [ 48.695315] ? trace_hardirqs_on+0xd/0x10 [ 48.699445] ? percpu_counter_add_batch+0xce/0x130 [ 48.704360] ? free_modinfo_version+0x70/0x70 [ 48.708833] ? __khugepaged_exit+0x43d/0x650 [ 48.713220] ? SyS_munmap+0x30/0x30 [ 48.716829] ? ___might_sleep+0x1/0x470 [ 48.720795] ? __might_sleep+0x95/0x190 [ 48.724755] mmput+0x541/0x6e0 [ 48.727931] ? get_task_exe_file+0xc0/0xc0 [ 48.732152] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 48.736970] ? do_exit+0x979/0x1b10 [ 48.740579] ? lock_downgrade+0x990/0x990 [ 48.744713] ? do_raw_spin_trylock+0x190/0x190 [ 48.749278] ? down_read+0x96/0x150 [ 48.752881] ? do_exit+0x49c/0x1b10 [ 48.756486] ? __down_interruptible+0x6a0/0x6a0 [ 48.761136] ? trace_hardirqs_on+0xd/0x10 [ 48.765262] ? _raw_spin_unlock_irq+0x27/0x70 [ 48.769744] do_exit+0x989/0x1b10 [ 48.773183] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 48.778366] ? mm_update_next_owner+0x930/0x930 [ 48.783027] ? __cleanup_sighand+0x40/0x40 [ 48.787276] ? perf_trace_lock+0xf1/0x860 [ 48.791420] ? check_noncircular+0x20/0x20 [ 48.795660] ? find_held_lock+0x35/0x1d0 [ 48.799710] ? get_signal+0x855/0x17e0 [ 48.803575] ? lock_downgrade+0x990/0x990 [ 48.807711] do_group_exit+0x149/0x400 [ 48.811579] ? __lock_is_held+0xb6/0x140 [ 48.815625] ? SyS_exit+0x30/0x30 [ 48.819056] ? _raw_spin_unlock_irq+0x27/0x70 [ 48.823530] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 48.828531] get_signal+0x7e8/0x17e0 [ 48.832255] ? ptrace_notify+0x130/0x130 [ 48.836330] do_signal+0x94/0x1ee0 [ 48.839861] ? _do_fork+0x1ef/0xfb0 [ 48.843468] ? _do_fork+0x2dc/0xfb0 [ 48.847077] ? setup_sigcontext+0x7d0/0x7d0 [ 48.851376] ? fork_idle+0x2d0/0x2d0 [ 48.855087] ? __perf_event_task_sched_in+0x219/0xa10 [ 48.860268] ? find_held_lock+0x35/0x1d0 [ 48.864310] ? exit_to_usermode_loop+0x98/0x300 [ 48.868964] exit_to_usermode_loop+0x224/0x300 [ 48.873533] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 48.879049] ? do_raw_spin_trylock+0x190/0x190 [ 48.883652] do_syscall_64+0x5d4/0x800 [ 48.887519] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 48.892515] ? syscall_return_slowpath+0x450/0x450 [ 48.897424] ? syscall_return_slowpath+0x22f/0x450 [ 48.902334] ? prepare_exit_to_usermode+0x220/0x220 [ 48.907330] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 48.912159] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.916984] ? sys_vfork+0x30/0x30 [ 48.920507] entry_SYSCALL64_slow_path+0x25/0x25 [ 48.925240] RIP: 0033:0x4512e9 [ 48.928411] RSP: 002b:00007f60c9618c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 48.936097] RAX: fffffffffffffdff RBX: 00000000007180a8 RCX: 00000000004512e9 [ 48.943346] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 48.950593] RBP: 00000000000003b0 R08: 0000000020a8a000 R09: 0000000000000000 [ 48.957841] R10: 0000000020117ffc R11: 0000000000000216 R12: 00000000004b65e0 [ 48.965091] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 48.972681] Dumping ftrace buffer: [ 48.976196] (ftrace buffer empty) [ 48.979873] Kernel Offset: disabled [ 48.983467] Rebooting in 86400 seconds..