------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/f2fs/f2fs.h:3292:19 index 18446744073709500059 is out of range for type '__le32[923]' (aka 'unsigned int[923]') CPU: 1 UID: 0 PID: 7283 Comm: syz.1.121 Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:429 inline_xattr_addr+0x524/0x530 fs/f2fs/f2fs.h:3292 read_inline_xattr fs/f2fs/xattr.c:289 [inline] lookup_all_xattrs fs/f2fs/xattr.c:341 [inline] f2fs_getxattr+0x5b4/0x1064 fs/f2fs/xattr.c:533 f2fs_xattr_generic_get+0x130/0x174 fs/f2fs/xattr.c:63 __vfs_getxattr+0x394/0x3c0 fs/xattr.c:423 smk_fetch+0xc8/0x150 security/smack/smack_lsm.c:306 smack_d_instantiate+0x594/0x880 security/smack/smack_lsm.c:3615 security_d_instantiate+0x100/0x204 security/security.c:4070 d_splice_alias+0x70/0x310 fs/dcache.c:3001 f2fs_lookup+0x4c8/0x948 fs/f2fs/namei.c:523 lookup_one_qstr_excl+0x108/0x230 fs/namei.c:1692 filename_create+0x230/0x468 fs/namei.c:4081 do_mkdirat+0xac/0x574 fs/namei.c:4326 __do_sys_mkdirat fs/namei.c:4349 [inline] __se_sys_mkdirat fs/namei.c:4347 [inline] __arm64_sys_mkdirat+0x8c/0xa4 fs/namei.c:4347 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 ---[ end trace ]--- ================================================================== BUG: KASAN: slab-out-of-bounds in read_inline_xattr fs/f2fs/xattr.c:291 [inline] BUG: KASAN: slab-out-of-bounds in lookup_all_xattrs fs/f2fs/xattr.c:341 [inline] BUG: KASAN: slab-out-of-bounds in f2fs_getxattr+0x5c8/0x1064 fs/f2fs/xattr.c:533 Read of size 209920 at addr ffff0000d3d65bd4 by task syz.1.121/7283 CPU: 1 UID: 0 PID: 7283 Comm: syz.1.121 Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 kasan_check_range+0x268/0x2a8 mm/kasan/generic.c:189 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105 read_inline_xattr fs/f2fs/xattr.c:291 [inline] lookup_all_xattrs fs/f2fs/xattr.c:341 [inline] f2fs_getxattr+0x5c8/0x1064 fs/f2fs/xattr.c:533 f2fs_xattr_generic_get+0x130/0x174 fs/f2fs/xattr.c:63 __vfs_getxattr+0x394/0x3c0 fs/xattr.c:423 smk_fetch+0xc8/0x150 security/smack/smack_lsm.c:306 smack_d_instantiate+0x594/0x880 security/smack/smack_lsm.c:3615 security_d_instantiate+0x100/0x204 security/security.c:4070 d_splice_alias+0x70/0x310 fs/dcache.c:3001 f2fs_lookup+0x4c8/0x948 fs/f2fs/namei.c:523 lookup_one_qstr_excl+0x108/0x230 fs/namei.c:1692 filename_create+0x230/0x468 fs/namei.c:4081 do_mkdirat+0xac/0x574 fs/namei.c:4326 __do_sys_mkdirat fs/namei.c:4349 [inline] __se_sys_mkdirat fs/namei.c:4347 [inline] __arm64_sys_mkdirat+0x8c/0xa4 fs/namei.c:4347 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Allocated by task 6034: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:568 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x74/0x8c mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4104 [inline] slab_alloc_node mm/slub.c:4153 [inline] kmem_cache_alloc_noprof+0x254/0x410 mm/slub.c:4160 lsm_inode_alloc security/security.c:755 [inline] security_inode_alloc+0x34/0x32c security/security.c:1691 inode_init_always_gfp+0x730/0xc00 fs/inode.c:306 inode_init_always include/linux/fs.h:3121 [inline] alloc_inode+0x80/0x19c fs/inode.c:343 iget_locked+0x184/0x814 fs/inode.c:1487 kernfs_get_inode+0x58/0x658 fs/kernfs/inode.c:251 kernfs_iop_lookup+0x248/0x358 fs/kernfs/dir.c:1214 lookup_open fs/namei.c:3627 [inline] open_last_lookups fs/namei.c:3748 [inline] path_openat+0xf7c/0x2b14 fs/namei.c:3984 do_filp_open+0x1e8/0x404 fs/namei.c:4014 do_sys_openat2+0x124/0x1b8 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_openat fs/open.c:1433 [inline] __se_sys_openat fs/open.c:1428 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1428 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at ffff0000d3d65bd0 which belongs to the cache lsm_inode_cache of size 104 The buggy address is located 4 bytes inside of allocated 104-byte region [ffff0000d3d65bd0, ffff0000d3d65c38) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113d65 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c18953c0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000180018 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d3d65b00: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ffff0000d3d65b80: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 >ffff0000d3d65c00: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 ^ ffff0000d3d65c80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff0000d3d65d00: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================