syzbot


kernel BUG in jbd2_cleanup_journal_tail

Status: fixed on 2024/10/28 14:52
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+087b1b3234832ee66463@syzkaller.appspotmail.com
Fix commit: 82dfdd1e31e7 ocfs2: fix null-ptr-deref when journal load failed.
First crash: 146d, last: 135d
Fix bisection: fixed by (bisect log) :
commit 82dfdd1e31e774578f76ce6dc90c834f96403a0f
Author: Julian Sun <sunjunchao2870@gmail.com>
Date: Mon Sep 2 03:08:44 2024 +0000

  ocfs2: fix null-ptr-deref when journal load failed.

  
Bug presence (1)
Date Name Commit Repro Result
2024/09/17 upstream (ToT) 2f27fce67173 C [report] kernel BUG in jbd2_cleanup_journal_tail
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in jbd2_cleanup_journal_tail ext4 C 11 136d 172d 0/28 auto-obsoleted due to no activity on 2024/12/06 19:46
linux-5.15 kernel BUG in jbd2_cleanup_journal_tail C error 9 121d 148d 0/3 auto-obsoleted due to no activity on 2025/01/20 17:41

Sample crash report:
(syz.2.801,6909,1):ocfs2_check_volume:2425 ERROR: ocfs2 journal load failed! -5
(syz.2.801,6909,0):ocfs2_check_volume:2481 ERROR: status = -5
(syz.2.801,6909,0):ocfs2_mount_volume:1821 ERROR: status = -5
------------[ cut here ]------------
kernel BUG at fs/jbd2/checkpoint.c:333!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 6909 Comm: syz.2.801 Not tainted 6.1.111-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:jbd2_cleanup_journal_tail+0x2b6/0x2c0 fs/jbd2/checkpoint.c:333
Code: 4c 24 40 80 e1 07 80 c1 03 38 c1 0f 8c 69 ff ff ff 48 8d 7c 24 40 e8 e9 95 91 ff e9 5a ff ff ff e8 bf 3f 56 08 e8 aa 13 3a ff <0f> 0b 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41 54
RSP: 0018:ffffc9000a14ee00 EFLAGS: 00010287
RAX: ffffffff82509b96 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc9000fbb8000 RSI: 000000000002f365 RDI: 000000000002f366
RBP: ffffc9000a14eed0 R08: ffffffff82509a23 R09: ffffed100c7d3819
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92001429dc4
R13: ffff888063e9c000 R14: 1ffff92001429dca R15: 1ffff1100c7d3800
FS:  00007f92ee7966c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200c4000 CR3: 000000007cdfa000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 jbd2_journal_flush+0x352/0xd00 fs/jbd2/journal.c:2489
 ocfs2_journal_shutdown+0x476/0xca0 fs/ocfs2/journal.c:1048
 ocfs2_mount_volume+0x169b/0x1940 fs/ocfs2/super.c:1842
 ocfs2_fill_super+0x4759/0x5730 fs/ocfs2/super.c:1082
 mount_bdev+0x2c9/0x3f0 fs/super.c:1443
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 do_new_mount+0x2ba/0xb40 fs/namespace.c:3051
 do_mount fs/namespace.c:3394 [inline]
 __do_sys_mount fs/namespace.c:3602 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3579
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f92ed97f79a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f92ee795e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f92ee795ef0 RCX: 00007f92ed97f79a
RDX: 0000000020000080 RSI: 0000000020000040 RDI: 00007f92ee795eb0
RBP: 0000000020000080 R08: 00007f92ee795ef0 R09: 00000000000008c0
R10: 00000000000008c0 R11: 0000000000000246 R12: 0000000020000040
R13: 00007f92ee795eb0 R14: 0000000000004436 R15: 00000000200000c0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:jbd2_cleanup_journal_tail+0x2b6/0x2c0 fs/jbd2/checkpoint.c:333
Code: 4c 24 40 80 e1 07 80 c1 03 38 c1 0f 8c 69 ff ff ff 48 8d 7c 24 40 e8 e9 95 91 ff e9 5a ff ff ff e8 bf 3f 56 08 e8 aa 13 3a ff <0f> 0b 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41 54
RSP: 0018:ffffc9000a14ee00 EFLAGS: 00010287
RAX: ffffffff82509b96 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc9000fbb8000 RSI: 000000000002f365 RDI: 000000000002f366
RBP: ffffc9000a14eed0 R08: ffffffff82509a23 R09: ffffed100c7d3819
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92001429dc4
R13: ffff888063e9c000 R14: 1ffff92001429dca R15: 1ffff1100c7d3800
FS:  00007f92ee7966c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5bc4d08178 CR3: 000000007cdfa000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/28 09:03 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in jbd2_cleanup_journal_tail
2024/09/28 09:03 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in jbd2_cleanup_journal_tail
2024/09/17 06:16 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in jbd2_cleanup_journal_tail
2024/09/17 06:16 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in jbd2_cleanup_journal_tail
2024/09/28 07:23 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 kernel BUG in jbd2_cleanup_journal_tail
2024/09/28 07:23 linux-6.1.y e526b12bf916 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 kernel BUG in jbd2_cleanup_journal_tail
2024/09/17 15:50 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 kernel BUG in jbd2_cleanup_journal_tail
2024/09/17 02:30 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 kernel BUG in jbd2_cleanup_journal_tail
2024/09/17 02:29 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 kernel BUG in jbd2_cleanup_journal_tail
* Struck through repros no longer work on HEAD.