... Log Wrap ... Log Wrap ... Log Wrap ... ERROR: (device loop3): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 0 ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:2894:30 index -128 is out of range for type 'struct dtslot[128]' CPU: 1 UID: 0 PID: 7365 Comm: syz.3.137 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #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 jfs_readdir+0x1580/0x37bc fs/jfs/jfs_dtree.c:2894 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:65 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x408/0x648 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:407 [inline] __se_sys_getdents64 fs/readdir.c:392 [inline] __arm64_sys_getdents64+0x1c4/0x48c fs/readdir.c:392 __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 ]--- ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:2649:28 index -128 is out of range for type 'struct dtslot[128]' CPU: 1 UID: 0 PID: 7365 Comm: syz.3.137 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #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 add_missing_indices fs/jfs/jfs_dtree.c:2649 [inline] jfs_readdir+0x1dfc/0x37bc fs/jfs/jfs_dtree.c:3011 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:65 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x408/0x648 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:407 [inline] __se_sys_getdents64 fs/readdir.c:392 [inline] __arm64_sys_getdents64+0x1c4/0x48c fs/readdir.c:392 __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 diWrite+0xb48/0x15cc fs/jfs/jfs_imap.c:753 Read of size 32 at addr ffff0000f6dc4108 by task syz.3.137/7365 CPU: 1 UID: 0 PID: 7365 Comm: syz.3.137 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #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:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 kasan_check_range+0x268/0x2a8 mm/kasan/generic.c:189 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105 diWrite+0xb48/0x15cc fs/jfs/jfs_imap.c:753 txCommit+0x750/0x5504 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices fs/jfs/jfs_dtree.c:2663 [inline] jfs_readdir+0x1e80/0x37bc fs/jfs/jfs_dtree.c:3011 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:65 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x408/0x648 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:407 [inline] __se_sys_getdents64 fs/readdir.c:392 [inline] __arm64_sys_getdents64+0x1c4/0x48c fs/readdir.c:392 __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 ffff0000f6dc4088 which belongs to the cache jfs_ip of size 2232 The buggy address is located 128 bytes inside of allocated 2232-byte region [ffff0000f6dc4088, ffff0000f6dc4940) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x136dc0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff0000ce9fb701 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c467d280 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800d000d 00000001f5000000 ffff0000ce9fb701 head: 05ffc00000000040 ffff0000c467d280 dead000000000122 0000000000000000 head: 0000000000000000 00000000800d000d 00000001f5000000 ffff0000ce9fb701 head: 05ffc00000000003 fffffdffc3db7001 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f6dc4000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000f6dc4080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000f6dc4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000f6dc4180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000f6dc4200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ... Log Wrap ... Log Wrap ... Log Wrap ... ... Log Wrap ... Log Wrap ... Log Wrap ... ... Log Wrap ... Log Wrap ... Log Wrap ... ERROR: (device loop3): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 1