REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop1): checking transaction log (loop1) REISERFS (device loop1): Using r5 hash to sort names REISERFS (device loop1): using 3.5.x disk format ================================================================== BUG: KASAN: use-after-free in bin_search_in_dir_item fs/reiserfs/namei.c:40 [inline] BUG: KASAN: use-after-free in search_by_entry_key+0x80b/0x940 fs/reiserfs/namei.c:165 Read of size 4 at addr ffff88804b8343b4 by task syz-executor.1/6358 CPU: 1 PID: 6358 Comm: syz-executor.1 Not tainted 6.7.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 bin_search_in_dir_item fs/reiserfs/namei.c:40 [inline] search_by_entry_key+0x80b/0x940 fs/reiserfs/namei.c:165 reiserfs_find_entry+0x1dc/0xe70 fs/reiserfs/namei.c:322 reiserfs_lookup+0x1f5/0x690 fs/reiserfs/namei.c:368 __lookup_slow+0x24d/0x450 fs/namei.c:1694 lookup_one_len+0x17d/0x1b0 fs/namei.c:2746 reiserfs_lookup_privroot+0x94/0x200 fs/reiserfs/xattr.c:977 reiserfs_fill_super+0x20f9/0x3160 fs/reiserfs/super.c:2174 mount_bdev+0x1f3/0x2e0 fs/super.c:1650 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8c/0x370 fs/super.c:1771 do_new_mount fs/namespace.c:3337 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3664 do_mount fs/namespace.c:3677 [inline] __do_sys_mount fs/namespace.c:3886 [inline] __se_sys_mount fs/namespace.c:3863 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3863 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f349a67e3ea Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f349b3b2ee8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f349b3b2f80 RCX: 00007f349a67e3ea RDX: 0000000020000540 RSI: 0000000020000140 RDI: 00007f349b3b2f40 RBP: 0000000020000540 R08: 00007f349b3b2f80 R09: 0000000000010000 R10: 0000000000010000 R11: 0000000000000202 R12: 0000000020000140 R13: 00007f349b3b2f40 R14: 0000000000001126 R15: 00000000200017c0 The buggy address belongs to the physical page: page:ffffea00012e0d00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x4b834 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffff7f(buddy) raw: 00fff00000000000 ffffea00012f3b08 ffffea00012d3508 0000000000000000 raw: 0000000000000001 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x152c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 5947, tgid 5943 (syz-executor.4), ts 223526160447, free_ts 225342130154 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 folio_alloc+0x1e/0xe0 mm/mempolicy.c:2211 filemap_alloc_folio+0x3bb/0x490 mm/filemap.c:974 page_cache_ra_unbounded+0x1ac/0x5f0 mm/readahead.c:247 do_page_cache_ra mm/readahead.c:299 [inline] page_cache_ra_order+0x72b/0xa80 mm/readahead.c:546 ondemand_readahead+0x493/0x1130 mm/readahead.c:668 page_cache_async_ra mm/readahead.c:717 [inline] page_cache_async_ra+0x123/0x150 mm/readahead.c:699 filemap_readahead mm/filemap.c:2472 [inline] filemap_get_pages+0x35a/0x1830 mm/filemap.c:2513 filemap_read+0x39b/0xcf0 mm/filemap.c:2593 generic_file_read_iter+0x346/0x450 mm/filemap.c:2781 ext4_file_read_iter+0x1dc/0x6c0 fs/ext4/file.c:147 __kernel_read+0x301/0x870 fs/read_write.c:428 integrity_kernel_read+0x7f/0xb0 security/integrity/iint.c:221 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+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page_list+0xe6/0xb40 mm/page_alloc.c:2533 release_pages+0x32a/0x14f0 mm/swap.c:1042 __folio_batch_release+0x77/0xe0 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] truncate_inode_pages_range+0x33e/0xf00 mm/truncate.c:371 ext4_evict_inode+0x2c7/0x1a40 fs/ext4/inode.c:193 evict+0x2ed/0x6b0 fs/inode.c:666 iput_final fs/inode.c:1777 [inline] iput.part.0+0x560/0x7b0 fs/inode.c:1803 iput+0x5c/0x80 fs/inode.c:1793 do_unlinkat+0x60f/0x740 fs/namei.c:4389 __do_sys_unlink fs/namei.c:4430 [inline] __se_sys_unlink fs/namei.c:4428 [inline] __x64_sys_unlink+0xc8/0x110 fs/namei.c:4428 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88804b834280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804b834300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88804b834380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804b834400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804b834480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================