loop0: detected capacity change from 0 to 32768 JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. syz.0.0: attempt to access beyond end of device loop0: rw=34817, sector=32768, nr_sectors = 8 limit=32768 (syz.0.0,5318,0):ocfs2_dio_end_io:2424 ERROR: Direct IO failed, bytes = -5 ------------[ cut here ]------------ kernel BUG at fs/ocfs2/suballoc.c:2558! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 32768 PID: 5318 Comm: syz.0.0 Not tainted 6.13.0-rc1-syzkaller-00036-g5076001689e4 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:_ocfs2_free_suballoc_bits+0x1294/0x1470 fs/ocfs2/suballoc.c:2558 Code: 49 8b 3f 48 89 de 48 8b 54 24 10 48 8b 4c 24 38 4c 8b 44 24 18 e8 dc a7 00 00 e9 25 01 00 00 e8 c2 9f 2d 08 e8 0d c5 fc fd 90 <0f> 0b e8 05 c5 fc fd 90 0f 0b f3 0f 1e fa 65 8b 1d e3 28 61 7c bf RSP: 0018:ffffc9000d346be0 EFLAGS: 00010287 RAX: ffffffff83a2ad13 RBX: 0000000000000201 RCX: 0000000000100000 RDX: ffffc9000e3ba000 RSI: 0000000000002be3 RDI: 0000000000002be4 RBP: ffffc9000d346d88 R08: ffffffff83a29ec1 R09: 1ffffffff20328b6 R10: dffffc0000000000 R11: fffffbfff20328b7 R12: 0000000000000200 R13: 0000000000000001 R14: ffff88805391500a R15: dffffc0000000000 FS: 00007fd7923cd6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002000f000 CR3: 00000000368a6000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: _ocfs2_free_clusters+0x5ef/0xac0 fs/ocfs2/suballoc.c:2646 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5971 [inline] __ocfs2_flush_truncate_log+0x760/0x1240 fs/ocfs2/alloc.c:6054 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6076 [inline] ocfs2_try_to_free_truncate_log+0x1bb/0x410 fs/ocfs2/alloc.c:6135 ocfs2_write_begin_nolock+0x397c/0x4ea0 fs/ocfs2/aops.c:1868 ocfs2_write_begin+0x205/0x3a0 fs/ocfs2/aops.c:1902 generic_perform_write+0x344/0x6d0 mm/filemap.c:4055 ocfs2_file_write_iter+0x19af/0x2180 fs/ocfs2/file.c:2469 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd79157ff19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd7923cd058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fd791745fa0 RCX: 00007fd79157ff19 RDX: 0000000000010010 RSI: 000000002000e0c0 RDI: 0000000000000006 RBP: 00007fd7915f3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd791745fa0 R15: 00007ffd79b56bd8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:_ocfs2_free_suballoc_bits+0x1294/0x1470 fs/ocfs2/suballoc.c:2558 Code: 49 8b 3f 48 89 de 48 8b 54 24 10 48 8b 4c 24 38 4c 8b 44 24 18 e8 dc a7 00 00 e9 25 01 00 00 e8 c2 9f 2d 08 e8 0d c5 fc fd 90 <0f> 0b e8 05 c5 fc fd 90 0f 0b f3 0f 1e fa 65 8b 1d e3 28 61 7c bf RSP: 0018:ffffc9000d346be0 EFLAGS: 00010287 RAX: ffffffff83a2ad13 RBX: 0000000000000201 RCX: 0000000000100000 RDX: ffffc9000e3ba000 RSI: 0000000000002be3 RDI: 0000000000002be4 RBP: ffffc9000d346d88 R08: ffffffff83a29ec1 R09: 1ffffffff20328b6 R10: dffffc0000000000 R11: fffffbfff20328b7 R12: 0000000000000200 R13: 0000000000000001 R14: ffff88805391500a R15: dffffc0000000000 FS: 00007fd7923cd6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002000f000 CR3: 00000000368a6000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400