syzbot


general protection fault in gfs2_rindex_update

Status: upstream: reported C repro on 2024/02/08 09:52
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+74edb1a3ea8f1c65a086@syzkaller.appspotmail.com
First crash: 72d, last: 42d
Cause bisection: introduced by (bisect log) :
commit de3f906f0af0c3f5d862b07df4d020c9322cd9c3
Author: Andreas Gruenbacher <agruenba@redhat.com>
Date: Thu Jun 2 20:15:02 2022 +0000

  gfs2: Revert 'Fix "truncate in progress" hang'

Crash: BUG: unable to handle kernel NULL pointer dereference in gfs2_rindex_update (log)
Repro: C syz .config
  
Fix bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly gfs2 report (Feb 2024) 0 (1) 2024/02/23 21:27
[syzbot] [gfs2?] general protection fault in gfs2_rindex_update 1 (4) 2024/02/09 16:10
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel NULL pointer dereference in gfs2_rindex_update gfs2 C error done 4 127d 485d 26/26 fixed on 2024/01/30 15:47
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/03/09 20:50 17m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2024/02/22 10:07 15m retest repro upstream report log

Sample crash report:
loop0: detected capacity change from 0 to 32768
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS (format 1801)...
gfs2: fsid=syz:syz.0: journal 0 mapped with 20 extents in 0ms
general protection fault, probably for non-canonical address 0xdffffc0000000097: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x00000000000004b8-0x00000000000004bf]
CPU: 0 PID: 5058 Comm: syz-executor337 Not tainted 6.8.0-rc3-syzkaller-00041-g547ab8fc4cb0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:gfs2_rindex_update+0xbc/0x3d0 fs/gfs2/rgrp.c:1037
Code: e8 f9 65 1d fe 4c 8d 74 24 60 48 8b 03 48 89 44 24 38 48 8d 98 b8 04 00 00 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 c6 65 1d fe 48 8b 03 48 89 44 24 20
RSP: 0018:ffffc900040671a0 EFLAGS: 00010202
RAX: 0000000000000097 RBX: 00000000000004b8 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88807f558000
RBP: ffffc900040672b0 R08: ffffffff83cb50d7 R09: 1ffff1100f02e2f8
R10: dffffc0000000000 R11: ffffed100f02e2f9 R12: 1ffff9200080ce3c
R13: ffff88807f558000 R14: ffffc90004067200 R15: 0000000000000001
FS:  0000555555a0f380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056427a53bb08 CR3: 0000000022d54000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 punch_hole+0xe7b/0x3a30 fs/gfs2/bmap.c:1809
 gfs2_truncatei_resume+0x3c/0x70 fs/gfs2/bmap.c:2159
 gfs2_glock_holder_ready fs/gfs2/glock.c:1336 [inline]
 gfs2_glock_wait+0x1df/0x2b0 fs/gfs2/glock.c:1356
 gfs2_glock_nq_init fs/gfs2/glock.h:238 [inline]
 init_statfs fs/gfs2/ops_fstype.c:694 [inline]
 init_journal+0x1680/0x23f0 fs/gfs2/ops_fstype.c:816
 init_inodes+0xdc/0x320 fs/gfs2/ops_fstype.c:884
 gfs2_fill_super+0x1edb/0x26c0 fs/gfs2/ops_fstype.c:1263
 get_tree_bdev+0x3f7/0x570 fs/super.c:1619
 gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1341
 vfs_get_tree+0x90/0x2a0 fs/super.c:1784
 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_64+0xf9/0x240
 entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7fe98b1e18ba
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:00007ffe3b0f9eb8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe3b0f9ec0 RCX: 00007fe98b1e18ba
RDX: 0000000020000040 RSI: 0000000020000100 RDI: 00007ffe3b0f9ec0
RBP: 0000000000000004 R08: 00007ffe3b0f9f00 R09: 0000000000012783
R10: 0000000000008c1b R11: 0000000000000282 R12: 00007ffe3b0f9f00
R13: 0000000000000003 R14: 0000000001000000 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:gfs2_rindex_update+0xbc/0x3d0 fs/gfs2/rgrp.c:1037
Code: e8 f9 65 1d fe 4c 8d 74 24 60 48 8b 03 48 89 44 24 38 48 8d 98 b8 04 00 00 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 c6 65 1d fe 48 8b 03 48 89 44 24 20
RSP: 0018:ffffc900040671a0 EFLAGS: 00010202
RAX: 0000000000000097 RBX: 00000000000004b8 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88807f558000
RBP: ffffc900040672b0 R08: ffffffff83cb50d7 R09: 1ffff1100f02e2f8
R10: dffffc0000000000 R11: ffffed100f02e2f9 R12: 1ffff9200080ce3c
R13: ffff88807f558000 R14: ffffc90004067200 R15: 0000000000000001
FS:  0000555555a0f380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056427a53bb08 CR3: 0000000022d54000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	e8 f9 65 1d fe       	call   0xfe1d65fe
   5:	4c 8d 74 24 60       	lea    0x60(%rsp),%r14
   a:	48 8b 03             	mov    (%rbx),%rax
   d:	48 89 44 24 38       	mov    %rax,0x38(%rsp)
  12:	48 8d 98 b8 04 00 00 	lea    0x4b8(%rax),%rbx
  19:	48 89 d8             	mov    %rbx,%rax
  1c:	48 c1 e8 03          	shr    $0x3,%rax
  20:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  27:	fc ff df
* 2a:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 c6 65 1d fe       	call   0xfe1d65fe
  38:	48 8b 03             	mov    (%rbx),%rax
  3b:	48 89 44 24 20       	mov    %rax,0x20(%rsp)

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/08 09:57 upstream 547ab8fc4cb0 6404acf9 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs general protection fault in gfs2_rindex_update
2024/02/24 19:59 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9abbc24128bc 8d446f15 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in gfs2_rindex_update
2024/02/08 09:41 upstream 547ab8fc4cb0 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_rindex_update
* Struck through repros no longer work on HEAD.