================================================================== BUG: KASAN: use-after-free in inode2sd+0x6c4/0xbc0 fs/reiserfs/inode.c:1378 Write of size 2 at addr ffff888054d74da0 by task syz.1.136/5688 CPU: 0 PID: 5688 Comm: syz.1.136 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x230 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+0x6c4/0xbc0 fs/reiserfs/inode.c:1378 update_stat_data fs/reiserfs/inode.c:1439 [inline] reiserfs_update_sd_size+0x914/0xe30 fs/reiserfs/inode.c:1505 reiserfs_update_sd fs/reiserfs/reiserfs.h:3099 [inline] reiserfs_do_truncate+0xe5a/0x13e0 fs/reiserfs/stree.c:2036 reiserfs_truncate_file+0x632/0xdc0 fs/reiserfs/inode.c:2318 reiserfs_setattr+0xaa7/0x1010 fs/reiserfs/inode.c:3409 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x197/0x220 fs/open.c:65 vfs_truncate+0x262/0x2f0 fs/open.c:111 do_sys_truncate+0xdc/0x190 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:0x7f8d880d5ec9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8d87724038 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 00007f8d8832d090 RCX: 00007f8d880d5ec9 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00002000000000c0 RBP: 00007f8d88158f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8d8832d128 R14: 00007f8d8832d090 R15: 00007ffc45054648 The buggy address belongs to the page: page:ffffea0001535d00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x54d74 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001535d48 ffffea00015342c8 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 5663, ts 143644027452, free_ts 144289377859 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487 __page_cache_alloc+0xd2/0x3f0 mm/filemap.c:1022 pagecache_get_page+0x986/0xef0 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+0x249/0xb70 fs/buffer.c:1336 __getblk include/linux/buffer_head.h:416 [inline] reiserfs_breada fs/reiserfs/journal.c:2335 [inline] journal_read+0x7ff/0x3800 fs/reiserfs/journal.c:2447 journal_init+0x1961/0x2360 fs/reiserfs/journal.c:2895 reiserfs_fill_super+0xc7f/0x23e0 fs/reiserfs/super.c:2026 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2d6/0x3c0 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+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x2f3/0xef0 mm/truncate.c:329 kill_bdev block/bdev.c:77 [inline] blkdev_flush_mapping+0x182/0x340 block/bdev.c:659 blkdev_put_whole block/bdev.c:690 [inline] blkdev_put+0x4d1/0x7d0 block/bdev.c:957 blkdev_close+0x76/0xa0 block/fops.c:478 __fput+0x234/0x930 fs/file_table.c:311 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: ffff888054d74c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888054d74d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888054d74d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888054d74e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888054d74e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================