REISERFS (device loop3): Using tea hash to sort names REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. ================================================================== BUG: KASAN: use-after-free in leaf_paste_in_buffer+0x578/0x9f0 Read of size 48 at addr ffff0000f38d9ff0 by task syz-executor.3/12116 CPU: 1 PID: 12116 Comm: syz-executor.3 Not tainted 6.1.90-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189 memcpy+0x48/0x90 mm/kasan/shadow.c:65 leaf_paste_in_buffer+0x578/0x9f0 leaf_copy_dir_entries+0x2b4/0xa04 fs/reiserfs/lbalance.c:108 leaf_copy_boundary_item+0x8c4/0x1a34 fs/reiserfs/lbalance.c:168 leaf_copy_items fs/reiserfs/lbalance.c:551 [inline] leaf_move_items+0xa0c/0x1f7c fs/reiserfs/lbalance.c:726 leaf_shift_left+0xc8/0x39c fs/reiserfs/lbalance.c:750 balance_leaf_when_delete_left fs/reiserfs/do_balan.c:194 [inline] balance_leaf_when_delete fs/reiserfs/do_balan.c:272 [inline] balance_leaf+0x2a70/0xe860 fs/reiserfs/do_balan.c:1393 do_balance+0x27c/0x788 fs/reiserfs/do_balan.c:1888 reiserfs_delete_item+0x994/0xde8 fs/reiserfs/stree.c:1371 direct2indirect+0x8b4/0x10f8 fs/reiserfs/tail_conversion.c:139 reiserfs_get_block+0x40c4/0x45d8 fs/reiserfs/inode.c:949 __block_write_begin_int+0x340/0x13b4 fs/buffer.c:1991 __block_write_begin+0x7c/0xa0 fs/buffer.c:2041 reiserfs_write_begin+0x328/0x71c fs/reiserfs/inode.c:2775 generic_perform_write+0x278/0x55c mm/filemap.c:3817 __generic_file_write_iter+0x168/0x388 mm/filemap.c:3945 generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:3977 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x610/0x914 fs/read_write.c:584 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the physical page: page:000000008fa6d57d refcount:3 mapcount:0 mapping:000000009515c934 index:0x214 pfn:0x1338d9 memcg:ffff0000d02c2000 aops:def_blk_aops ino:700003 flags: 0x5ffc40000002042(referenced|workingset|private|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc40000002042 0000000000000000 dead000000000122 ffff0000c0542910 raw: 0000000000000214 ffff0000fd2f4570 00000003ffffffff ffff0000d02c2000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f38d9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000f38d9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000f38da000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000f38da080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000f38da100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== REISERFS error (device loop3): vs-4010 is_reusable: block number is out of range 11822 (1024) REISERFS (device loop3): Remounting filesystem read-only REISERFS error (device loop3): vs-4010 is_reusable: block number is out of range 262180 (1024) REISERFS error (device loop3): vs-4010 is_reusable: block number is out of range 589868 (1024) REISERFS error (device loop3): vs-4080 _reiserfs_free_block: block 1: bit already cleared ------------[ cut here ]------------ WARNING: CPU: 1 PID: 12116 at fs/reiserfs/journal.c:3397 journal_end+0x1a4/0x260 Modules linked in: CPU: 1 PID: 12116 Comm: syz-executor.3 Tainted: G B 6.1.90-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : journal_end+0x1a4/0x260 lr : journal_end+0x1a0/0x260 sp : ffff8000230c75c0 x29: ffff8000230c75c0 x28: dfff800000000000 x27: 1ffff00004618ed2 x26: 1fffe0001a15a5b8 x25: 1ffff00004618ed0 x24: dfff800000000000 x23: ffff8000230c7680 x22: 0000000000000000 x21: ffff8000230c7694 x20: ffff0000d0ad2dc0 x19: ffff8000230c7680 x18: ffff8000230c6d7e x17: ffff80001583d000 x16: ffff8000120a7780 x15: 0000000000000002 x14: 0000000000006000 x13: ffff0000d0ad1bc0 x12: 0000000000040000 x11: 000000000003ffff x10: ffff80001e855000 x9 : ffff800008db4a70 x8 : 0000000000040000 x7 : 0000000000000000 x6 : ffff800008dcec54 x5 : 0000000000000000 x4 : 0000000000000008 x3 : 0000000000000020 x2 : 0000000000000008 x1 : 0000000000000000 x0 : 00000000fffffffb Call trace: journal_end+0x1a4/0x260 reiserfs_truncate_file+0x51c/0xb1c fs/reiserfs/inode.c:2311 reiserfs_truncate_failed_write fs/reiserfs/inode.c:2743 [inline] reiserfs_write_end+0x640/0x800 fs/reiserfs/inode.c:2958 generic_perform_write+0x384/0x55c mm/filemap.c:3828 __generic_file_write_iter+0x168/0x388 mm/filemap.c:3945 generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:3977 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x610/0x914 fs/read_write.c:584 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 irq event stamp: 46859 hardirqs last enabled at (46859): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline] hardirqs last enabled at (46859): [] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5004 hardirqs last disabled at (46858): [] __schedule+0x2a4/0x1c98 kernel/sched/core.c:6457 softirqs last enabled at (46254): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (46252): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 ---[ end trace 0000000000000000 ]---