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-8,10.128.0.4' (ECDSA) to the list of known hosts. 2017/08/21 08:05:58 parsed 1 programs 2017/08/21 08:05:58 executed programs: 0 2017/08/21 08:06:03 executed programs: 319 2017/08/21 08:06:08 executed programs: 577 syzkaller login: [ 138.846613] ================================================================== [ 138.847780] BUG: KASAN: use-after-free in free_ldt_struct.part.2+0x10a/0x150 [ 138.848760] Read of size 4 at addr ffff8801dadcf608 by task syz-executor0/12992 [ 138.849771] [ 138.850024] CPU: 0 PID: 12992 Comm: syz-executor0 Not tainted 4.13.0-rc6+ #44 [ 138.851002] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 138.852269] Call Trace: [ 138.852640] dump_stack+0x194/0x257 [ 138.853168] ? arch_local_irq_restore+0x53/0x53 [ 138.853807] ? show_regs_print_info+0x65/0x65 [ 138.854438] ? free_ldt_struct.part.2+0x10a/0x150 [ 138.855104] print_address_description+0x73/0x250 [ 138.855790] ? free_ldt_struct.part.2+0x10a/0x150 [ 138.856483] kasan_report+0x24e/0x340 [ 138.857027] __asan_report_load4_noabort+0x14/0x20 [ 138.857696] free_ldt_struct.part.2+0x10a/0x150 [ 138.858361] ? rcu_pm_notify+0xc0/0xc0 [ 138.858899] destroy_context_ldt+0x60/0x80 [ 138.859497] __mmdrop+0xe9/0x530 [ 138.859976] ? sighand_ctor+0x50/0x50 [ 138.860504] ? trace_hardirqs_on+0xd/0x10 [ 138.861100] ? percpu_counter_add_batch+0xce/0x130 [ 138.861796] ? free_modinfo_version+0x70/0x70 [ 138.862410] ? __khugepaged_exit+0x43d/0x650 [ 138.863023] ? SyS_munmap+0x30/0x30 [ 138.863535] ? ___might_sleep+0x1/0x470 [ 138.864120] ? __might_sleep+0x95/0x190 [ 138.864678] mmput+0x541/0x6e0 [ 138.865130] ? get_task_exe_file+0xc0/0xc0 [ 138.865720] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 138.866376] ? do_exit+0x979/0x1b10 [ 138.867518] ? lock_downgrade+0x990/0x990 [ 138.871655] ? do_raw_spin_trylock+0x190/0x190 [ 138.876228] ? down_read+0x96/0x150 [ 138.879839] ? do_exit+0x49c/0x1b10 [ 138.883454] ? __down_interruptible+0x6a0/0x6a0 [ 138.888111] ? trace_hardirqs_on+0xd/0x10 [ 138.892244] ? _raw_spin_unlock_irq+0x27/0x70 [ 138.896739] do_exit+0x989/0x1b10 [ 138.900184] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 138.905381] ? mm_update_next_owner+0x930/0x930 [ 138.910060] ? __cleanup_sighand+0x40/0x40 [ 138.914341] ? check_noncircular+0x20/0x20 [ 138.918612] ? find_held_lock+0x35/0x1d0 [ 138.922674] ? get_signal+0x855/0x17e0 [ 138.926549] ? lock_downgrade+0x990/0x990 [ 138.930694] do_group_exit+0x149/0x400 [ 138.934568] ? __lock_is_held+0xb6/0x140 [ 138.938614] ? SyS_exit+0x30/0x30 [ 138.942071] ? _raw_spin_unlock_irq+0x27/0x70 [ 138.946545] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 138.951539] get_signal+0x7e8/0x17e0 [ 138.955286] ? ptrace_notify+0x130/0x130 [ 138.959385] do_signal+0x94/0x1ee0 [ 138.962925] ? _do_fork+0x1ef/0xfb0 [ 138.966542] ? _do_fork+0x2dc/0xfb0 [ 138.970164] ? setup_sigcontext+0x7d0/0x7d0 [ 138.974474] ? fork_idle+0x2d0/0x2d0 [ 138.978213] ? find_held_lock+0x35/0x1d0 [ 138.982265] ? exit_to_usermode_loop+0x98/0x300 [ 138.986933] exit_to_usermode_loop+0x224/0x300 [ 138.991498] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 138.997019] ? do_raw_spin_trylock+0x190/0x190 [ 139.001604] do_syscall_64+0x5d4/0x800 [ 139.005480] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 139.010484] ? syscall_return_slowpath+0x450/0x450 [ 139.015403] ? syscall_return_slowpath+0x22f/0x450 [ 139.020320] ? prepare_exit_to_usermode+0x220/0x220 [ 139.025323] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 139.030157] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 139.034984] ? sys_vfork+0x30/0x30 [ 139.038513] entry_SYSCALL64_slow_path+0x25/0x25 [ 139.043249] RIP: 0033:0x4512e9 [ 139.046421] RSP: 002b:00007f4c8c33cc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 139.054115] RAX: fffffffffffffdff RBX: 0000000000718348 RCX: 00000000004512e9 [ 139.061364] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 139.068616] RBP: 00000000000003b0 R08: 00000000201a1000 R09: 0000000000000000 [ 139.075867] R10: 0000000020c23000 R11: 0000000000000216 R12: 00000000004b65e0 [ 139.083117] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 139.090392] [ 139.092028] Allocated by task 12943: [ 139.095725] save_stack_trace+0x16/0x20 [ 139.099684] save_stack+0x43/0xd0 [ 139.103119] kasan_kmalloc+0xad/0xe0 [ 139.106816] kmem_cache_alloc_trace+0x12f/0x740 [ 139.111469] alloc_ldt_struct+0x52/0x140 [ 139.115517] write_ldt+0x3e9/0xac0 [ 139.119039] sys_modify_ldt+0x1ef/0x240 [ 139.122999] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 139.127736] [ 139.129346] Freed by task 12992: [ 139.132691] save_stack_trace+0x16/0x20 [ 139.136642] save_stack+0x43/0xd0 [ 139.140077] kasan_slab_free+0x71/0xc0 [ 139.143939] kfree+0xca/0x250 [ 139.147025] free_ldt_struct.part.2+0xdd/0x150 [ 139.151603] destroy_context_ldt+0x60/0x80 [ 139.155831] __mmdrop+0xe9/0x530 [ 139.159174] mmput+0x541/0x6e0 [ 139.162343] copy_process.part.34+0x2315/0x4bd0 [ 139.166986] _do_fork+0x1ef/0xfb0 [ 139.170446] SyS_clone+0x37/0x50 [ 139.173800] do_syscall_64+0x26c/0x800 [ 139.177670] return_from_SYSCALL_64+0x0/0x7a [ 139.182052] [ 139.183659] The buggy address belongs to the object at ffff8801dadcf600 [ 139.183659] which belongs to the cache kmalloc-32 of size 32 [ 139.196123] The buggy address is located 8 bytes inside of [ 139.196123] 32-byte region [ffff8801dadcf600, ffff8801dadcf620) [ 139.207716] The buggy address belongs to the page: [ 139.212623] page:ffffea00076b73c0 count:1 mapcount:0 mapping:ffff8801dadcf000 index:0xffff8801dadcffc1 [ 139.222043] flags: 0x200000000000100(slab) [ 139.226244] raw: 0200000000000100 ffff8801dadcf000 ffff8801dadcffc1 000000010000003f [ 139.234091] raw: ffffea00076b6e20 ffffea0007614d60 ffff8801dac001c0 0000000000000000 [ 139.241935] page dumped because: kasan: bad access detected [ 139.247607] [ 139.249198] Memory state around the buggy address: [ 139.254094] ffff8801dadcf500: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 139.261416] ffff8801dadcf580: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 139.268738] >ffff8801dadcf600: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 139.276062] ^ [ 139.279657] ffff8801dadcf680: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 139.286980] ffff8801dadcf700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 139.294301] ================================================================== [ 139.301631] Disabling lock debugging due to kernel taint [ 139.307154] Kernel panic - not syncing: panic_on_warn set ... [ 139.307154] [ 139.314499] CPU: 0 PID: 12992 Comm: syz-executor0 Tainted: G B 4.13.0-rc6+ #44 [ 139.322960] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 139.332282] Call Trace: [ 139.334836] dump_stack+0x194/0x257 [ 139.338435] ? arch_local_irq_restore+0x53/0x53 [ 139.343071] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 139.347800] ? free_ldt_struct.part.2+0x30/0x150 [ 139.352522] panic+0x1e4/0x417 [ 139.355679] ? __warn+0x1d9/0x1d9 [ 139.359107] ? free_ldt_struct.part.2+0x10a/0x150 [ 139.363916] kasan_end_report+0x50/0x50 [ 139.367857] kasan_report+0x137/0x340 [ 139.371626] __asan_report_load4_noabort+0x14/0x20 [ 139.376519] free_ldt_struct.part.2+0x10a/0x150 [ 139.381155] ? rcu_pm_notify+0xc0/0xc0 [ 139.385013] destroy_context_ldt+0x60/0x80 [ 139.389217] __mmdrop+0xe9/0x530 [ 139.392550] ? sighand_ctor+0x50/0x50 [ 139.396316] ? trace_hardirqs_on+0xd/0x10 [ 139.400434] ? percpu_counter_add_batch+0xce/0x130 [ 139.405333] ? free_modinfo_version+0x70/0x70 [ 139.409792] ? __khugepaged_exit+0x43d/0x650 [ 139.414166] ? SyS_munmap+0x30/0x30 [ 139.417763] ? ___might_sleep+0x1/0x470 [ 139.421710] ? __might_sleep+0x95/0x190 [ 139.425651] mmput+0x541/0x6e0 [ 139.428809] ? get_task_exe_file+0xc0/0xc0 [ 139.433021] ? is_current_pgrp_orphaned+0xa0/0xa0 [ 139.437825] ? do_exit+0x979/0x1b10 [ 139.441420] ? lock_downgrade+0x990/0x990 [ 139.445537] ? do_raw_spin_trylock+0x190/0x190 [ 139.450089] ? down_read+0x96/0x150 [ 139.453679] ? do_exit+0x49c/0x1b10 [ 139.457273] ? __down_interruptible+0x6a0/0x6a0 [ 139.461905] ? trace_hardirqs_on+0xd/0x10 [ 139.466019] ? _raw_spin_unlock_irq+0x27/0x70 [ 139.470483] do_exit+0x989/0x1b10 [ 139.473905] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 139.479067] ? mm_update_next_owner+0x930/0x930 [ 139.483708] ? __cleanup_sighand+0x40/0x40 [ 139.487928] ? check_noncircular+0x20/0x20 [ 139.492143] ? find_held_lock+0x35/0x1d0 [ 139.496173] ? get_signal+0x855/0x17e0 [ 139.500023] ? lock_downgrade+0x990/0x990 [ 139.504140] do_group_exit+0x149/0x400 [ 139.507991] ? __lock_is_held+0xb6/0x140 [ 139.512023] ? SyS_exit+0x30/0x30 [ 139.515443] ? _raw_spin_unlock_irq+0x27/0x70 [ 139.519907] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 139.524890] get_signal+0x7e8/0x17e0 [ 139.528584] ? ptrace_notify+0x130/0x130 [ 139.532626] do_signal+0x94/0x1ee0 [ 139.536136] ? _do_fork+0x1ef/0xfb0 [ 139.539728] ? _do_fork+0x2dc/0xfb0 [ 139.543320] ? setup_sigcontext+0x7d0/0x7d0 [ 139.547607] ? fork_idle+0x2d0/0x2d0 [ 139.551299] ? find_held_lock+0x35/0x1d0 [ 139.555326] ? exit_to_usermode_loop+0x98/0x300 [ 139.559963] exit_to_usermode_loop+0x224/0x300 [ 139.564511] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 139.570103] ? do_raw_spin_trylock+0x190/0x190 [ 139.574654] do_syscall_64+0x5d4/0x800 [ 139.578506] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 139.583488] ? syscall_return_slowpath+0x450/0x450 [ 139.588383] ? syscall_return_slowpath+0x22f/0x450 [ 139.593278] ? prepare_exit_to_usermode+0x220/0x220 [ 139.598261] ? entry_SYSCALL_64_fastpath+0x5/0xbe [ 139.603072] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 139.607879] ? sys_vfork+0x30/0x30 [ 139.611386] entry_SYSCALL64_slow_path+0x25/0x25 [ 139.616104] RIP: 0033:0x4512e9 [ 139.619259] RSP: 002b:00007f4c8c33cc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000038 [ 139.626931] RAX: fffffffffffffdff RBX: 0000000000718348 RCX: 00000000004512e9 [ 139.634166] RDX: 0000000020507ffc RSI: 00000000208a8f43 RDI: 0000000000800000 [ 139.641402] RBP: 00000000000003b0 R08: 00000000201a1000 R09: 0000000000000000 [ 139.648637] R10: 0000000020c23000 R11: 0000000000000216 R12: 00000000004b65e0 [ 139.655880] R13: 00000000ffffffff R14: 0000000000800000 R15: 00000000208a8f43 [ 139.663548] Dumping ftrace buffer: [ 139.667055] (ftrace buffer empty) [ 139.670732] Kernel Offset: disabled [ 139.674323] Rebooting in 86400 seconds..