loop0: detected capacity change from 0 to 2048 ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/nilfs2/dir.c:257:18 index 15 is out of range for type 'unsigned char[15]' CPU: 0 PID: 6242 Comm: syz-executor268 Not tainted 6.9.0-rc3-syzkaller-gb5d2afe8745b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:415 nilfs_set_de_type fs/nilfs2/dir.c:257 [inline] nilfs_add_link+0xb64/0xc10 fs/nilfs2/dir.c:501 nilfs_link+0x12c/0x1f8 fs/nilfs2/namei.c:192 vfs_link+0x3e8/0x560 fs/namei.c:4605 do_linkat+0x2e0/0x620 fs/namei.c:4676 __do_sys_linkat fs/namei.c:4704 [inline] __se_sys_linkat fs/namei.c:4701 [inline] __arm64_sys_linkat+0xe4/0x100 fs/namei.c:4701 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 ---[ end trace ]--- ================================================================== BUG: KASAN: global-out-of-bounds in nilfs_set_de_type fs/nilfs2/dir.c:257 [inline] BUG: KASAN: global-out-of-bounds in nilfs_add_link+0xac4/0xc10 fs/nilfs2/dir.c:501 Read of size 1 at addr ffff80008b394c8f by task syz-executor268/6242 CPU: 0 PID: 6242 Comm: syz-executor268 Not tainted 6.9.0-rc3-syzkaller-gb5d2afe8745b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load1_noabort+0x20/0x2c mm/kasan/report_generic.c:378 nilfs_set_de_type fs/nilfs2/dir.c:257 [inline] nilfs_add_link+0xac4/0xc10 fs/nilfs2/dir.c:501 nilfs_link+0x12c/0x1f8 fs/nilfs2/namei.c:192 vfs_link+0x3e8/0x560 fs/namei.c:4605 do_linkat+0x2e0/0x620 fs/namei.c:4676 __do_sys_linkat fs/namei.c:4704 [inline] __se_sys_linkat fs/namei.c:4701 [inline] __arm64_sys_linkat+0xe4/0x100 fs/namei.c:4701 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the variable: nilfs_type_by_mode+0xf/0x40 The buggy address belongs to the virtual mapping at [ffff80008af80000, ffff80008e9c0000) created by: declare_kernel_vmas+0x58/0xb8 arch/arm64/mm/mmu.c:769 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a9f94 flags: 0x5ffe00000004000(reserved|node=0|zone=2|lastcpupid=0xfff) page_type: 0xffffffff() raw: 05ffe00000004000 fffffdffc5a7e508 fffffdffc5a7e508 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff80008b394b80: f9 f9 f9 f9 00 00 00 00 00 00 00 00 06 f9 f9 f9 ffff80008b394c00: f9 f9 f9 f9 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 >ffff80008b394c80: 00 07 f9 f9 00 00 00 00 00 00 00 00 00 02 f9 f9 ^ ffff80008b394d00: f9 f9 f9 f9 00 00 01 f9 f9 f9 f9 f9 00 f9 f9 f9 ffff80008b394d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================