syzbot


kernel BUG in ocfs2_remove_btree_range

Status: upstream: reported on 2025/01/23 16:46
Subsystems: ocfs2
[Documentation on labels]
Reported-by: syzbot+08d94b4c1f72cc5fdaec@syzkaller.appspotmail.com
First crash: 11d, last: 11d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ocfs2?] kernel BUG in ocfs2_remove_btree_range 0 (1) 2025/01/23 16:46

Sample crash report:
loop0: detected capacity change from 0 to 32768
=======================================================
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode.
(syz.0.0,5315,0):ocfs2_truncate_log_needs_flush:5822 ERROR: bug expression: le16_to_cpu(tl->tl_used) > le16_to_cpu(tl->tl_count)
(syz.0.0,5315,0):ocfs2_truncate_log_needs_flush:5822 ERROR: slot 0, invalid truncate log parameters: used = 240, count = 39
------------[ cut here ]------------
kernel BUG at fs/ocfs2/alloc.c:5822!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5315 Comm: syz.0.0 Not tainted 6.13.0-rc7-syzkaller-00191-gfda5e3f28400 #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_truncate_log_needs_flush fs/ocfs2/alloc.c:5819 [inline]
RIP: 0010:ocfs2_remove_btree_range+0x1859/0x1860 fs/ocfs2/alloc.c:5744
Code: 0f b7 00 4c 89 ff 48 c7 c6 84 b6 0e 8e ba be 16 00 00 48 c7 c1 20 43 48 8c 45 89 e0 41 89 d9 50 e8 5c a0 20 00 48 83 c4 08 90 <0f> 0b 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000d426c40 EFLAGS: 00010292
RAX: 235f97fc7a573600 RBX: 00000000000000f0 RCX: 235f97fc7a573600
RDX: ffffc9000ecba000 RSI: 00000000000023ad RDI: 00000000000023ae
RBP: ffffc9000d426f18 R08: ffffffff817f1b5c R09: 1ffff92001a84cf8
R10: dffffc0000000000 R11: fffff52001a84cf9 R12: 0000000000000000
R13: ffff8880537b6ac2 R14: 1ffff1100a6f6d58 R15: ffffc9000d426d00
FS:  00007f41eea816c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9bda395ed8 CR3: 0000000042cca000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ocfs2_commit_truncate+0xcca/0x2550 fs/ocfs2/alloc.c:7353
 ocfs2_truncate_file+0xd21/0x1560 fs/ocfs2/file.c:509
 ocfs2_setattr+0x1890/0x1ef0 fs/ocfs2/file.c:1212
 notify_change+0xbca/0xe90 fs/attr.c:552
 do_truncate+0x220/0x310 fs/open.c:65
 handle_truncate fs/namei.c:3449 [inline]
 do_open fs/namei.c:3832 [inline]
 path_openat+0x2e1e/0x3590 fs/namei.c:3987
 do_filp_open+0x27f/0x4e0 fs/namei.c:4014
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402
 do_sys_open fs/open.c:1417 [inline]
 __do_sys_open fs/open.c:1425 [inline]
 __se_sys_open fs/open.c:1421 [inline]
 __x64_sys_open+0x225/0x270 fs/open.c:1421
 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:0x7f41edb85d29
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:00007f41eea81038 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007f41edd75fa0 RCX: 00007f41edb85d29
RDX: 0000000000000010 RSI: 0000000000000282 RDI: 0000000020000140
RBP: 00007f41edc01b08 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f41edd75fa0 R15: 00007fffbe9c4a28
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ocfs2_truncate_log_needs_flush fs/ocfs2/alloc.c:5819 [inline]
RIP: 0010:ocfs2_remove_btree_range+0x1859/0x1860 fs/ocfs2/alloc.c:5744
Code: 0f b7 00 4c 89 ff 48 c7 c6 84 b6 0e 8e ba be 16 00 00 48 c7 c1 20 43 48 8c 45 89 e0 41 89 d9 50 e8 5c a0 20 00 48 83 c4 08 90 <0f> 0b 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000d426c40 EFLAGS: 00010292
RAX: 235f97fc7a573600 RBX: 00000000000000f0 RCX: 235f97fc7a573600
RDX: ffffc9000ecba000 RSI: 00000000000023ad RDI: 00000000000023ae
RBP: ffffc9000d426f18 R08: ffffffff817f1b5c R09: 1ffff92001a84cf8
R10: dffffc0000000000 R11: fffff52001a84cf9 R12: 0000000000000000
R13: ffff8880537b6ac2 R14: 1ffff1100a6f6d58 R15: ffffc9000d426d00
FS:  00007f41eea816c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005565fc1ee068 CR3: 0000000042cca000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/19 16:40 upstream fda5e3f28400 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in ocfs2_remove_btree_range
* Struck through repros no longer work on HEAD.