================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:2325:2 index 2621480 is out of range for type 's64[128]' (aka 'long long[128]') CPU: 0 PID: 136 Comm: kworker/u4:1 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: writeback wb_workfn (flush-7:0) Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 ubsan_epilogue+0x14/0x48 lib/ubsan.c:151 __ubsan_handle_out_of_bounds+0xd4/0x108 lib/ubsan.c:282 dbAllocBits+0x874/0x8bc fs/jfs/jfs_dmap.c:2325 dbAllocDmap fs/jfs/jfs_dmap.c:2102 [inline] dbAllocNear+0x25c/0x350 fs/jfs/jfs_dmap.c:1315 dbAlloc+0x760/0x978 fs/jfs/jfs_dmap.c:832 extBalloc fs/jfs/jfs_extent.c:523 [inline] extAlloc+0x3f4/0xdc4 fs/jfs/jfs_extent.c:125 jfs_get_block+0x2bc/0x8ec fs/jfs/inode.c:258 __mpage_writepage+0x390/0x154c fs/mpage.c:564 write_cache_pages+0x7c8/0xde4 mm/page-writeback.c:2277 mpage_writepages+0xe4/0x218 fs/mpage.c:712 jfs_writepages+0x30/0x40 fs/jfs/inode.c:293 do_writepages+0x36c/0x578 mm/page-writeback.c:2386 __writeback_single_inode+0x148/0x11f0 fs/fs-writeback.c:1647 writeback_sb_inodes+0x7fc/0x1378 fs/fs-writeback.c:1930 wb_writeback+0x3d8/0xe44 fs/fs-writeback.c:2104 wb_do_writeback fs/fs-writeback.c:2247 [inline] wb_workfn+0x350/0xdd8 fs/fs-writeback.c:2288 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 ================================================================================ ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_extent.c:545:16 index 2621480 is out of range for type 'atomic_t[128]' CPU: 0 PID: 136 Comm: kworker/u4:1 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: writeback wb_workfn (flush-7:0) Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 ubsan_epilogue+0x14/0x48 lib/ubsan.c:151 __ubsan_handle_out_of_bounds+0xd4/0x108 lib/ubsan.c:282 extBalloc fs/jfs/jfs_extent.c:545 [inline] extAlloc+0xc90/0xdc4 fs/jfs/jfs_extent.c:125 jfs_get_block+0x2bc/0x8ec fs/jfs/inode.c:258 __mpage_writepage+0x390/0x154c fs/mpage.c:564 write_cache_pages+0x7c8/0xde4 mm/page-writeback.c:2277 mpage_writepages+0xe4/0x218 fs/mpage.c:712 jfs_writepages+0x30/0x40 fs/jfs/inode.c:293 do_writepages+0x36c/0x578 mm/page-writeback.c:2386 __writeback_single_inode+0x148/0x11f0 fs/fs-writeback.c:1647 writeback_sb_inodes+0x7fc/0x1378 fs/fs-writeback.c:1930 wb_writeback+0x3d8/0xe44 fs/fs-writeback.c:2104 wb_do_writeback fs/fs-writeback.c:2247 [inline] wb_workfn+0x350/0xdd8 fs/fs-writeback.c:2288 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 ================================================================================ ================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: slab-out-of-bounds in atomic_inc include/linux/atomic/atomic-instrumented.h:181 [inline] BUG: KASAN: slab-out-of-bounds in extBalloc fs/jfs/jfs_extent.c:545 [inline] BUG: KASAN: slab-out-of-bounds in extAlloc+0x6a4/0xdc4 fs/jfs/jfs_extent.c:125 Write of size 4 at addr ffff0000c2e5d580 by task kworker/u4:1/136 CPU: 0 PID: 136 Comm: kworker/u4:1 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: writeback wb_workfn (flush-7:0) Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x78/0x30c mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xec/0x15c mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x270/0x2b0 mm/kasan/generic.c:189 __kasan_check_write+0x44/0x54 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_inc include/linux/atomic/atomic-instrumented.h:181 [inline] extBalloc fs/jfs/jfs_extent.c:545 [inline] extAlloc+0x6a4/0xdc4 fs/jfs/jfs_extent.c:125 jfs_get_block+0x2bc/0x8ec fs/jfs/inode.c:258 __mpage_writepage+0x390/0x154c fs/mpage.c:564 write_cache_pages+0x7c8/0xde4 mm/page-writeback.c:2277 mpage_writepages+0xe4/0x218 fs/mpage.c:712 jfs_writepages+0x30/0x40 fs/jfs/inode.c:293 do_writepages+0x36c/0x578 mm/page-writeback.c:2386 __writeback_single_inode+0x148/0x11f0 fs/fs-writeback.c:1647 writeback_sb_inodes+0x7fc/0x1378 fs/fs-writeback.c:1930 wb_writeback+0x3d8/0xe44 fs/fs-writeback.c:2104 wb_do_writeback fs/fs-writeback.c:2247 [inline] wb_workfn+0x350/0xdd8 fs/fs-writeback.c:2288 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 Allocated by task 4650: 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_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb0/0xf0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x298/0x44c mm/slub.c:4412 kmalloc include/linux/slab.h:609 [inline] tomoyo_realpath_from_path+0xcc/0x510 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1b4/0x440 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x28/0x38 security/tomoyo/tomoyo.c:122 security_inode_getattr+0xd8/0x124 security/security.c:1348 vfs_getattr fs/stat.c:157 [inline] vfs_fstat fs/stat.c:182 [inline] __do_sys_newfstat fs/stat.c:421 [inline] __se_sys_newfstat fs/stat.c:418 [inline] __arm64_sys_newfstat+0xe8/0x1d0 fs/stat.c:418 __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+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Freed by task 4650: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0x128/0x1e8 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0x170/0x40c mm/slub.c:4564 tomoyo_realpath_from_path+0x4c8/0x510 security/tomoyo/realpath.c:291 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1b4/0x440 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x28/0x38 security/tomoyo/tomoyo.c:122 security_inode_getattr+0xd8/0x124 security/security.c:1348 vfs_getattr fs/stat.c:157 [inline] vfs_fstat fs/stat.c:182 [inline] __do_sys_newfstat fs/stat.c:421 [inline] __se_sys_newfstat fs/stat.c:418 [inline] __arm64_sys_newfstat+0xe8/0x1d0 fs/stat.c:418 __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+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/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 ffff0000c2e5c000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1408 bytes to the right of 4096-byte region [ffff0000c2e5c000, ffff0000c2e5d000) The buggy address belongs to the page: page:000000007c527c55 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102e58 head:000000007c527c55 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c0002a80 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c2e5d480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c2e5d500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000c2e5d580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000c2e5d600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c2e5d680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== attempt to access beyond end of device loop0: rw=1, want=171801313640, limit=32768 attempt to access beyond end of device loop0: rw=1, want=171801313640, limit=32768 attempt to access beyond end of device loop0: rw=1, want=171801313640, limit=32768 attempt to access beyond end of device loop0: rw=1, want=171801313640, limit=32768 attempt to access beyond end of device loop0: rw=1, want=171801313640, limit=32768 attempt to access beyond end of device loop0: rw=1, want=171801313640, limit=32768