REISERFS (device loop0): Using tea hash to sort names REISERFS (device loop0): 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 ffff0000f6728ff0 by task syz-executor.0/6737 CPU: 1 PID: 6737 Comm: syz-executor.0 Not tainted 6.1.89-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:000000004c0c5db9 refcount:3 mapcount:0 mapping:00000000f4d3d1d8 index:0x225 pfn:0x136728 memcg:ffff0000ce260000 aops:def_blk_aops ino:700000 flags: 0x5ffe20000002042(referenced|workingset|private|node=0|zone=2|lastcpupid=0xfff) raw: 05ffe20000002042 0000000000000000 dead000000000122 ffff0000c0494a10 raw: 0000000000000225 ffff0000f1888740 00000003ffffffff ffff0000ce260000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f6728f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000f6728f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000f6729000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000f6729080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000f6729100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== REISERFS error (device loop0): vs-4010 is_reusable: block number is out of range 11822 (1024) REISERFS (device loop0): Remounting filesystem read-only REISERFS error (device loop0): vs-4010 is_reusable: block number is out of range 262180 (1024) REISERFS error (device loop0): vs-4010 is_reusable: block number is out of range 589868 (1024) REISERFS error (device loop0): vs-4080 _reiserfs_free_block: block 1: bit already cleared ------------[ cut here ]------------ WARNING: CPU: 0 PID: 6737 at fs/reiserfs/journal.c:3397 journal_end+0x1a4/0x260 Modules linked in: CPU: 0 PID: 6737 Comm: syz-executor.0 Tainted: G B 6.1.89-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 pstate: 60401005 (nZCv daif +PAN -UAO -TCO -DIT +SSBS BTYPE=--) pc : journal_end+0x1a4/0x260 lr : journal_end+0x1a0/0x260 sp : ffff80001dbc75c0 x29: ffff80001dbc75c0 x28: dfff800000000000 x27: 1ffff00003b78ed2 x26: 1fffe00019dfb240 x25: 1ffff00003b78ed0 x24: dfff800000000000 x23: ffff80001dbc7680 x22: 0000000000000000 x21: ffff80001dbc7694 x20: ffff0000cefd9200 x19: ffff80001dbc7680 x18: ffff80001dbc6d7e x17: ffff80001584d000 x16: ffff8000120ade80 x15: 0000000000000002 x14: 0000000000006000 x13: ffff0000cefd8000 x12: 0000000000040000 x11: 000000000003ffff x10: ffff800029dba000 x9 : ffff800008db8afc x8 : 0000000000040000 x7 : 0000000000000000 x6 : ffff800008dd2ce0 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: 41459 hardirqs last enabled at (41459): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline] hardirqs last enabled at (41459): [] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5004 hardirqs last disabled at (41458): [] __schedule+0x2a4/0x1c98 kernel/sched/core.c:6457 softirqs last enabled at (40710): [] softirq_handle_end kernel/softirq.c:414 [inline] softirqs last enabled at (40710): [] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600 softirqs last disabled at (40681): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 ---[ end trace 0000000000000000 ]---