linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail
@ 2024-09-29 17:12 syzbot
  2024-09-30  9:00 ` Lizhi Xu
  2024-10-09 12:32 ` syzbot
  0 siblings, 2 replies; 4+ messages in thread
From: syzbot @ 2024-09-29 17:12 UTC (permalink / raw)
  To: jack, jlbec, joseph.qi, linux-ext4, linux-kernel, mark,
	ocfs2-devel, syzkaller-bugs, tytso

Hello,

syzbot found the following issue on:

HEAD commit:    684a64bf32b6 Merge tag 'nfs-for-6.12-1' of git://git.linux..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=138c0907980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=bd75e1a00004094f
dashboard link: https://syzkaller.appspot.com/bug?extid=96ee12698391289383dd
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13bea99f980000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=17d04aa9980000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-684a64bf.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f05b4b08a420/vmlinux-684a64bf.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d59f9edaf3bc/bzImage-684a64bf.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/a82758cb7d80/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+96ee12698391289383dd@syzkaller.appspotmail.com

(syz-executor214,5103,0):ocfs2_block_check_validate:402 ERROR: CRC32 failed: stored: 0xb3775c19, computed 0x2dd1c265. Applying ECC.
JBD2: Ignoring recovery information on journal
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5103 at fs/jbd2/journal.c:1887 jbd2_journal_update_sb_log_tail+0x2ba/0x360 fs/jbd2/journal.c:1887
Modules linked in:
CPU: 0 UID: 0 PID: 5103 Comm: syz-executor214 Not tainted 6.11.0-syzkaller-10547-g684a64bf32b6 #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:jbd2_journal_update_sb_log_tail+0x2ba/0x360 fs/jbd2/journal.c:1887
Code: 1c ff 41 80 3c 2c 00 74 08 4c 89 ff e8 9f 71 86 ff 41 80 27 f7 4c 89 f7 e8 f3 1c 56 09 31 ed e9 72 fe ff ff e8 47 c4 1c ff 90 <0f> 0b 90 41 80 3c 2c 00 75 d5 eb db 44 89 f1 80 e1 07 80 c1 03 38
RSP: 0018:ffffc90000e46d70 EFLAGS: 00010293
RAX: ffffffff8277f0f9 RBX: 0000000000000000 RCX: ffff8880002ba440
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff8277f0c9 R09: fffff520001c8d9c
R10: dffffc0000000000 R11: fffff520001c8d9c R12: 1ffff1100808bc00
R13: ffff88803d2e301c R14: ffff88804045e0b0 R15: ffff88804045e000
FS:  000055558c7ca380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd277995ed8 CR3: 000000003fef2000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 journal_reset fs/jbd2/journal.c:1779 [inline]
 jbd2_journal_load+0x708/0xbc0 fs/jbd2/journal.c:2109
 ocfs2_journal_load+0xed/0x6d0 fs/ocfs2/journal.c:1143
 ocfs2_check_volume fs/ocfs2/super.c:2421 [inline]
 ocfs2_mount_volume+0xc12/0x1940 fs/ocfs2/super.c:1817
 ocfs2_fill_super+0x475a/0x5750 fs/ocfs2/super.c:1084
 mount_bdev+0x20a/0x2d0 fs/super.c:1679
 legacy_get_tree+0xee/0x190 fs/fs_context.c:662
 vfs_get_tree+0x90/0x2b0 fs/super.c:1800
 do_new_mount+0x2be/0xb40 fs/namespace.c:3507
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4055 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032
 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:0x7fb2af90112a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe3f741ce8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe3f741d00 RCX: 00007fb2af90112a
RDX: 0000000020004740 RSI: 0000000020004780 RDI: 00007ffe3f741d00
RBP: 0000000000000004 R08: 00007ffe3f741d40 R09: 0000000000004701
R10: 000000000100000a R11: 0000000000000282 R12: 000000000100000a
R13: 00007ffe3f741d40 R14: 0000000000000003 R15: 0000000001000000
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail
  2024-09-29 17:12 [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail syzbot
@ 2024-09-30  9:00 ` Lizhi Xu
  2024-09-30  9:21   ` [syzbot] " syzbot
  2024-10-09 12:32 ` syzbot
  1 sibling, 1 reply; 4+ messages in thread
From: Lizhi Xu @ 2024-09-30  9:00 UTC (permalink / raw)
  To: syzbot+96ee12698391289383dd
  Cc: jack, jlbec, joseph.qi, linux-ext4, linux-kernel, mark,
	ocfs2-devel, syzkaller-bugs, tytso

The s_sequence value of journal superblock loaded from disk is 4294967295,
is it too large?

#syz test

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 97f487c3d8fc..563c4af533ac 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1397,6 +1397,12 @@ static int journal_check_superblock(journal_t *journal)
 		}
 	}
 
+	if (sb->s_sequence == U32_MAX) {
+		pr_err("JBD2: Load a too big s_sequence: %u, %s\n", 
+			sb->s_sequence, __func__);
+		return err;
+	}
+
 	return 0;
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail
  2024-09-30  9:00 ` Lizhi Xu
@ 2024-09-30  9:21   ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2024-09-30  9:21 UTC (permalink / raw)
  To: jack, jlbec, joseph.qi, linux-ext4, linux-kernel, lizhi.xu, mark,
	ocfs2-devel, syzkaller-bugs, tytso

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+96ee12698391289383dd@syzkaller.appspotmail.com
Tested-by: syzbot+96ee12698391289383dd@syzkaller.appspotmail.com

Tested on:

commit:         9852d85e Linux 6.12-rc1
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13d33d07980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e38805c95ef88a95
dashboard link: https://syzkaller.appspot.com/bug?extid=96ee12698391289383dd
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=10e36980580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail
  2024-09-29 17:12 [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail syzbot
  2024-09-30  9:00 ` Lizhi Xu
@ 2024-10-09 12:32 ` syzbot
  1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2024-10-09 12:32 UTC (permalink / raw)
  To: jack, jlbec, joseph.qi, li.kai4, linux-ext4, linux-kernel,
	lizhi.xu, mark, ocfs2-devel, syzkaller-bugs, tytso

syzbot has bisected this issue to:

commit a09decff5c32060639a685581c380f51b14e1fc2
Author: Kai Li <li.kai4@h3c.com>
Date:   Sat Jan 11 02:25:42 2020 +0000

    jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=166bd7d0580000
start commit:   5b7c893ed5ed Merge tag 'ntfs3_for_6.12' of https://github...
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=156bd7d0580000
console output: https://syzkaller.appspot.com/x/log.txt?x=116bd7d0580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=7a3fccdd0bb995
dashboard link: https://syzkaller.appspot.com/bug?extid=96ee12698391289383dd
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15d0d7d0580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=14351f9f980000

Reported-by: syzbot+96ee12698391289383dd@syzkaller.appspotmail.com
Fixes: a09decff5c32 ("jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-09 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-29 17:12 [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail syzbot
2024-09-30  9:00 ` Lizhi Xu
2024-09-30  9:21   ` [syzbot] " syzbot
2024-10-09 12:32 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).