================================================================== 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 ffff8880743121f1 by task syz-executor.0/8038 CPU: 0 PID: 8038 Comm: syz-executor.0 Not tainted 6.4.0-next-20230707-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/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 evict_folios+0x794/0x1940 mm/vmscan.c:5181 try_to_shrink_lruvec+0x82c/0xb90 mm/vmscan.c:5357 lru_gen_shrink_lruvec mm/vmscan.c:5494 [inline] shrink_lruvec+0x216/0x2810 mm/vmscan.c:6269 shrink_node_memcgs mm/vmscan.c:6489 [inline] shrink_node+0x7ad/0x3690 mm/vmscan.c:6524 shrink_zones mm/vmscan.c:6763 [inline] do_try_to_free_pages+0x3cc/0x18f0 mm/vmscan.c:6825 try_to_free_mem_cgroup_pages+0x368/0x840 mm/vmscan.c:7140 try_charge_memcg+0x508/0x13b0 mm/memcontrol.c:2695 obj_cgroup_charge_pages mm/memcontrol.c:3109 [inline] __memcg_kmem_charge_page+0x16e/0x3c0 mm/memcontrol.c:3135 __alloc_pages+0x1f3/0x4a0 mm/page_alloc.c:4529 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_pages_node include/linux/gfp.h:260 [inline] bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline] bpf_ringbuf_alloc kernel/bpf/ringbuf.c:170 [inline] ringbuf_map_alloc kernel/bpf/ringbuf.c:204 [inline] ringbuf_map_alloc+0x2a9/0x7d0 kernel/bpf/ringbuf.c:186 map_create+0x548/0x1940 kernel/bpf/syscall.c:1206 __sys_bpf+0x140e/0x5450 kernel/bpf/syscall.c:5119 __do_sys_bpf kernel/bpf/syscall.c:5241 [inline] __se_sys_bpf kernel/bpf/syscall.c:5239 [inline] __x64_sys_bpf+0x79/0xc0 kernel/bpf/syscall.c:5239 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:0x7f47aba8c389 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:00007f47ac7a7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f47abbabf80 RCX: 00007f47aba8c389 RDX: 0000000000000048 RSI: 00000000200007c0 RDI: 0000000000000000 RBP: 00007f47abad7493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc24fd95af R14: 00007f47ac7a7300 R15: 0000000000022000 Allocated by task 5082: 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:762 [inline] slab_alloc_node mm/slub.c:3470 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x173/0x390 mm/slub.c:3494 anon_vma_alloc mm/rmap.c:94 [inline] anon_vma_fork+0xe2/0x630 mm/rmap.c:361 dup_mmap+0xc0f/0x14b0 kernel/fork.c:732 dup_mm kernel/fork.c:1694 [inline] copy_mm kernel/fork.c:1743 [inline] copy_process+0x6663/0x75c0 kernel/fork.c:2509 kernel_clone+0xeb/0x890 kernel/fork.c:2917 __do_sys_clone+0xba/0x100 kernel/fork.c:3060 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 The buggy address belongs to the object at ffff888074312110 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 [ffff888074312110, ffff8880743121e0) The buggy address belongs to the physical page: page:ffffea0001d0c480 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888074312ee0 pfn:0x74312 memcg:ffff888017fd4a01 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888014674140 ffffea0001ec9d40 dead000000000004 raw: ffff888074312ee0 00000000800f000a 00000001ffffffff ffff888017fd4a01 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 77675363663, free_ts 64285606827 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+0x371/0x390 mm/slub.c:3494 anon_vma_alloc mm/rmap.c:94 [inline] anon_vma_fork+0xe2/0x630 mm/rmap.c:361 dup_mmap+0xc0f/0x14b0 kernel/fork.c:732 dup_mm kernel/fork.c:1694 [inline] copy_mm kernel/fork.c:1743 [inline] copy_process+0x6663/0x75c0 kernel/fork.c:2509 kernel_clone+0xeb/0x890 kernel/fork.c:2917 __do_sys_clone+0xba/0x100 kernel/fork.c:3060 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 __folio_put_small mm/swap.c:106 [inline] __folio_put+0xc5/0x140 mm/swap.c:129 folio_put include/linux/mm.h:1494 [inline] put_page include/linux/mm.h:1563 [inline] anon_pipe_buf_release+0x3fb/0x4c0 fs/pipe.c:138 pipe_buf_release include/linux/pipe_fs_i.h:203 [inline] pipe_read+0x620/0x1180 fs/pipe.c:324 call_read_iter include/linux/fs.h:1867 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x796/0x8d0 fs/read_write.c:470 ksys_read+0x1e3/0x250 fs/read_write.c:613 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 Memory state around the buggy address: ffff888074312080: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff888074312100: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888074312180: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff888074312200: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ffff888074312280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ==================================================================