================================================================== BUG: KASAN: slab-use-after-free in stack_not_used kernel/exit.c:800 [inline] BUG: KASAN: slab-use-after-free in check_stack_usage kernel/exit.c:849 [inline] BUG: KASAN: slab-use-after-free in do_exit+0x1892/0x2320 kernel/exit.c:1006 Read of size 8 at addr ffffc900039c0748 by task kworker/R-ext4-/6060 CPU: 1 UID: 0 PID: 6060 Comm: kworker/R-ext4- Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 stack_not_used kernel/exit.c:800 [inline] check_stack_usage kernel/exit.c:849 [inline] do_exit+0x1892/0x2320 kernel/exit.c:1006 kthread_exit+0x22b/0x280 kernel/kthread.c:336 kthread+0x3a6/0x470 kernel/kthread.c:469 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to stack of task kworker/R-ext4-/6060 The buggy address belongs to a 8-page vmalloc region starting at 0xffffc900039c0000 allocated at copy_process+0x508/0x3cf0 kernel/fork.c:2050 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11ade0 flags: 0x17ff00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 017ff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x29c2(GFP_NOWAIT|__GFP_HIGHMEM|__GFP_IO|__GFP_FS|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 65632032727, free_ts 57080349786 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2484 alloc_frozen_pages_noprof mm/mempolicy.c:2555 [inline] alloc_pages_noprof+0xa8/0x190 mm/mempolicy.c:2575 vm_area_alloc_pages mm/vmalloc.c:3662 [inline] __vmalloc_area_node mm/vmalloc.c:3876 [inline] __vmalloc_node_range_noprof+0x79b/0x1730 mm/vmalloc.c:4064 __vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4124 alloc_thread_stack_node kernel/fork.c:355 [inline] dup_task_struct+0x228/0x9a0 kernel/fork.c:924 copy_process+0x508/0x3cf0 kernel/fork.c:2050 kernel_clone+0x248/0x8e0 kernel/fork.c:2654 kernel_thread+0x13f/0x1b0 kernel/fork.c:2715 create_kthread kernel/kthread.c:490 [inline] kthreadd+0x4ec/0x6e0 kernel/kthread.c:848 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 5859 tgid 5859 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978 vfree+0x25a/0x400 mm/vmalloc.c:3479 kcov_put kernel/kcov.c:442 [inline] kcov_close+0x28/0x50 kernel/kcov.c:543 __fput+0x44f/0xa70 fs/file_table.c:469 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x69b/0x2320 kernel/exit.c:971 do_group_exit+0x21b/0x2d0 kernel/exit.c:1112 get_signal+0x1284/0x1330 kernel/signal.c:3034 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc900039c0600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900039c0680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900039c0700: 00 00 00 00 00 00 00 00 00 fb 1d 00 01 00 00 00 ^ ffffc900039c0780: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 ffffc900039c0800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================