2022-06-27 07:45:59

by syzbot

[permalink] [raw]
Subject: [syzbot] general protection fault in gfs2_evict_inode (2)

Hello,

syzbot found the following issue on:

HEAD commit: ca1fdab7fd27 Merge tag 'efi-urgent-for-v5.19-1' of git://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=102e8560080000
kernel config: https://syzkaller.appspot.com/x/.config?x=542d3d75f0e6f36f
dashboard link: https://syzkaller.appspot.com/bug?extid=8a5fc6416c175cecea34
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

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

gfs2: fsid=syz:syz.0: first mount done, others may mount
general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 1 PID: 10573 Comm: syz-executor.0 Not tainted 5.19.0-rc3-syzkaller-00038-gca1fdab7fd27 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:evict_linked_inode fs/gfs2/super.c:1329 [inline]
RIP: 0010:gfs2_evict_inode+0xbf2/0x2030 fs/gfs2/super.c:1384
Code: 03 80 3c 02 00 0f 85 bd 13 00 00 48 8b 9d 00 09 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 8c 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 e0
RSP: 0018:ffffc90005ae7670 EFLAGS: 00010217
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc90003a83000
RDX: 0000000000000011 RSI: ffffffff838de301 RDI: 000000000000008c
RBP: ffff88802cd6c000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
R13: ffff88802e1a5160 R14: ffff88802e1a5698 R15: ffff88802e1a5610
FS: 00007f4c042c5700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa58679d090 CR3: 000000007d0e3000 CR4: 0000000000350ee0
Call Trace:
<TASK>
evict+0x2ed/0x6b0 fs/inode.c:664
iput_final fs/inode.c:1744 [inline]
iput.part.0+0x562/0x820 fs/inode.c:1770
iput+0x58/0x70 fs/inode.c:1760
init_journal fs/gfs2/ops_fstype.c:870 [inline]
init_inodes+0x28c/0x2720 fs/gfs2/ops_fstype.c:924
gfs2_fill_super+0x1b49/0x28a0 fs/gfs2/ops_fstype.c:1242
get_tree_bdev+0x440/0x760 fs/super.c:1292
gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1325
vfs_get_tree+0x89/0x2f0 fs/super.c:1497
do_new_mount fs/namespace.c:3040 [inline]
path_mount+0x1320/0x1fa0 fs/namespace.c:3370
do_mount fs/namespace.c:3383 [inline]
__do_sys_mount fs/namespace.c:3591 [inline]
__se_sys_mount fs/namespace.c:3568 [inline]
__x64_sys_mount+0x27f/0x300 fs/namespace.c:3568
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7f4c0308a63a
Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 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:00007f4c042c4f88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f4c0308a63a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f4c042c4fe0
RBP: 00007f4c042c5020 R08: 00007f4c042c5020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000
R13: 0000000020000100 R14: 00007f4c042c4fe0 R15: 0000000020047a20
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:evict_linked_inode fs/gfs2/super.c:1329 [inline]
RIP: 0010:gfs2_evict_inode+0xbf2/0x2030 fs/gfs2/super.c:1384
Code: 03 80 3c 02 00 0f 85 bd 13 00 00 48 8b 9d 00 09 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 8c 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 e0
RSP: 0018:ffffc90005ae7670 EFLAGS: 00010217
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc90003a83000
RDX: 0000000000000011 RSI: ffffffff838de301 RDI: 000000000000008c
RBP: ffff88802cd6c000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
R13: ffff88802e1a5160 R14: ffff88802e1a5698 R15: ffff88802e1a5610
FS: 00007f4c042c5700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa58679d090 CR3: 000000007d0e3000 CR4: 0000000000350ee0
----------------
Code disassembly (best guess):
0: 03 80 3c 02 00 0f add 0xf00023c(%rax),%eax
6: 85 bd 13 00 00 48 test %edi,0x48000013(%rbp)
c: 8b 9d 00 09 00 00 mov 0x900(%rbp),%ebx
12: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
19: fc ff df
1c: 48 8d bb 8c 00 00 00 lea 0x8c(%rbx),%rdi
23: 48 89 fa mov %rdi,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx <-- trapping instruction
2e: 48 89 f8 mov %rdi,%rax
31: 83 e0 07 and $0x7,%eax
34: 83 c0 03 add $0x3,%eax
37: 38 d0 cmp %dl,%al
39: 7c 08 jl 0x43
3b: 84 d2 test %dl,%dl
3d: 0f .byte 0xf
3e: 85 e0 test %esp,%eax


---
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.


2022-12-18 06:49:17

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] [gfs2?] general protection fault in gfs2_evict_inode (2)

syzbot has found a reproducer for the following issue on:

