loop0: detected capacity change from 0 to 32768 ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:2892:30 index -1 is out of range for type 'struct dtslot[128]' CPU: 0 PID: 6161 Comm: syz-executor386 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 #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:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:347 jfs_readdir+0x1580/0x37bc fs/jfs/jfs_dtree.c:2892 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:67 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x3f8/0x580 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64 fs/readdir.c:394 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:394 __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 ]--- ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:2647:28 index -1 is out of range for type 'struct dtslot[128]' CPU: 0 PID: 6161 Comm: syz-executor386 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 #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:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:347 add_missing_indices fs/jfs/jfs_dtree.c:2647 [inline] jfs_readdir+0x1dfc/0x37bc fs/jfs/jfs_dtree.c:3009 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:67 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x3f8/0x580 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64 fs/readdir.c:394 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:394 __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 ]--- ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:750:12 index 255 is out of range for type 'struct dtslot[128]' CPU: 0 PID: 6161 Comm: syz-executor386 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 #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:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:347 diWrite+0xbcc/0x15cc fs/jfs/jfs_imap.c:750 txCommit+0x750/0x5438 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices fs/jfs/jfs_dtree.c:2661 [inline] jfs_readdir+0x1e80/0x37bc fs/jfs/jfs_dtree.c:3009 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:67 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x3f8/0x580 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64 fs/readdir.c:394 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:394 __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 ]--- ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:750:35 index 255 is out of range for type 'struct dtslot[128]' CPU: 0 PID: 6161 Comm: syz-executor386 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 #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:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xf8/0x148 lib/ubsan.c:347 diWrite+0xc24/0x15cc fs/jfs/jfs_imap.c:750 txCommit+0x750/0x5438 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices fs/jfs/jfs_dtree.c:2661 [inline] jfs_readdir+0x1e80/0x37bc fs/jfs/jfs_dtree.c:3009 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:67 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x3f8/0x580 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64 fs/readdir.c:394 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:394 __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: slab-out-of-bounds in diWrite+0xb48/0x15cc fs/jfs/jfs_imap.c:750 Read of size 32 at addr ffff0000dbbc5110 by task syz-executor386/6161 CPU: 0 PID: 6161 Comm: syz-executor386 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 #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:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x178/0x518 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 kasan_check_range+0x254/0x294 mm/kasan/generic.c:189 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105 diWrite+0xb48/0x15cc fs/jfs/jfs_imap.c:750 txCommit+0x750/0x5438 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices fs/jfs/jfs_dtree.c:2661 [inline] jfs_readdir+0x1e80/0x37bc fs/jfs/jfs_dtree.c:3009 wrap_directory_iterator+0xa8/0xf4 fs/readdir.c:67 shared_jfs_readdir+0x30/0x40 fs/jfs/namei.c:1540 iterate_dir+0x3f8/0x580 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:409 [inline] __se_sys_getdents64 fs/readdir.c:394 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:394 __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 object at ffff0000dbbc4a00 which belongs to the cache jfs_ip of size 2240 The buggy address is located 1808 bytes inside of allocated 2240-byte region [ffff0000dbbc4a00, ffff0000dbbc52c0) The buggy address belongs to the physical page: page:000000005a8caa7a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11bbc0 head:000000005a8caa7a order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000840(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000840 ffff0000c4470280 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800d000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000dbbc5000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000dbbc5080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000dbbc5100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000dbbc5180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000dbbc5200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 0 ERROR: (device loop0): remounting filesystem as read-only ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 1 ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 2 ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 3 ERROR: (device loop0): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 4