2024-06-02 06:20:31

by syzbot

[permalink] [raw]
Subject: [syzbot] [gfs2?] BUG: corrupted list in gfs2_fill_super

Hello,

syzbot found the following issue on:

HEAD commit: 9d99040b1bc8 Add linux-next specific files for 20240529
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=166afa9a980000
kernel config: https://syzkaller.appspot.com/x/.config?x=735e953fee00ec19
dashboard link: https://syzkaller.appspot.com/bug?extid=d34c2a269ed512c531b0
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=100817e6980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f0deeb27b28b/disk-9d99040b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5acd2205cee1/vmlinux-9d99040b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/222eebb6b9d8/bzImage-9d99040b.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/c09aa7fc8a5a/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

gfs2: fsid=syz:syz.0: can't create logd thread: -4
list_del corruption, ffff88806f0fe010->prev is LIST_POISON2 (dead000000000122)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:61!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 PID: 5367 Comm: syz-executor.1 Not tainted 6.10.0-rc1-next-20240529-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:__list_del_entry_valid_or_report+0x106/0x140 lib/list_debug.c:59
Code: e8 6f 50 d0 06 90 0f 0b 48 c7 c7 e0 03 20 8c 4c 89 fe e8 5d 50 d0 06 90 0f 0b 48 c7 c7 40 04 20 8c 4c 89 fe e8 4b 50 d0 06 90 <0f> 0b 48 c7 c7 a0 04 20 8c 4c 89 fe 48 89 d9 e8 36 50 d0 06 90 0f
RSP: 0018:ffffc9000313f928 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 0a380b9a54d54400
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: 1ffff11005247900 R08: ffffffff8176b139 R09: 1ffff92000627ec0
R10: dffffc0000000000 R11: fffff52000627ec1 R12: dffffc0000000000
R13: ffff88806f0fe000 R14: ffff88806f0fdc10 R15: ffff88806f0fe010
FS: 000055558b8fd480(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055776d320f00 CR3: 000000002dc2c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__list_del_entry_valid include/linux/list.h:124 [inline]
__list_del_entry include/linux/list.h:215 [inline]
list_del_rcu include/linux/rculist.h:157 [inline]
destroy_workqueue+0x7b3/0xc40 kernel/workqueue.c:5859
gfs2_fill_super+0x12a4/0x2520 fs/gfs2/ops_fstype.c:1311
get_tree_bdev+0x3f7/0x570 fs/super.c:1615
gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1330
vfs_get_tree+0x90/0x2a0 fs/super.c:1780
do_new_mount+0x2be/0xb40 fs/namespace.c:3352
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875
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:0x7f40a8e7e5ea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe7139d798 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe7139d820 RCX: 00007f40a8e7e5ea
RDX: 0000000020000200 RSI: 00000000200002c0 RDI: 00007ffe7139d7e0
RBP: 0000000020000200 R08: 00007ffe7139d820 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000200002c0
R13: 00007ffe7139d7e0 R14: 0000000000037f59 R15: 0000000020000140
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x106/0x140 lib/list_debug.c:59
Code: e8 6f 50 d0 06 90 0f 0b 48 c7 c7 e0 03 20 8c 4c 89 fe e8 5d 50 d0 06 90 0f 0b 48 c7 c7 40 04 20 8c 4c 89 fe e8 4b 50 d0 06 90 <0f> 0b 48 c7 c7 a0 04 20 8c 4c 89 fe 48 89 d9 e8 36 50 d0 06 90 0f
RSP: 0018:ffffc9000313f928 EFLAGS: 00010246
RAX: 000000000000004e RBX: dead000000000122 RCX: 0a380b9a54d54400
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: 1ffff11005247900 R08: ffffffff8176b139 R09: 1ffff92000627ec0
R10: dffffc0000000000 R11: fffff52000627ec1 R12: dffffc0000000000
R13: ffff88806f0fe000 R14: ffff88806f0fdc10 R15: ffff88806f0fe010
FS: 000055558b8fd480(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9b37cbc000 CR3: 000000002dc2c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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 [email protected].

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


2024-06-02 09:50:58

by Hillf Danton

[permalink] [raw]
Subject: Re: [syzbot] [gfs2?] BUG: corrupted list in gfs2_fill_super

On Sat, 01 Jun 2024 23:20:21 -0700
> syzbot found the following issue on:
>
> HEAD commit: 9d99040b1bc8 Add linux-next specific files for 20240529
> git tree: linux-next
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=100817e6980000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master

--- x/fs/gfs2/ops_fstype.c
+++ y/fs/gfs2/ops_fstype.c
@@ -1137,6 +1137,7 @@ static int gfs2_fill_super(struct super_
struct gfs2_sbd *sdp;
struct gfs2_holder mount_gh;
int error;
+ int destroyed = 0;

sdp = init_sbd(sb);
if (!sdp) {
@@ -1301,6 +1302,7 @@ fail_locking:
fail_lm:
complete_all(&sdp->sd_journal_ready);
gfs2_gl_hash_clear(sdp);
+ destroyed = 1;
gfs2_lm_unmount(sdp);
fail_debug:
gfs2_delete_debugfs_file(sdp);
@@ -1308,7 +1310,8 @@ fail_debug:
fail_delete_wq:
destroy_workqueue(sdp->sd_delete_wq);
fail_glock_wq:
- destroy_workqueue(sdp->sd_glock_wq);
+ if (!destroyed)
+ destroy_workqueue(sdp->sd_glock_wq);
fail_free:
free_sbd(sdp);
sb->s_fs_info = NULL;
--

2024-06-02 10:23:15

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] [gfs2?] BUG: corrupted list in gfs2_fill_super

Hello,

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

Reported-and-tested-by: [email protected]

Tested on:

commit: 0e1980c4 Add linux-next specific files for 20240531
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=120cbdfc980000
kernel config: https://syzkaller.appspot.com/x/.config?x=d9c3ca4e54577b88
dashboard link: https://syzkaller.appspot.com/bug?extid=d34c2a269ed512c531b0
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=120731f2980000

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