================================================================== BUG: KASAN: slab-out-of-bounds in idempotent kernel/module/main.c:3078 [inline] BUG: KASAN: slab-out-of-bounds in init_module_from_file+0x62c/0x6a0 kernel/module/main.c:3124 Read of size 8 at addr ffff888020fa1db8 by task syz-executor.2/23201 CPU: 0 PID: 23201 Comm: syz-executor.2 Not tainted 6.4.0-next-20230703-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:364 print_report mm/kasan/report.c:475 [inline] kasan_report+0x11d/0x130 mm/kasan/report.c:588 idempotent kernel/module/main.c:3078 [inline] init_module_from_file+0x62c/0x6a0 kernel/module/main.c:3124 __do_sys_finit_module kernel/module/main.c:3171 [inline] __se_sys_finit_module kernel/module/main.c:3154 [inline] __x64_sys_finit_module+0xfd/0x190 kernel/module/main.c:3154 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd9dea8c389 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd9df6ff168 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 00007fd9debabf80 RCX: 00007fd9dea8c389 RDX: 0000000000000002 RSI: 0000000020000000 RDI: 0000000000000007 RBP: 00007fd9dead7493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdbfbc44bf R14: 00007fd9df6ff300 R15: 0000000000022000 Allocated by task 2: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:750 [inline] slab_alloc_node mm/slub.c:3470 [inline] kmem_cache_alloc_node+0x1c6/0x3e0 mm/slub.c:3515 alloc_task_struct_node kernel/fork.c:173 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x3c0/0x75c0 kernel/fork.c:2329 kernel_clone+0xeb/0x890 kernel/fork.c:2911 kernel_thread+0xc0/0x100 kernel/fork.c:2973 create_kthread kernel/kthread.c:412 [inline] kthreadd+0x50c/0x790 kernel/kthread.c:747 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff888020fa0000 which belongs to the cache task_struct of size 7360 The buggy address is located 248 bytes to the right of allocated 7360-byte region [ffff888020fa0000, ffff888020fa1cc0) The buggy address belongs to the physical page: page:ffffea000083e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20fa0 head:ffffea000083e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88804b39fac1 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888014674500 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88804b39fac1 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2, tgid 2 (kthreadd), ts 11993872334, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0xfd9/0x2c40 mm/page_alloc.c:3257 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4513 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1862 [inline] allocate_slab+0x25f/0x390 mm/slub.c:2009 new_slab mm/slub.c:2062 [inline] ___slab_alloc+0xbc3/0x15d0 mm/slub.c:3215 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314 __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] kmem_cache_alloc_node+0x13e/0x3e0 mm/slub.c:3515 alloc_task_struct_node kernel/fork.c:173 [inline] dup_task_struct kernel/fork.c:1104 [inline] copy_process+0x3c0/0x75c0 kernel/fork.c:2329 kernel_clone+0xeb/0x890 kernel/fork.c:2911 kernel_thread+0xc0/0x100 kernel/fork.c:2973 create_kthread kernel/kthread.c:412 [inline] kthreadd+0x50c/0x790 kernel/kthread.c:747 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page_owner free stack trace missing Memory state around the buggy address: ffff888020fa1c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888020fa1d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888020fa1d80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff888020fa1e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888020fa1e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================