BUG: sleeping function called from invalid context at include/linux/uaccess.h:176 ================================================================== BUG: KASAN: out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:214 [inline] BUG: KASAN: out-of-bounds in page_fault_oops+0x9c9/0xcc0 arch/x86/mm/fault.c:650 Read of size 2 at addr ffffc900044b7110 by task syz.1.2/5319 CPU: 1 UID: 0 PID: 5319 Comm: syz.1.2 Not tainted 6.11.0-rc4-next-20240823-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 user_mode arch/x86/include/asm/ptrace.h:214 [inline] page_fault_oops+0x9c9/0xcc0 arch/x86/mm/fault.c:650 The buggy address belongs to stack of task syz.1.2/5319 internal error: frame has invalid marker: 4294904320 The buggy address belongs to the virtual mapping at [ffffc900044b0000, ffffc900044b9000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2203 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888023177ee0 pfn:0x23177 memcg:ffff88807df9fe02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888023177ee0 0000000000000000 00000001ffffffff ffff88807df9fe02 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 5316, tgid 5316 (syz.1.2), ts 71280688561, free_ts 71022673512 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1517 prep_new_page mm/page_alloc.c:1525 [inline] get_page_from_freelist+0x312a/0x3270 mm/page_alloc.c:3476 __alloc_pages_noprof+0x29e/0x780 mm/page_alloc.c:4748 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3600 [inline] __vmalloc_area_node mm/vmalloc.c:3669 [inline] __vmalloc_node_range_noprof+0xa40/0x1400 mm/vmalloc.c:3850 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1115 copy_process+0x5d1/0x3d50 kernel/fork.c:2203 kernel_clone+0x226/0x8f0 kernel/fork.c:2784 __do_sys_clone3 kernel/fork.c:3088 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3067 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5237 tgid 5237 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1098 [inline] free_unref_page+0xc07/0xd90 mm/page_alloc.c:2651 discard_slab mm/slub.c:2630 [inline] __put_partials+0xeb/0x130 mm/slub.c:3098 put_cpu_partial+0x17c/0x250 mm/slub.c:3173 __slab_free+0x2ea/0x3d0 mm/slub.c:4391 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4036 [inline] slab_alloc_node mm/slub.c:4085 [inline] __do_kmalloc_node mm/slub.c:4205 [inline] __kmalloc_noprof+0x1a6/0x400 mm/slub.c:4218 kmalloc_noprof include/linux/slab.h:685 [inline] tomoyo_realpath_from_path+0xcf/0x5e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x2b7/0x740 security/tomoyo/file.c:822 security_path_chroot+0x86/0x250 security/security.c:2116 __do_sys_chroot fs/open.c:621 [inline] __se_sys_chroot+0x1c5/0x2b0 fs/open.c:604 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc900044b7000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900044b7080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900044b7100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc900044b7180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900044b7200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================