================================================================== 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_release_always include/linux/pagemap.h:279 [inline] BUG: KASAN: slab-out-of-bounds in folio_needs_release mm/internal.h:187 [inline] BUG: KASAN: slab-out-of-bounds in shrink_folio_list+0x2dbf/0x3e60 mm/vmscan.c:2067 Read of size 8 at addr ffff88807a913851 by task syz-executor256/5030 CPU: 0 PID: 5030 Comm: syz-executor256 Not tainted 6.4.0-next-20230705-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 check_region_inline mm/kasan/generic.c:181 [inline] kasan_check_range+0xf0/0x190 mm/kasan/generic.c:187 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] mapping_release_always include/linux/pagemap.h:279 [inline] folio_needs_release mm/internal.h:187 [inline] shrink_folio_list+0x2dbf/0x3e60 mm/vmscan.c:2067 reclaim_folio_list+0xd0/0x390 mm/vmscan.c:2801 reclaim_pages+0x442/0x670 mm/vmscan.c:2837 madvise_cold_or_pageout_pte_range+0x1017/0x1ef0 mm/madvise.c:533 walk_pmd_range mm/pagewalk.c:140 [inline] walk_pud_range mm/pagewalk.c:218 [inline] walk_p4d_range mm/pagewalk.c:253 [inline] walk_pgd_range+0x9e7/0x1470 mm/pagewalk.c:290 __walk_page_range+0x660/0x790 mm/pagewalk.c:392 walk_page_range+0x311/0x4a0 mm/pagewalk.c:490 madvise_pageout_page_range mm/madvise.c:591 [inline] madvise_pageout+0x304/0x570 mm/madvise.c:618 madvise_vma_behavior+0x626/0x21d0 mm/madvise.c:1039 madvise_walk_vmas+0x1c7/0x2b0 mm/madvise.c:1268 do_madvise.part.0+0x274/0x5c0 mm/madvise.c:1448 do_madvise mm/madvise.c:1461 [inline] __do_sys_madvise mm/madvise.c:1461 [inline] __se_sys_madvise mm/madvise.c:1459 [inline] __x64_sys_madvise+0x117/0x150 mm/madvise.c:1459 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:0x7f193474cca9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc27320a18 EFLAGS: 00000246 ORIG_RAX: 000000000000001c RAX: ffffffffffffffda RBX: 00007f19347baed0 RCX: 00007f193474cca9 RDX: 0000000000000015 RSI: 0000000000800000 RDI: 000000002042f000 RBP: 00007ffc27320a38 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000023a R11: 0000000000000246 R12: 00007ffc27320a40 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the object at ffff88807a913770 which belongs to the cache anon_vma of size 208 The buggy address is located 17 bytes to the right of allocated 208-byte region [ffff88807a913770, ffff88807a913840) The buggy address belongs to the physical page: page:ffffea0001ea44c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a913 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888014674140 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800f000f 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 4479, tgid 4479 (udevd), ts 82698314344, free_ts 59876387598 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1569 prep_new_page mm/page_alloc.c:1576 [inline] get_page_from_freelist+0xfd9/0x2c40 mm/page_alloc.c:3256 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4512 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] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x365/0x380 mm/slub.c:3494 anon_vma_alloc mm/rmap.c:94 [inline] anon_vma_fork+0xe2/0x630 mm/rmap.c:361 dup_mmap+0xfd9/0x19b0 kernel/fork.c:726 dup_mm kernel/fork.c:1688 [inline] copy_mm kernel/fork.c:1737 [inline] copy_process+0x6663/0x75c0 kernel/fork.c:2503 kernel_clone+0xeb/0x890 kernel/fork.c:2911 __do_sys_clone+0xba/0x100 kernel/fork.c:3054 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1160 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2383 free_unref_page+0x33/0x370 mm/page_alloc.c:2478 __unfreeze_partials+0x1fe/0x220 mm/slub.c:2647 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 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+0x1ce/0x350 mm/slub.c:3509 __do_kmalloc_node mm/slab_common.c:984 [inline] __kmalloc+0x4e/0x190 mm/slab_common.c:998 kmalloc include/linux/slab.h:586 [inline] tomoyo_add_entry security/tomoyo/common.c:2022 [inline] tomoyo_supervisor+0x48d/0xec0 security/tomoyo/common.c:2094 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x183/0x200 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x1498/0x1ff0 security/tomoyo/domain.c:879 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:101 [inline] tomoyo_bprm_check_security+0x139/0x1d0 security/tomoyo/tomoyo.c:91 security_bprm_check+0x49/0xb0 security/security.c:1102 search_binary_handler fs/exec.c:1726 [inline] exec_binprm fs/exec.c:1780 [inline] bprm_execve fs/exec.c:1855 [inline] bprm_execve+0x740/0x1980 fs/exec.c:1811 do_execveat_common+0x72c/0x8e0 fs/exec.c:1963 do_execve fs/exec.c:2037 [inline] __do_sys_execve fs/exec.c:2113 [inline] __se_sys_execve fs/exec.c:2108 [inline] __x64_sys_execve+0x93/0xc0 fs/exec.c:2108 Memory state around the buggy address: ffff88807a913700: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff88807a913780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807a913800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807a913880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807a913900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================