================================================================== BUG: KASAN: use-after-free in __ext4_iget+0x254/0x31c4 fs/ext4/inode.c:4641 Read of size 8 at addr ffff0000e9570c80 by task syz-executor.4/8041 CPU: 0 PID: 8041 Comm: syz-executor.4 Not tainted 5.15.153-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 __ext4_iget+0x254/0x31c4 fs/ext4/inode.c:4641 ext4_fill_super+0x690c/0x8768 fs/ext4/super.c:4832 mount_bdev+0x274/0x370 fs/super.c:1387 ext4_mount+0x44/0x58 fs/ext4/super.c:6582 legacy_get_tree+0xd4/0x16c fs/fs_context.c:611 vfs_get_tree+0x90/0x274 fs/super.c:1517 do_new_mount+0x278/0x8fc fs/namespace.c:3005 path_mount+0x594/0x101c fs/namespace.c:3335 do_mount fs/namespace.c:3348 [inline] __do_sys_mount fs/namespace.c:3556 [inline] __se_sys_mount fs/namespace.c:3533 [inline] __arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3533 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Allocated by task 6086: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x8c/0xcc mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x74/0x3f4 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x1dc/0x45c mm/slub.c:3233 reiserfs_alloc_inode+0x24/0xbc fs/reiserfs/super.c:642 alloc_inode fs/inode.c:236 [inline] new_inode_pseudo+0x68/0x200 fs/inode.c:937 new_inode+0x38/0x174 fs/inode.c:966 reiserfs_create+0x174/0x5a4 fs/reiserfs/namei.c:643 xattr_create fs/reiserfs/xattr.c:69 [inline] xattr_lookup+0x1c4/0x268 fs/reiserfs/xattr.c:412 reiserfs_xattr_set_handle+0xe4/0xc10 fs/reiserfs/xattr.c:540 reiserfs_xattr_set+0x398/0x4b0 fs/reiserfs/xattr.c:640 trusted_set+0x98/0xec fs/reiserfs/xattr_trusted.c:31 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x1a8/0x344 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x250/0x2b4 fs/xattr.c:611 path_setxattr+0x17c/0x258 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:649 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x118/0xb40 kernel/rcu/tree.c:3087 destroy_inode fs/inode.c:291 [inline] evict+0x5fc/0x68c fs/inode.c:602 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 dentry_unlink_inode+0x370/0x4b0 fs/dcache.c:376 d_delete+0xa4/0x18c fs/dcache.c:2506 xattr_unlink fs/reiserfs/xattr.c:96 [inline] delete_one_xattr+0x264/0x2c8 fs/reiserfs/xattr.c:340 reiserfs_for_each_xattr+0x350/0x8d8 fs/reiserfs/xattr.c:278 reiserfs_delete_xattrs+0x2c/0xa4 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x1dc/0x3f0 fs/reiserfs/inode.c:53 evict+0x260/0x68c fs/inode.c:587 iput_final fs/inode.c:1705 [inline] iput+0x744/0x824 fs/inode.c:1731 dentry_unlink_inode+0x370/0x4b0 fs/dcache.c:376 __dentry_kill+0x324/0x5e4 fs/dcache.c:582 dentry_kill+0xc8/0x250 dput+0x21c/0x458 fs/dcache.c:889 path_put+0x3c/0x68 fs/namei.c:559 path_setxattr+0x1a0/0x258 fs/xattr.c:634 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:649 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Second to last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x118/0xb40 kernel/rcu/tree.c:3087 destroy_inode fs/inode.c:291 [inline] evict+0x5fc/0x68c fs/inode.c:602 dispose_list fs/inode.c:620 [inline] evict_inodes+0x4b4/0x74c fs/inode.c:664 generic_shutdown_super+0x9c/0x29c fs/super.c:454 kill_block_super+0x70/0xdc fs/super.c:1414 reiserfs_kill_sb+0x134/0x14c fs/reiserfs/super.c:570 deactivate_locked_super+0xb8/0x13c fs/super.c:335 deactivate_super+0x108/0x128 fs/super.c:366 cleanup_mnt+0x3c0/0x474 fs/namespace.c:1143 __cleanup_mnt+0x20/0x30 fs/namespace.c:1150 task_work_run+0x130/0x1e4 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x262c/0x32b8 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the object at ffff0000e95706a0 which belongs to the cache reiser_inode_cache of size 1568 The buggy address is located 1504 bytes inside of 1568-byte region [ffff0000e95706a0, ffff0000e9570cc0) The buggy address belongs to the page: page:00000000d907dfdc refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000e9572120 pfn:0x129570 head:00000000d907dfdc order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff0000cfcd9001 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 0000000100000001 ffff0000c6207500 raw: ffff0000e9572120 0000000080130001 00000001ffffffff ffff0000cfcd9001 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e9570b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000e9570c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000e9570c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff0000e9570d00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff0000e9570d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs (loop4): corrupt root inode, run e2fsck EXT4-fs (loop4): mount failed netlink: 8 bytes leftover after parsing attributes in process `syz-executor.4'. netlink: 36 bytes leftover after parsing attributes in process `syz-executor.4'.