[v5.15] general protection fault in gfs2_evict_inode

0 views
Skip to first unread message

syzbot

unread,
Apr 13, 2023, 4:40:48 PM4/13/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4fdad925aa1a Linux 5.15.107
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=125a2a6dc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d9bc1b227ee6c412
dashboard link: https://syzkaller.appspot.com/bug?extid=d96fa4241958012a7381
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6a7f3b0f6a27/disk-4fdad925.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/db34418039b7/vmlinux-4fdad925.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4e96525a950a/bzImage-4fdad925.xz

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

general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 0 PID: 20106 Comm: syz-executor.5 Not tainted 5.15.107-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
RIP: 0010:evict_linked_inode fs/gfs2/super.c:1336 [inline]
RIP: 0010:gfs2_evict_inode+0x163a/0x1b80 fs/gfs2/super.c:1391
Code: c6 00 09 00 00 4c 89 f0 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 f7 e8 d5 f9 39 fe bb 8c 00 00 00 49 03 1e 48 89 d8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 4c 8b 6c 24 10 0f 85 1a 04 00 00 8b 13 45 31
RSP: 0018:ffffc9000316f9c0 EFLAGS: 00010207
RAX: 0000000000000011 RBX: 000000000000008c RCX: ffff8880200e8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000316fbe0 R08: ffffffff83885489 R09: ffffed100e9e16c0
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff888074f0b770 R14: ffff88803377c900 R15: ffff88802cebb430
FS: 0000555556d5b400(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2ed23000 CR3: 000000006e6f4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
evict+0x2a4/0x620 fs/inode.c:587
gfs2_jindex_free+0x449/0x4f0 fs/gfs2/super.c:75
gfs2_put_super+0x74a/0x7c0 fs/gfs2/super.c:622
generic_shutdown_super+0x136/0x2c0 fs/super.c:475
kill_block_super+0x7a/0xe0 fs/super.c:1405
deactivate_locked_super+0xa0/0x110 fs/super.c:335
cleanup_mnt+0x44e/0x500 fs/namespace.c:1143
task_work_run+0x129/0x1a0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f5cec3e35d7
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 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:00007fff1f8599b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f5cec3e35d7
RDX: 00007fff1f859a8b RSI: 000000000000000a RDI: 00007fff1f859a80
RBP: 00007fff1f859a80 R08: 00000000ffffffff R09: 00007fff1f859850
R10: 0000555556d5c8b3 R11: 0000000000000246 R12: 00007f5cec43ccdc
R13: 00007fff1f85ab40 R14: 0000555556d5c810 R15: 00007fff1f85ab80
</TASK>
Modules linked in:
---[ end trace e09dc36b9e2301dd ]---
RIP: 0010:evict_linked_inode fs/gfs2/super.c:1336 [inline]
RIP: 0010:gfs2_evict_inode+0x163a/0x1b80 fs/gfs2/super.c:1391
Code: c6 00 09 00 00 4c 89 f0 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 f7 e8 d5 f9 39 fe bb 8c 00 00 00 49 03 1e 48 89 d8 48 c1 e8 03 <42> 0f b6 04 20 84 c0 4c 8b 6c 24 10 0f 85 1a 04 00 00 8b 13 45 31
RSP: 0018:ffffc9000316f9c0 EFLAGS: 00010207
RAX: 0000000000000011 RBX: 000000000000008c RCX: ffff8880200e8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000316fbe0 R08: ffffffff83885489 R09: ffffed100e9e16c0
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff888074f0b770 R14: ffff88803377c900 R15: ffff88802cebb430
FS: 0000555556d5b400(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f999de38300 CR3: 000000006e6f4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: c6 00 09 movb $0x9,(%rax)
3: 00 00 add %al,(%rax)
5: 4c 89 f0 mov %r14,%rax
8: 48 c1 e8 03 shr $0x3,%rax
c: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1)
11: 74 08 je 0x1b
13: 4c 89 f7 mov %r14,%rdi
16: e8 d5 f9 39 fe callq 0xfe39f9f0
1b: bb 8c 00 00 00 mov $0x8c,%ebx
20: 49 03 1e add (%r14),%rbx
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 4c 8b 6c 24 10 mov 0x10(%rsp),%r13
36: 0f 85 1a 04 00 00 jne 0x456
3c: 8b 13 mov (%rbx),%edx
3e: 45 rex.RB
3f: 31 .byte 0x31


---
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 syzk...@googlegroups.com.

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

syzbot

unread,
May 8, 2023, 5:23:57 AM5/8/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 8a7f2a5c5aa1 Linux 5.15.110
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1380c9d4280000
kernel config: https://syzkaller.appspot.com/x/.config?x=7e93d602da27af41
dashboard link: https://syzkaller.appspot.com/bug?extid=d96fa4241958012a7381
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12942232280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13dac832280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/16bea75b636d/disk-8a7f2a5c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3b169e33dcf2/vmlinux-8a7f2a5c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/190d08a00950/Image-8a7f2a5c.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/0e64d71f6559/mount_0.gz

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

gfs2: fsid=loop0.0: first mount done, others may mount
Unable to handle kernel paging request at virtual address dfff800000000011
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
[dfff800000000011] address between user and kernel address ranges
Internal error: Oops: 96000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 3963 Comm: syz-executor506 Not tainted 5.15.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : evict_linked_inode fs/gfs2/super.c:1336 [inline]
pc : gfs2_evict_inode+0xe68/0x184c fs/gfs2/super.c:1391
lr : evict_linked_inode fs/gfs2/super.c:1334 [inline]
lr : gfs2_evict_inode+0xe44/0x184c fs/gfs2/super.c:1391
sp : ffff80001cc97520
x29: ffff80001cc97710 x28: ffff80001cc97670 x27: ffff0000c86d1278
x26: ffff0000c86d0fd8 x25: 000000000000008c x24: ffff0000c7a80000
x23: dfff800000000000 x22: 0000000000008000 x21: 1fffe0001bf97322
x20: ffff0000dfcb9908 x19: ffff0000dfcb9458 x18: ffff80001cc970e0
x17: 1fffe00036903d8e x16: ffff80000824cb7c x15: 000000000000bf45
x14: 1ffff0000291a06a x13: ffffffffffffffff x12: 0000000000000000
x11: ff8080000a26f930 x10: 0000000000000000 x9 : ffff80000a26f930
x8 : 0000000000000011 x7 : ffff800008a35df8 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff80000a26f8e0
x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
evict_linked_inode fs/gfs2/super.c:1336 [inline]
gfs2_evict_inode+0xe68/0x184c fs/gfs2/super.c:1391
evict+0x260/0x68c fs/inode.c:587
iput_final fs/inode.c:1663 [inline]
iput+0x744/0x824 fs/inode.c:1689
gfs2_jindex_free+0x334/0x3e4 fs/gfs2/super.c:75
gfs2_put_super+0x5dc/0x684 fs/gfs2/super.c:622
generic_shutdown_super+0x130/0x29c fs/super.c:475
kill_block_super+0x70/0xdc fs/super.c:1405
gfs2_kill_sb+0xc0/0xd4
deactivate_locked_super+0xb8/0x13c fs/super.c:335
deactivate_super+0x108/0x128 fs/super.c:366
cleanup_mnt+0x3c0/0x474 fs/namespace.c:1143
__cleanup_mnt+0x20/0x30 fs/namespace.c:1150
task_work_run+0x130/0x1e4 kernel/task_work.c:164
exit_task_work include/linux/task_work.h:32 [inline]
do_exit+0x688/0x2134 kernel/exit.c:872
do_group_exit+0x110/0x268 kernel/exit.c:994
__do_sys_exit_group kernel/exit.c:1005 [inline]
__se_sys_exit_group kernel/exit.c:1003 [inline]
__wake_up_parent+0x0/0x60 kernel/exit.c:1003
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: 9797d562 f9400328 91023119 d343ff28 (38f76908)
---[ end trace 39c99a9771f789be ]---
----------------
Code disassembly (best guess):
0: 9797d562 bl 0xfffffffffe5f5588
4: f9400328 ldr x8, [x25]
8: 91023119 add x25, x8, #0x8c
c: d343ff28 lsr x8, x25, #3
* 10: 38f76908 ldrsb w8, [x8, x23] <-- trapping instruction


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

syzbot

unread,
Jul 7, 2023, 12:03:29 PM7/7/23
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit fd8b4e28f400a067e6ef84569816967be1f0642b
Author: Bob Peterson <rpet...@redhat.com>
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=16d16b08a80000
start commit: 1fe619a7d252 Linux 5.15.113
git tree: linux-5.15.y
kernel config: https://syzkaller.appspot.com/x/.config?x=ab36330fd14820aa
dashboard link: https://syzkaller.appspot.com/bug?extid=d96fa4241958012a7381
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16119415280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1523f815280000

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
Reply all
Reply to author
Forward
0 new messages