================================================================== BUG: KASAN: use-after-free in inode2sd+0x61f/0xa30 fs/reiserfs/inode.c:1378 Write of size 2 at addr ffff888054b7bd88 by task syz.4.104/5892 CPU: 0 PID: 5892 Comm: syz.4.104 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 inode2sd+0x61f/0xa30 fs/reiserfs/inode.c:1378 update_stat_data fs/reiserfs/inode.c:1439 [inline] reiserfs_update_sd_size+0x909/0xde0 fs/reiserfs/inode.c:1505 reiserfs_update_sd fs/reiserfs/reiserfs.h:3099 [inline] reiserfs_do_truncate+0xd5b/0x12f0 fs/reiserfs/stree.c:2036 reiserfs_truncate_file+0x66e/0xe40 fs/reiserfs/inode.c:2318 reiserfs_setattr+0xac5/0x10d0 fs/reiserfs/inode.c:3409 notify_change+0xbc6/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 vfs_truncate+0x262/0x2f0 fs/open.c:111 do_sys_truncate+0xf2/0x1c0 fs/open.c:134 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7ff347249539 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff34688c028 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 00007ff3474b5090 RCX: 00007ff347249539 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00002000000000c0 RBP: 00007ff3472dcee0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff3474b5128 R14: 00007ff3474b5090 R15: 00007fff7093a0a8 The buggy address belongs to the page: page:ffffea000152dec0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x54b7b flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000152df88 ffffea0001511808 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 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 0x108c48(GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), pid 5847, ts 148799265200, free_ts 149673114647 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 __page_cache_alloc+0xce/0x440 mm/filemap.c:1022 pagecache_get_page+0x9b8/0xf20 mm/filemap.c:1940 find_or_create_page include/linux/pagemap.h:420 [inline] grow_dev_page fs/buffer.c:949 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x240/0xb20 fs/buffer.c:1336 __getblk include/linux/buffer_head.h:416 [inline] reiserfs_breada fs/reiserfs/journal.c:2335 [inline] journal_read+0x815/0x3890 fs/reiserfs/journal.c:2447 journal_init+0x18bb/0x22e0 fs/reiserfs/journal.c:2895 reiserfs_fill_super+0xdcb/0x2120 fs/reiserfs/super.c:2026 mount_bdev+0x28a/0x3c0 fs/super.c:1411 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1541 do_new_mount+0x247/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x119/0x830 mm/page_alloc.c:3433 release_pages+0x185f/0x1bd0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x335/0xf90 mm/truncate.c:329 kill_bdev block/bdev.c:77 [inline] blkdev_flush_mapping+0x188/0x360 block/bdev.c:655 blkdev_put_whole block/bdev.c:686 [inline] blkdev_put+0x4c3/0x780 block/bdev.c:953 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x426/0x4d0 fs/namespace.c:1148 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888054b7bc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888054b7bd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888054b7bd80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888054b7be00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888054b7be80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================