REISERFS (device loop0): Using tea hash to sort names REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 1) not found (pos 2) REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 1) not found (pos 2) REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 1) not found (pos 2) ================================================================== BUG: KASAN: use-after-free in reiserfs_release_objectid+0x510/0x770 fs/reiserfs/objectid.c:165 Read of size 7172 at addr ffff88807060b050 by task syz-executor.0/5635 CPU: 0 PID: 5635 Comm: syz-executor.0 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/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:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 kasan_check_range+0x27e/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+0x357/0x540 fs/reiserfs/super.c:542 reiserfs_evict_inode+0x362/0x470 fs/reiserfs/inode.c:91 evict+0x2a4/0x630 fs/inode.c:666 d_delete_notify include/linux/fsnotify.h:262 [inline] vfs_rmdir+0x385/0x4c0 fs/namei.c:4202 do_rmdir+0x3b5/0x580 fs/namei.c:4248 __do_sys_rmdir fs/namei.c:4267 [inline] __se_sys_rmdir fs/namei.c:4265 [inline] __x64_sys_rmdir+0x49/0x50 fs/namei.c:4265 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f60ef67cae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f60f03cf0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 00007f60ef79bf80 RCX: 00007f60ef67cae9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f60ef6c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f60ef79bf80 R15: 00007ffdc44abed8 The buggy address belongs to the physical page: page:ffffea0001c182c0 refcount:2 mapcount:0 mapping:ffff888148cc8878 index:0x10 pfn:0x7060b memcg:ffff88801f796000 aops:def_blk_aops ino:700000 flags: 0xfff0000002812c(referenced|uptodate|lru|active|private|mappedtodisk|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff0000002812c ffffea0001976bc8 ffffea0001bce8c8 ffff888148cc8878 raw: 0000000000000010 ffff888067a7ecb0 00000002ffffffff ffff88801f796000 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 5635, tgid 5634 (syz-executor.0), ts 92452213370, free_ts 92450620664 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x33ea/0x3570 mm/page_alloc.c:3312 __alloc_pages+0x255/0x680 mm/page_alloc.c:4568 alloc_pages_mpol+0x3de/0x640 mm/mempolicy.c:2133 alloc_pages mm/mempolicy.c:2204 [inline] folio_alloc+0x12a/0x330 mm/mempolicy.c:2211 filemap_alloc_folio+0xde/0x500 mm/filemap.c:974 __filemap_get_folio+0x431/0xbb0 mm/filemap.c:1918 grow_dev_page fs/buffer.c:1041 [inline] grow_buffers fs/buffer.c:1106 [inline] __getblk_slow fs/buffer.c:1133 [inline] bdev_getblk+0x243/0x6d0 fs/buffer.c:1429 __bread_gfp+0xac/0x420 fs/buffer.c:1474 sb_bread include/linux/buffer_head.h:324 [inline] read_super_block+0x91/0x800 fs/reiserfs/super.c:1604 reiserfs_fill_super+0x912/0x2620 fs/reiserfs/super.c:1966 mount_bdev+0x237/0x300 fs/super.c:1650 legacy_get_tree+0xef/0x190 fs/fs_context.c:662 vfs_get_tree+0x8c/0x2a0 fs/super.c:1771 do_new_mount+0x28f/0xae0 fs/namespace.c:3337 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3863 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x931/0xa60 mm/page_alloc.c:2347 free_unref_page_list+0x5a0/0x840 mm/page_alloc.c:2533 release_pages+0x2117/0x2400 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:392 exit_mmap+0x4d3/0xc60 mm/mmap.c:3321 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9b7/0x2750 kernel/exit.c:858 do_group_exit+0x206/0x2c0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1030 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88807060bf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807060bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807060c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807060c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807060c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================