================================================================== BUG: KASAN: use-after-free in inode2sd+0x61f/0xa30 fs/reiserfs/inode.c:1378 Write of size 2 at addr ffff88805ede346c by task syz.1.189/6554 CPU: 1 PID: 6554 Comm: syz.1.189 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/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 handle_truncate fs/namei.c:3316 [inline] do_open fs/namei.c:3663 [inline] path_openat+0x293b/0x2fb0 fs/namei.c:3793 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_creat fs/open.c:1347 [inline] __se_sys_creat fs/open.c:1341 [inline] __x64_sys_creat+0x8c/0xb0 fs/open.c:1341 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:0x7ff40f4efbe9 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:00007ff40e766028 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007ff40f6bdf80 RCX: 00007ff40f4efbe9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000940 RBP: 00007ff40f5732bf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff40f6bdf80 R15: 00007ffdd6ca7dc8 The buggy address belongs to the page: page:ffffea00017b78c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x5ede3 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea00015a9508 ffffea000185e008 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 6515, ts 186272825138, free_ts 186888176565 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/0xa50 fs/namespace.c:3060 do_mount fs/namespace.c:3431 [inline] __do_sys_mount fs/namespace.c:3639 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3616 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:184 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88805ede3300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805ede3380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805ede3400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805ede3480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805ede3500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================