================================================================== BUG: KASAN: slab-out-of-bounds in ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline] BUG: KASAN: slab-out-of-bounds in __ocfs2_flush_truncate_log+0x64c/0xf30 fs/ocfs2/alloc.c:6053 Read of size 4 at addr ffff0000c7ecfff8 by task syz-executor/4978 CPU: 0 PID: 4978 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 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 __asan_report_load4_noabort+0x44/0x50 mm/kasan/report_generic.c:308 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline] __ocfs2_flush_truncate_log+0x64c/0xf30 fs/ocfs2/alloc.c:6053 ocfs2_flush_truncate_log+0x48/0x68 fs/ocfs2/alloc.c:6075 ocfs2_sync_fs+0xf8/0x2a4 fs/ocfs2/super.c:403 sync_filesystem+0x1a0/0x218 fs/sync.c:66 generic_shutdown_super+0x70/0x2f0 fs/super.c:448 kill_block_super+0x70/0xdc fs/super.c:1427 deactivate_locked_super+0xb8/0x13c fs/super.c:335 deactivate_super+0xf8/0x118 fs/super.c:366 cleanup_mnt+0x3a4/0x458 fs/namespace.c:1148 __cleanup_mnt+0x20/0x30 fs/namespace.c:1155 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x24b4/0x3128 arch/arm64/kernel/signal.c:949 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Allocated by task 1: 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_slab_alloc+0x8c/0xcc mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x74/0x408 mm/slab.h:519 slab_alloc_node mm/slub.c:3225 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc+0x1e0/0x3e4 mm/slub.c:3238 kmem_cache_zalloc include/linux/slab.h:728 [inline] __kernfs_new_node+0xe4/0x5d8 fs/kernfs/dir.c:593 kernfs_new_node+0x11c/0x240 fs/kernfs/dir.c:669 __kernfs_create_file+0x60/0x2d4 fs/kernfs/file.c:985 sysfs_add_file_mode_ns+0x2c4/0x3a4 fs/sysfs/file.c:317 sysfs_merge_group+0x160/0x29c fs/sysfs/group.c:343 dpm_sysfs_add+0x12c/0x26c drivers/base/power/sysfs.c:712 device_add+0x6b8/0xf94 drivers/base/core.c:3369 usb_new_device+0x7ec/0x1164 drivers/usb/core/hub.c:2632 register_root_hub+0x224/0x538 drivers/usb/core/hcd.c:1021 usb_add_hcd+0x90c/0xd5c drivers/usb/core/hcd.c:3007 vhci_hcd_probe+0x13c/0x358 drivers/usb/usbip/vhci_hcd.c:1387 platform_probe+0x13c/0x1b4 drivers/base/platform.c:1391 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26c/0xaec drivers/base/dd.c:595 __driver_probe_device+0x180/0x314 drivers/base/dd.c:755 driver_probe_device+0x78/0x34c drivers/base/dd.c:785 __device_attach_driver+0x274/0x4c4 drivers/base/dd.c:907 bus_for_each_drv+0x150/0x1d8 drivers/base/bus.c:429 __device_attach+0x2a8/0x3d4 drivers/base/dd.c:979 device_initial_probe+0x24/0x34 drivers/base/dd.c:1028 bus_probe_device+0xbc/0x1c4 drivers/base/bus.c:489 device_add+0xb04/0xf94 drivers/base/core.c:3412 platform_device_add+0x3f8/0x6ec drivers/base/platform.c:712 vhci_hcd_init+0x380/0x49c drivers/usb/usbip/vhci_hcd.c:1571 do_one_initcall+0x228/0x8b0 init/main.c:1316 do_initcall_level+0x154/0x214 init/main.c:1389 do_initcalls+0x58/0xac init/main.c:1405 do_basic_setup+0x8c/0xa0 init/main.c:1424 kernel_init_freeable+0x404/0x5fc init/main.c:1629 kernel_init+0x24/0x1d0 init/main.c:1520 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 The buggy address belongs to the object at ffff0000c7ecfe80 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 208 bytes to the right of 168-byte region [ffff0000c7ecfe80, ffff0000c7ecff28) The buggy address belongs to the page: page:00000000509ceeca refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107ecf flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c0840900 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c7ecfe80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000c7ecff00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff0000c7ecff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000c7ed0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000c7ed0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ------------[ cut here ]------------ kernel BUG at fs/ocfs2/suballoc.c:2469! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 4978 Comm: syz-executor Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 82400005 (Nzcv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : _ocfs2_free_suballoc_bits+0xc50/0xf70 fs/ocfs2/suballoc.c:2469 lr : _ocfs2_free_suballoc_bits+0xc50/0xf70 fs/ocfs2/suballoc.c:2469 sp : ffff80001f7373a0 x29: ffff80001f737500 x28: 000000009960013d x27: dfff800000000000 x26: ffff0000deba9210 x25: ffff800009cd5ca0 x24: ffff0000edf0ae00 x23: ffff700003ee6e84 x22: 0000000000000e00 x21: 0000000000000e00 x20: 0000000000000020 x19: 000000009960013e x18: 0000000000000000 x17: 0000000000000000 x16: ffff8000111ceed0 x15: 00000000fffffffc x14: 0000000000ff0100 x13: ffffffffffffffff x12: 0000000000ff0100 x11: 0000000000000000 x10: 0000000000000000 x9 : ffff800009cdb3ac x8 : ffff0000dc09b680 x7 : 0000000000000000 x6 : ffff800009cd5ca0 x5 : 000000009960013d x4 : 0000000000000020 x3 : 0000000000000001 x2 : ffff0000c06611d0 x1 : 0000000000000e00 x0 : 000000009960013e Call trace: _ocfs2_free_suballoc_bits+0xc50/0xf70 fs/ocfs2/suballoc.c:2469 _ocfs2_free_clusters+0x510/0x9b0 fs/ocfs2/suballoc.c:2569 ocfs2_free_clusters+0x50/0x68 fs/ocfs2/suballoc.c:2590 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5971 [inline] __ocfs2_flush_truncate_log+0x5b0/0xf30 fs/ocfs2/alloc.c:6053 ocfs2_flush_truncate_log+0x48/0x68 fs/ocfs2/alloc.c:6075 ocfs2_sync_fs+0xf8/0x2a4 fs/ocfs2/super.c:403 sync_filesystem+0x1a0/0x218 fs/sync.c:66 generic_shutdown_super+0x70/0x2f0 fs/super.c:448 kill_block_super+0x70/0xdc fs/super.c:1427 deactivate_locked_super+0xb8/0x13c fs/super.c:335 deactivate_super+0xf8/0x118 fs/super.c:366 cleanup_mnt+0x3a4/0x458 fs/namespace.c:1148 __cleanup_mnt+0x20/0x30 fs/namespace.c:1155 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x24b4/0x3128 arch/arm64/kernel/signal.c:949 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Code: 17fffec8 979e781e d4210000 979e781c (d4210000) ---[ end trace 9b50d110c37d93dc ]---