================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-out-of-bounds in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: slab-out-of-bounds in mapping_inaccessible include/linux/pagemap.h:335 [inline] BUG: KASAN: slab-out-of-bounds in move_to_new_folio+0x201/0xc20 mm/migrate.c:1050 Read of size 8 at addr ffff888024d4abf8 by task syz.9.3243/26628 CPU: 0 UID: 0 PID: 26628 Comm: syz.9.3243 Not tainted 6.13.0-rc3-syzkaller-00073-geabcdba3ad40 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/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:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] mapping_inaccessible include/linux/pagemap.h:335 [inline] move_to_new_folio+0x201/0xc20 mm/migrate.c:1050 migrate_folio_move mm/migrate.c:1368 [inline] migrate_pages_batch+0x1d1b/0x2a90 mm/migrate.c:1899 migrate_pages_sync mm/migrate.c:1965 [inline] migrate_pages+0x1d57/0x3380 mm/migrate.c:2074 compact_zone+0x3404/0x4ac0 mm/compaction.c:2641 compact_node mm/compaction.c:2910 [inline] compact_nodes mm/compaction.c:2932 [inline] sysctl_compaction_handler+0x496/0x990 mm/compaction.c:2983 proc_sys_call_handler+0x5ec/0x920 fs/proc/proc_sysctl.c:601 aio_write+0x56b/0x7c0 fs/aio.c:1633 io_submit_one+0x8a7/0x18a0 fs/aio.c:2052 __do_sys_io_submit fs/aio.c:2111 [inline] __se_sys_io_submit+0x171/0x2e0 fs/aio.c:2081 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 RIP: 0033:0x7fc957b85d29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc9588e3038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 00007fc957d75fa0 RCX: 00007fc957b85d29 RDX: 0000000020000340 RSI: 0000000000000001 RDI: 00007fc9588c2000 RBP: 00007fc957c01aa8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fc957d75fa0 R15: 00007fc957e9fa28 Allocated by task 25328: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4298 [inline] __kmalloc_node_noprof+0x290/0x4d0 mm/slub.c:4304 __kvmalloc_node_noprof+0x72/0x190 mm/util.c:650 kvmalloc_array_node_noprof include/linux/slab.h:1063 [inline] alloc_fdtable+0xdf/0x2a0 fs/file.c:198 dup_fd+0xa65/0xd40 fs/file.c:399 copy_files+0xc8/0x120 kernel/fork.c:1798 copy_process+0x16e6/0x3d50 kernel/fork.c:2383 kernel_clone+0x226/0x8e0 kernel/fork.c:2807 __do_sys_clone kernel/fork.c:2950 [inline] __se_sys_clone kernel/fork.c:2934 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2934 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 Freed by task 26328: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4613 [inline] kfree+0x196/0x430 mm/slub.c:4761 __free_fdtable fs/file.c:99 [inline] put_files_struct+0x284/0x310 fs/file.c:484 do_exit+0xa10/0x28e0 kernel/exit.c:933 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 get_signal+0x16b2/0x1750 kernel/signal.c:3017 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888024d4a000 which belongs to the cache kmalloc-cg-2k of size 2048 The buggy address is located 1016 bytes to the right of allocated 2048-byte region [ffff888024d4a000, ffff888024d4a800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24d48 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801baff780 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000070007 00000001f5000000 0000000000000000 head: 00fff00000000040 ffff88801baff780 dead000000000122 0000000000000000 head: 0000000000000000 0000000000070007 00000001f5000000 0000000000000000 head: 00fff00000000003 ffffea0000935201 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 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 26642, tgid 26642 (sed), ts 858922193491, free_ts 858801024267 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269 alloc_slab_page+0x6a/0x110 mm/slub.c:2423 allocate_slab+0x5a/0x2b0 mm/slub.c:2589 new_slab mm/slub.c:2642 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3830 __slab_alloc+0x58/0xa0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] kmem_cache_alloc_noprof+0x268/0x380 mm/slub.c:4175 getname_flags+0xb7/0x540 fs/namei.c:139 getname_maybe_null include/linux/fs.h:2796 [inline] vfs_fstatat+0x3f/0x130 fs/stat.c:361 __do_sys_newfstatat fs/stat.c:530 [inline] __se_sys_newfstatat fs/stat.c:524 [inline] __x64_sys_newfstatat+0x11d/0x1a0 fs/stat.c:524 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 26639 tgid 26639 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xd3f/0x1010 mm/page_alloc.c:2657 __slab_free+0x2c2/0x380 mm/slub.c:4524 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:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4175 vm_area_dup+0x27/0x290 kernel/fork.c:487 __split_vma+0x1cb/0xc50 mm/vma.c:434 split_vma mm/vma.c:510 [inline] vma_modify+0x244/0x330 mm/vma.c:1528 vma_modify_flags+0x3a5/0x430 mm/vma.c:1546 mprotect_fixup+0x45a/0xaa0 mm/mprotect.c:666 do_mprotect_pkey+0x8d7/0xd70 mm/mprotect.c:840 __do_sys_mprotect mm/mprotect.c:861 [inline] __se_sys_mprotect mm/mprotect.c:858 [inline] __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:858 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: ffff888024d4aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888024d4ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888024d4ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888024d4ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888024d4ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================