================================================================== BUG: KASAN: use-after-free in reiserfs_release_objectid+0x510/0x770 fs/reiserfs/objectid.c:165 Read of size 131040 at addr ffff88803f875070 by task syz-executor.1/18649 CPU: 1 PID: 18649 Comm: syz-executor.1 Not tainted 6.3.0-rc4-syzkaller-00224-g00c7b5f4ddc5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x163/0x540 mm/kasan/report.c:430 kasan_report+0x176/0x1b0 mm/kasan/report.c:536 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187 __asan_memmove+0x29/0x70 mm/kasan/shadow.c:94 reiserfs_release_objectid+0x510/0x770 fs/reiserfs/objectid.c:165 remove_save_link_only fs/reiserfs/super.c:207 [inline] finish_unfinished+0xbf4/0x15c0 fs/reiserfs/super.c:331 reiserfs_remount+0x1291/0x18f0 fs/reiserfs/super.c:1584 reconfigure_super+0x3c9/0x7c0 fs/super.c:956 vfs_fsconfig_locked fs/fsopen.c:254 [inline] __do_sys_fsconfig fs/fsopen.c:439 [inline] __se_sys_fsconfig+0xa29/0xf70 fs/fsopen.c:314 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fdcf0c8c0f9 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:00007fdcf195b168 EFLAGS: 00000246 ORIG_RAX: 00000000000001af RAX: ffffffffffffffda RBX: 00007fdcf0dabf80 RCX: 00007fdcf0c8c0f9 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000004 RBP: 00007fdcf0ce7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcb88a5c0f R14: 00007fdcf195b300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0000fe1d40 refcount:2 mapcount:0 mapping:ffff88801bcbbef8 index:0x10 pfn:0x3f875 memcg:ffff88802aa70000 aops:def_blk_aops ino:700001 flags: 0xfff0000002203e(referenced|uptodate|dirty|lru|active|private|mappedtodisk|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000002203e ffffea0000fe1d08 ffffea0001333f48 ffff88801bcbbef8 raw: 0000000000000010 ffff8880323f8828 00000002ffffffff ffff88802aa70000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x148c48(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 18649, tgid 18648 (syz-executor.1), ts 994029228974, free_ts 896815306571 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x3246/0x33c0 mm/page_alloc.c:4326 __alloc_pages+0x255/0x670 mm/page_alloc.c:5592 folio_alloc+0x1e/0x60 mm/mempolicy.c:2293 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 __filemap_get_folio+0x719/0xe50 mm/filemap.c:1970 pagecache_get_page+0x2c/0x240 mm/folio-compat.c:99 find_or_create_page include/linux/pagemap.h:632 [inline] grow_dev_page fs/buffer.c:989 [inline] grow_buffers fs/buffer.c:1054 [inline] __getblk_slow fs/buffer.c:1081 [inline] __getblk_gfp+0x215/0xa40 fs/buffer.c:1376 __bread_gfp+0x2e/0x380 fs/buffer.c:1410 sb_bread include/linux/buffer_head.h:341 [inline] read_super_block+0x91/0x800 fs/reiserfs/super.c:1604 reiserfs_fill_super+0x912/0x2620 fs/reiserfs/super.c:1966 mount_bdev+0x271/0x3a0 fs/super.c:1380 legacy_get_tree+0xef/0x190 fs/fs_context.c:610 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3042 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1454 [inline] free_pcp_prepare mm/page_alloc.c:1504 [inline] free_unref_page_prepare+0xe2f/0xe70 mm/page_alloc.c:3388 free_unref_page_list+0x596/0x830 mm/page_alloc.c:3529 release_pages+0x219e/0x2470 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:97 [inline] tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu+0x100/0x210 mm/mmu_gather.c:299 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:391 zap_page_range_single+0x453/0x510 mm/memory.c:1729 madvise_dontneed_single_vma mm/madvise.c:803 [inline] madvise_dontneed_free mm/madvise.c:896 [inline] madvise_vma_behavior mm/madvise.c:1035 [inline] madvise_walk_vmas mm/madvise.c:1260 [inline] do_madvise+0x23ff/0x4680 mm/madvise.c:1439 __do_sys_madvise mm/madvise.c:1452 [inline] __se_sys_madvise mm/madvise.c:1450 [inline] __x64_sys_madvise+0xa5/0xb0 mm/madvise.c:1450 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88803f877f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803f877f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803f878000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88803f878080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803f878100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================