Debian GNU/Linux 7 syzkaller ttyS0 2017/08/13 08:16:36 parsed 1 programs 2017/08/13 08:16:36 executed programs: 0 syzkaller login: [ 46.928192] ================================================================== [ 46.928707] BUG: KASAN: use-after-free in free_ldt_struct.part.2+0x10a/0x150 [ 46.929173] Read of size 4 at addr ffff88006d2cb7c8 by task kworker/u9:0/3710 [ 46.929633] [ 46.929742] CPU: 1 PID: 3710 Comm: kworker/u9:0 Not tainted 4.13.0-rc4-next-20170811 #2 [ 46.930265] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 46.930842] Call Trace: [ 46.931017] dump_stack+0x194/0x257 [ 46.931259] ? arch_local_irq_restore+0x53/0x53 [ 46.931573] ? show_regs_print_info+0x65/0x65 [ 46.931869] ? perf_trace_lock+0xf1/0x860 [ 46.932209] ? trace_event_raw_event_lock+0x340/0x340 [ 46.932552] ? free_ldt_struct.part.2+0x10a/0x150 [ 46.932871] print_address_description+0x73/0x250 [ 46.933188] ? free_ldt_struct.part.2+0x10a/0x150 [ 46.933509] kasan_report+0x24e/0x340 [ 46.933765] __asan_report_load4_noabort+0x14/0x20 [ 46.934090] free_ldt_struct.part.2+0x10a/0x150 [ 46.934401] destroy_context_ldt+0x60/0x80 [ 46.934686] __mmdrop+0xe9/0x530 [ 46.935297] ? trace_event_raw_event_lock+0x340/0x340 [ 46.935746] ? sighand_ctor+0x50/0x50 [ 46.936162] ? trace_event_raw_event_lock+0x340/0x340 [ 46.936497] ? lock_acquire+0x1d5/0x580 [ 46.936768] ? lock_acquire+0x1d5/0x580 [ 46.937149] ? flush_old_exec+0xa51/0x1ff0 [ 46.937440] ? lock_downgrade+0x990/0x990 [ 46.937712] ? do_raw_spin_trylock+0x190/0x190 [ 46.938010] ? mm_access+0x140/0x140 [ 46.938278] flush_old_exec+0x173c/0x1ff0 [ 46.938651] ? __register_binfmt+0x330/0x330 [ 46.938992] ? do_iter_readv_writev+0x7f0/0x7f0 [ 46.939316] ? fsnotify+0x1af0/0x1af0 [ 46.939561] ? _cond_resched+0x14/0x30 [ 46.939811] ? __fsnotify_parent+0xb4/0x3a0 [ 46.940104] ? fsnotify+0x1af0/0x1af0 [ 46.940356] ? rw_verify_area+0xe5/0x2b0 [ 46.940618] ? vfs_read+0x165/0x350 [ 46.940958] ? kernel_read+0x126/0x1e0 [ 46.941271] ? open_exec+0x60/0x60 [ 46.941507] ? load_elf_phdrs+0xb7/0x140 [ 46.941775] ? load_elf_phdrs+0x10c/0x140 [ 46.942049] load_elf_binary+0x81f/0x4ba0 [ 46.942346] ? lock_acquire+0x1d5/0x580 [ 46.942687] ? lock_acquire+0x1d5/0x580 [ 46.943078] ? search_binary_handler+0xfc/0x6b0 [ 46.943389] ? lock_downgrade+0x990/0x990 [ 46.943655] ? module_unload_free+0x5b0/0x5b0 [ 46.943949] ? notesize.isra.4+0x80/0x80 [ 46.944270] search_binary_handler+0x142/0x6b0 [ 46.944724] do_execveat_common.isra.33+0x1746/0x22e0 [ 46.945118] ? kmem_cache_alloc+0x12e/0x760 [ 46.945398] ? prepare_bprm_creds+0x110/0x110 [ 46.945685] ? call_rcu_sched+0x12/0x20 [ 46.945940] ? trace_event_raw_event_lock+0x340/0x340 [ 46.946321] ? lock_acquire+0x1d5/0x580 [ 46.946754] ? lock_acquire+0x1d5/0x580 [ 46.947049] ? fs_reclaim_acquire+0x20/0x20 [ 46.947362] ? lock_downgrade+0x990/0x990 [ 46.947621] ? lock_release+0xa40/0xa40 [ 46.947908] ? check_same_owner+0x320/0x320 [ 46.948262] ? rcu_note_context_switch+0x710/0x710 [ 46.948739] ? kasan_unpoison_shadow+0x35/0x50 [ 46.949160] ? kasan_kmalloc+0xad/0xe0 [ 46.949499] ? kasan_slab_alloc+0x12/0x20 [ 46.949870] ? kmem_cache_alloc+0x2e9/0x760 [ 46.950287] ? prepare_kernel_cred+0x345/0x450 [ 46.950788] ? get_task_cred+0x3b0/0x3b0 [ 46.951155] do_execve+0x31/0x40 [ 46.951520] call_usermodehelper_exec_async+0x457/0x8f0 [ 46.951981] ? finish_task_switch+0x1d3/0x740 [ 46.952434] ? finish_task_switch+0x1aa/0x740 [ 46.952850] ? umh_complete+0x90/0x90 [ 46.953206] ? preempt_notifier_dec+0x20/0x20 [ 46.953684] ? umh_complete+0x90/0x90 [ 46.954018] ? umh_complete+0x90/0x90 [ 46.954386] ret_from_fork+0x2a/0x40 [ 46.954710] [ 46.954856] Allocated by task 3700: [ 46.955175] save_stack_trace+0x16/0x20 [ 46.955568] save_stack+0x43/0xd0 [ 46.955880] kasan_kmalloc+0xad/0xe0 [ 46.956200] kmem_cache_alloc_trace+0x136/0x750 [ 46.956892] alloc_ldt_struct+0x52/0x140 [ 46.957244] write_ldt+0x7b7/0xab0 [ 46.957554] sys_modify_ldt+0x1ef/0x240 [ 46.957913] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.958335] [ 46.958475] Freed by task 3700: [ 46.958755] save_stack_trace+0x16/0x20 [ 46.959022] save_stack+0x43/0xd0 [ 46.959336] kasan_slab_free+0x71/0xc0 [ 46.959667] kfree+0xca/0x250 [ 46.959986] free_ldt_struct.part.2+0xdd/0x150 [ 46.960476] destroy_context_ldt+0x60/0x80 [ 46.960862] __mmdrop+0xe9/0x530 [ 46.961183] mmput+0x541/0x6e0 [ 46.961480] copy_process.part.36+0x22e1/0x4af0 [ 46.961881] _do_fork+0x1ef/0xfb0 [ 46.962181] SyS_clone+0x37/0x50 [ 46.962470] do_syscall_64+0x26c/0x8c0 [ 46.962803] return_from_SYSCALL_64+0x0/0x7a [ 46.963172] [ 46.963319] The buggy address belongs to the object at ffff88006d2cb7c0 [ 46.963319] which belongs to the cache kmalloc-32 of size 32 [ 46.964483] The buggy address is located 8 bytes inside of [ 46.964483] 32-byte region [ffff88006d2cb7c0, ffff88006d2cb7e0) [ 46.965427] The buggy address belongs to the page: [ 46.965775] page:ffffea0001b4b2c0 count:1 mapcount:0 mapping:ffff88006d2cb000 index:0xffff88006d2cbfc1 [ 46.966417] flags: 0x500000000000100(slab) [ 46.966709] raw: 0500000000000100 ffff88006d2cb000 ffff88006d2cbfc1 0000000100000027 [ 46.967243] raw: ffffea0001b33b20 ffffea0001b38520 ffff88003e8001c0 0000000000000000 [ 46.967784] page dumped because: kasan: bad access detected [ 46.968194] [ 46.968301] Memory state around the buggy address: [ 46.968732] ffff88006d2cb680: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 46.969326] ffff88006d2cb700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 46.969825] >ffff88006d2cb780: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 46.970329] ^ [ 46.970727] ffff88006d2cb800: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 46.971227] ffff88006d2cb880: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 46.971732] ================================================================== [ 46.972257] Kernel panic - not syncing: panic_on_warn set ... [ 46.972257] [ 46.972791] CPU: 1 PID: 3710 Comm: kworker/u9:0 Tainted: G B 4.13.0-rc4-next-20170811 #2 [ 46.973443] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 46.974005] Call Trace: [ 46.974185] dump_stack+0x194/0x257 [ 46.974439] ? arch_local_irq_restore+0x53/0x53 [ 46.974765] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 46.975096] ? free_ldt_struct.part.2+0x90/0x150 [ 46.975438] panic+0x1e4/0x417 [ 46.975685] ? __warn+0x1d9/0x1d9 [ 46.975931] ? free_ldt_struct.part.2+0x10a/0x150 [ 46.976267] kasan_end_report+0x50/0x50 [ 46.976541] kasan_report+0x137/0x340 [ 46.976810] __asan_report_load4_noabort+0x14/0x20 [ 46.977217] free_ldt_struct.part.2+0x10a/0x150 [ 46.977711] destroy_context_ldt+0x60/0x80 [ 46.977958] __mmdrop+0xe9/0x530 [ 46.978245] ? trace_event_raw_event_lock+0x340/0x340 [ 46.978604] ? sighand_ctor+0x50/0x50 [ 46.978865] ? trace_event_raw_event_lock+0x340/0x340 [ 46.979237] ? lock_acquire+0x1d5/0x580 [ 46.979541] ? lock_acquire+0x1d5/0x580 [ 46.979805] ? flush_old_exec+0xa51/0x1ff0 [ 46.980155] ? lock_downgrade+0x990/0x990 [ 46.980449] ? do_raw_spin_trylock+0x190/0x190 [ 46.980789] ? mm_access+0x140/0x140 [ 46.981093] flush_old_exec+0x173c/0x1ff0 [ 46.981423] ? __register_binfmt+0x330/0x330 [ 46.981753] ? do_iter_readv_writev+0x7f0/0x7f0 [ 46.982113] ? fsnotify+0x1af0/0x1af0 [ 46.982430] ? _cond_resched+0x14/0x30 [ 46.982695] ? __fsnotify_parent+0xb4/0x3a0 [ 46.982987] ? fsnotify+0x1af0/0x1af0 [ 46.983297] ? rw_verify_area+0xe5/0x2b0 [ 46.983605] ? vfs_read+0x165/0x350 [ 46.983897] ? kernel_read+0x126/0x1e0 [ 46.984207] ? open_exec+0x60/0x60 [ 46.984447] ? load_elf_phdrs+0xb7/0x140 [ 46.984765] ? load_elf_phdrs+0x10c/0x140 [ 46.985075] load_elf_binary+0x81f/0x4ba0 [ 46.985365] ? lock_acquire+0x1d5/0x580 [ 46.985693] ? lock_acquire+0x1d5/0x580 [ 46.985968] ? search_binary_handler+0xfc/0x6b0 [ 46.986326] ? lock_downgrade+0x990/0x990 [ 46.986662] ? module_unload_free+0x5b0/0x5b0 [ 46.986970] ? notesize.isra.4+0x80/0x80 [ 46.987327] search_binary_handler+0x142/0x6b0 [ 46.987682] do_execveat_common.isra.33+0x1746/0x22e0 [ 46.988067] ? kmem_cache_alloc+0x12e/0x760 [ 46.988376] ? prepare_bprm_creds+0x110/0x110 [ 46.988676] ? call_rcu_sched+0x12/0x20 [ 46.988947] ? trace_event_raw_event_lock+0x340/0x340 [ 46.989350] ? lock_acquire+0x1d5/0x580 [ 46.989647] ? lock_acquire+0x1d5/0x580 [ 46.989914] ? fs_reclaim_acquire+0x20/0x20 [ 46.990266] ? lock_downgrade+0x990/0x990 [ 46.990533] ? lock_release+0xa40/0xa40 [ 46.990830] ? check_same_owner+0x320/0x320 [ 46.991111] ? rcu_note_context_switch+0x710/0x710 [ 46.991382] ? kasan_unpoison_shadow+0x35/0x50 [ 46.991734] ? kasan_kmalloc+0xad/0xe0 [ 46.991995] ? kasan_slab_alloc+0x12/0x20 [ 46.992316] ? kmem_cache_alloc+0x2e9/0x760 [ 46.992606] ? prepare_kernel_cred+0x345/0x450 [ 46.992987] ? get_task_cred+0x3b0/0x3b0 [ 46.993311] do_execve+0x31/0x40 [ 46.993582] call_usermodehelper_exec_async+0x457/0x8f0 [ 46.994034] ? finish_task_switch+0x1d3/0x740 [ 46.994353] ? finish_task_switch+0x1aa/0x740 [ 46.994655] ? umh_complete+0x90/0x90 [ 46.994912] ? preempt_notifier_dec+0x20/0x20 [ 46.995263] ? umh_complete+0x90/0x90 [ 46.995546] ? umh_complete+0x90/0x90 [ 46.995815] ret_from_fork+0x2a/0x40 [ 46.996186] Dumping ftrace buffer: [ 46.996427] (ftrace buffer empty) [ 46.996684] Kernel Offset: disabled [ 46.996937] Rebooting in 86400 seconds..