HEAD commit: a5541c0811a0 Merge branch 'for-next/core' into for-kernelci
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=15551327880000
kernel config: https://syzkaller.appspot.com/x/.config?x=cbd4e584773e9397
dashboard link: https://syzkaller.appspot.com/bug?extid=8a5fc6416c175cecea34
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1718796f880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1735df8f880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4b7702208fb9/disk-a5541c08.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9ec0153ec051/vmlinux-a5541c08.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6f8725ad290a/Image-a5541c08.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b4c763067524/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: error recovering journal 0: -5
Unable to handle kernel NULL pointer dereference at virtual address 000000000000008c
Mem abort info:
ESR = 0x0000000096000006
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
Data abort info:
ISV = 0, ISS = 0x00000006
CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=000000010dd7c000
[000000000000008c] pgd=080000010bf77003, p4d=080000010bf77003, pud=080000010a9f1003, pmd=0000000000000000
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 3071 Comm: syz-executor179 Not tainted 6.1.0-rc8-syzkaller-33330-ga5541c0811a0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : evict_linked_inode fs/gfs2/super.c:1330 [inline]
pc : gfs2_evict_inode+0x6f8/0x918 fs/gfs2/super.c:1385
lr : evict_linked_inode fs/gfs2/super.c:1328 [inline]
lr : gfs2_evict_inode+0x6ec/0x918 fs/gfs2/super.c:1385
sp : ffff80000ff73830
x29: ffff80000ff738a0 x28: 0000000000000000 x27: 0000000000000000
x26: ffff0000cb74c728 x25: 0000000000008004 x24: ffff0000c9b25110
x23: ffff0000cb74c000 x22: ffff0000c9b24e70 x21: ffff0000cb74c000
x20: ffff0000ca579770 x19: ffff0000ca5792c0 x18: 00000000000000c0
x17: ffff80000dda8198 x16: ffff80000dbe6158 x15: ffff0000c407cec0
x14: 00000000000000b8 x13: 00000000ffffffff x12: ffff0000c407cec0
x11: ff80800009278314 x10: 0000000000000000 x9 : ffff800009278314
x8 : 0000000000000000 x7 : ffff80000862aa80 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffff0000cb74c000
Call trace:
evict_linked_inode fs/gfs2/super.c:1330 [inline]
gfs2_evict_inode+0x6f8/0x918 fs/gfs2/super.c:1385
evict+0xec/0x334 fs/inode.c:664
iput_final fs/inode.c:1747 [inline]
iput+0x2c4/0x324 fs/inode.c:1773
gfs2_jindex_free+0x10c/0x16c fs/gfs2/super.c:75
init_journal+0x518/0xcbc fs/gfs2/ops_fstype.c:871
init_inodes+0x74/0x184 fs/gfs2/ops_fstype.c:889
gfs2_fill_super+0x630/0x874 fs/gfs2/ops_fstype.c:1247
get_tree_bdev+0x1e8/0x2a0 fs/super.c:1324
gfs2_get_tree+0x30/0xc0 fs/gfs2/ops_fstype.c:1330
vfs_get_tree+0x40/0x140 fs/super.c:1531
do_new_mount+0x1dc/0x4e4 fs/namespace.c:3040
path_mount+0x358/0x890 fs/namespace.c:3370
do_mount fs/namespace.c:3383 [inline]
__do_sys_mount fs/namespace.c:3591 [inline]
__se_sys_mount fs/namespace.c:3568 [inline]
__arm64_sys_mount+0x2c4/0x3c4 fs/namespace.c:3568
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x48/0x140 arch/arm64/kernel/syscall.c:197
el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
Code: 97ff3736 f94482e8 aa1703e0 2a1f03e1 (b9408d02)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 97ff3736 bl 0xfffffffffffcdcd8
4: f94482e8 ldr x8, [x23, #2304]
8: aa1703e0 mov x0, x23
c: 2a1f03e1 mov w1, wzr
* 10: b9408d02 ldr w2, [x8, #140] <-- trapping instruction

2023-06-12 21:11:33

by syzbot

[permalink] [raw]
Subject: Re: [syzbot] [gfs2?] general protection fault in gfs2_evict_inode (2)

syzbot suspects this issue was fixed by commit:

commit 504a10d9e46bc37b23d0a1ae2f28973c8516e636
Author: Bob Peterson <[email protected]>
Date: Fri Apr 28 16:07:46 2023 +0000

gfs2: Don't deref jdesc in evict

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1544372d280000
start commit: 7df047b3f0aa Merge tag 'vfio-v6.4-rc1' of https://github.c..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=474780ac1e194316
dashboard link: https://syzkaller.appspot.com/bug?extid=8a5fc6416c175cecea34
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1294d2d2280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=104a7508280000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: gfs2: Don't deref jdesc in evict

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

2023-06-14 09:22:30

by Dmitry Vyukov

[permalink] [raw]
Subject: Re: [syzbot] [gfs2?] general protection fault in gfs2_evict_inode (2)

On Mon, 12 Jun 2023 at 23:05, syzbot
<[email protected]> wrote:
>
> syzbot suspects this issue was fixed by commit:
>
> commit 504a10d9e46bc37b23d0a1ae2f28973c8516e636
> Author: Bob Peterson <[email protected]>
> Date: Fri Apr 28 16:07:46 2023 +0000
>
> gfs2: Don't deref jdesc in evict
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1544372d280000
> start commit: 7df047b3f0aa Merge tag 'vfio-v6.4-rc1' of https://github.c..
> git tree: upstream
> kernel config: https://syzkaller.appspot.com/x/.config?x=474780ac1e194316
> dashboard link: https://syzkaller.appspot.com/bug?extid=8a5fc6416c175cecea34
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1294d2d2280000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=104a7508280000
>
> If the result looks correct, please mark the issue as fixed by replying with:
>
> #syz fix: gfs2: Don't deref jdesc in evict

Looks reasonable:

#syz fix: gfs2: Don't deref jdesc in evict