================================================================== BUG: KASAN: slab-out-of-bounds in ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5967 [inline] BUG: KASAN: slab-out-of-bounds in __ocfs2_flush_truncate_log+0x684/0xf6c fs/ocfs2/alloc.c:6062 Read of size 4 at addr ffff0000d6336ac0 by task syz-executor/7149 CPU: 0 UID: 0 PID: 7149 Comm: syz-executor Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5967 [inline] __ocfs2_flush_truncate_log+0x684/0xf6c fs/ocfs2/alloc.c:6062 ocfs2_flush_truncate_log+0x4c/0x6c fs/ocfs2/alloc.c:6084 ocfs2_sync_fs+0xf8/0x2a4 fs/ocfs2/super.c:406 sync_filesystem+0x1a0/0x218 fs/sync.c:66 generic_shutdown_super+0x70/0x2b8 fs/super.c:622 kill_block_super+0x44/0x90 fs/super.c:1766 deactivate_locked_super+0xc4/0x12c fs/super.c:474 deactivate_super+0xe0/0x100 fs/super.c:507 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1375 __cleanup_mnt+0x20/0x30 fs/namespace.c:1382 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x168 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:745 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:763 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Allocated by task 7108: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:562 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x2a4/0x3fc mm/slub.c:4407 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] smc_stats_init+0x5c/0x128 net/smc/smc_stats.c:23 smc_net_stat_init+0x20/0x30 net/smc/af_smc.c:3493 ops_init+0x310/0x544 net/core/net_namespace.c:136 setup_net+0x11c/0x314 net/core/net_namespace.c:438 copy_net_ns+0x2a4/0x4a4 net/core/net_namespace.c:570 create_new_namespaces+0x318/0x5a8 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x108/0x158 kernel/nsproxy.c:218 ksys_unshare+0x420/0x738 kernel/fork.c:3127 __do_sys_unshare kernel/fork.c:3198 [inline] __se_sys_unshare kernel/fork.c:3196 [inline] __arm64_sys_unshare+0x3c/0x50 kernel/fork.c:3196 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 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+0x5c/0x254 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:763 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000d6336800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 112 bytes to the right of allocated 592-byte region [ffff0000d6336800, ffff0000d6336a50) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116330 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0001dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0001dc0 0000000000000000 dead000000000001 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc358cc01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d6336980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d6336a00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff0000d6336a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000d6336b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d6336b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== (syz-executor,7149,1):ocfs2_read_blocks:239 ERROR: status = -12 (syz-executor,7149,1):_ocfs2_free_suballoc_bits:2579 ERROR: status = -12 (syz-executor,7149,1):_ocfs2_free_clusters:2676 ERROR: status = -12 (syz-executor,7149,1):ocfs2_replay_truncate_records:5984 ERROR: status = -12 (syz-executor,7149,1):__ocfs2_flush_truncate_log:6065 ERROR: status = -12 (syz-executor,7149,1):ocfs2_sync_fs:408 ERROR: status = -12 ------------[ cut here ]------------ kernel BUG at fs/ocfs2/suballoc.c:2569! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Modules linked in: CPU: 1 UID: 0 PID: 7149 Comm: syz-executor Tainted: G B syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2569 lr : _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2569 sp : ffff8000a4897480 x29: ffff8000a4897600 x28: ffff0000e3d1dec8 x27: 0000000000000020 x26: ffff700014912ea4 x25: ffff80008219f958 x24: dfff800000000000 x23: 00000000038c0313 x22: 0000000000000e00 x21: 00000000038c033c x20: 0000000000000020 x19: 0000000000000e00 x18: 1fffe00033776488 x17: ffff80008f85e000 x16: ffff80008b0365bc x15: 0000000000000001 x14: 0000000000000000 x13: 00000000fffffffc x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : ffff0000ceff9e80 x7 : 0000000000000000 x6 : ffff80008219f958 x5 : 00000000038c0313 x4 : 0000000000000020 x3 : 0000000000000029 x2 : ffff0000de7f4bc8 x1 : 0000000000000e00 x0 : 00000000038c033c Call trace: _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2569 (P) _ocfs2_free_clusters+0x514/0x9bc fs/ocfs2/suballoc.c:2672 ocfs2_free_clusters+0x50/0x68 fs/ocfs2/suballoc.c:2693 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5979 [inline] __ocfs2_flush_truncate_log+0x5d8/0xf6c fs/ocfs2/alloc.c:6062 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6084 [inline] ocfs2_truncate_log_shutdown+0x118/0x284 fs/ocfs2/alloc.c:6343 ocfs2_dismount_volume+0x1f4/0x8cc fs/ocfs2/super.c:1827 ocfs2_put_super+0xec/0x320 fs/ocfs2/super.c:1553 generic_shutdown_super+0x12c/0x2b8 fs/super.c:643 kill_block_super+0x44/0x90 fs/super.c:1766 deactivate_locked_super+0xc4/0x12c fs/super.c:474 deactivate_super+0xe0/0x100 fs/super.c:507 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1375 __cleanup_mnt+0x20/0x30 fs/namespace.c:1382 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x168 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:745 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:763 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Code: 17ffff1e 97964249 d4210000 97964247 (d4210000) ---[ end trace 0000000000000000 ]---