syzbot


general protection fault in gfs2_dump_glock

Status: fixed on 2023/02/24 13:50
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+c6fd14145e2f62ca0784@syzkaller.appspotmail.com
Fix commit: 428f651cb80b gfs2: assign rgrp glock before compute_bitstructs
First crash: 624d, last: 217d
Discussions (16)
Title Replies (including bot) Last reply
[syzbot] general protection fault in gfs2_dump_glock 0 (2) 2022/11/27 23:25
[PATCH AUTOSEL 5.15 01/27] gfs2: assign rgrp glock before compute_bitstructs 31 (31) 2022/05/18 12:24
[PATCH 4.19 00/53] 4.19.240-rc1 review 65 (65) 2022/04/30 07:56
[PATCH 5.10 00/86] 5.10.113-rc1 review 96 (96) 2022/04/27 20:32
[PATCH 5.15 000/124] 5.15.36-rc1 review 137 (137) 2022/04/27 11:11
[PATCH 5.4 00/62] 5.4.191-rc1 review 68 (68) 2022/04/27 11:06
[PATCH 5.17 000/146] 5.17.5-rc1 review 156 (156) 2022/04/27 10:01
[PATCH 4.14 00/43] 4.14.277-rc1 review 46 (46) 2022/04/27 08:52
[PATCH 4.9 00/24] 4.9.312-rc1 review 30 (30) 2022/04/27 08:44
[PATCH AUTOSEL 5.17 01/31] gfs2: assign rgrp glock before compute_bitstructs 32 (32) 2022/04/07 08:27
[PATCH AUTOSEL 4.9 1/7] gfs2: assign rgrp glock before compute_bitstructs 7 (7) 2022/04/07 01:17
[PATCH AUTOSEL 4.14 1/8] gfs2: assign rgrp glock before compute_bitstructs 8 (8) 2022/04/07 01:16
[PATCH AUTOSEL 4.19 01/11] gfs2: assign rgrp glock before compute_bitstructs 11 (11) 2022/04/07 01:16
[PATCH AUTOSEL 5.4 01/17] gfs2: assign rgrp glock before compute_bitstructs 17 (17) 2022/04/07 01:15
[PATCH AUTOSEL 5.10 01/25] gfs2: assign rgrp glock before compute_bitstructs 25 (25) 2022/04/07 01:14
[PATCH AUTOSEL 5.16 01/30] gfs2: assign rgrp glock before compute_bitstructs 30 (30) 2022/04/07 01:11
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: stack-out-of-bounds Read in gfs2_dump_glock origin:upstream C 4 14d 148d 0/3 upstream: reported C repro on 2023/05/02 11:39
upstream general protection fault in gfs2_dump_glock (2) gfs2 C done 35 9d03h 205d 0/25 upstream: reported C repro on 2023/03/06 17:44

Sample crash report:
gfs2: fsid=syz:syz.0:  H: s:SH f:H e:0 p:5084 [syz-executor292] __gfs2_lookup+0x83/0x280 fs/gfs2/inode.c:880
gfs2: fsid=syz:syz.0:  H: s:?? f:tenEHW e:0 p:0 [(ended)] psi_task_change+0x1bf/0x2f0 kernel/sched/psi.c:900
general protection fault, probably for non-canonical address 0xfbffadd79731a5dd: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0xdffd8ebcb98d2ee8-0xdffd8ebcb98d2eef]
CPU: 0 PID: 5085 Comm: syz-executor292 Not tainted 6.2.0-rc7-syzkaller-00135-g38c1e0c65865 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
RIP: 0010:pid_is_meaningful fs/gfs2/glock.c:1437 [inline]
RIP: 0010:dump_holder fs/gfs2/glock.c:2262 [inline]
RIP: 0010:gfs2_dump_glock+0xcf6/0x1bd0 fs/gfs2/glock.c:2376
Code: e8 ff f6 dc fd 31 ff 89 c3 89 c6 e8 d4 3b f3 fd 84 db 58 0f 84 a4 08 00 00 e8 56 3f f3 fd 4d 8d 74 24 20 4c 89 f0 48 c1 e8 03 <42> 0f b6 04 38 84 c0 74 08 3c 01 0f 8e c2 0a 00 00 41 0f b7 6c 24
RSP: 0018:ffffc90003f9f248 EFLAGS: 00010217
RAX: 1bffb1d79731a5dd RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff888024ec1d40 RSI: ffffffff838db8ba RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 1ffffffff18f3521 R12: dffd8ebcb98d2ecf
R13: ffffffff8a97a980 R14: dffd8ebcb98d2eef R15: dffffc0000000000
FS:  00007f4ee7d82700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4ee7d82718 CR3: 0000000020d45000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 gfs2_consist_inode_i+0x104/0x150 fs/gfs2/util.c:465
 gfs2_dirent_scan+0x2f7/0x3a0 fs/gfs2/dir.c:602
 gfs2_dirent_search+0x47d/0x580 fs/gfs2/dir.c:850
 gfs2_dir_search+0x8d/0x2d0 fs/gfs2/dir.c:1650
 gfs2_lookupi+0x481/0x640 fs/gfs2/inode.c:328
 __gfs2_lookup+0x83/0x280 fs/gfs2/inode.c:880
 gfs2_atomic_open+0xde/0x250 fs/gfs2/inode.c:1284
 atomic_open fs/namei.c:3276 [inline]
 lookup_open.isra.0+0xb6c/0x1270 fs/namei.c:3384
 open_last_lookups fs/namei.c:3481 [inline]
 path_openat+0x975/0x2a50 fs/namei.c:3711
 do_filp_open+0x1ba/0x410 fs/namei.c:3741
 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310
 do_sys_open fs/open.c:1326 [inline]
 __do_sys_openat fs/open.c:1342 [inline]
 __se_sys_openat fs/open.c:1337 [inline]
 __x64_sys_openat+0x143/0x1f0 fs/open.c:1337
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f4eefa05a39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f4ee7d82208 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f4eefa9c538 RCX: 00007f4eefa05a39
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 00000000ffffff9c
RBP: 00007f4eefa9c530 R08: 00007f4ee7d82700 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4eefa9c53c
R13: 00007ffe0919e95f R14: 00007f4ee7d82300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:pid_is_meaningful fs/gfs2/glock.c:1437 [inline]
RIP: 0010:dump_holder fs/gfs2/glock.c:2262 [inline]
RIP: 0010:gfs2_dump_glock+0xcf6/0x1bd0 fs/gfs2/glock.c:2376
Code: e8 ff f6 dc fd 31 ff 89 c3 89 c6 e8 d4 3b f3 fd 84 db 58 0f 84 a4 08 00 00 e8 56 3f f3 fd 4d 8d 74 24 20 4c 89 f0 48 c1 e8 03 <42> 0f b6 04 38 84 c0 74 08 3c 01 0f 8e c2 0a 00 00 41 0f b7 6c 24
RSP: 0018:ffffc90003f9f248 EFLAGS: 00010217
RAX: 1bffb1d79731a5dd RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff888024ec1d40 RSI: ffffffff838db8ba RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 1ffffffff18f3521 R12: dffd8ebcb98d2ecf
R13: ffffffff8a97a980 R14: dffd8ebcb98d2eef R15: dffffc0000000000
FS:  00007f4ee7d82700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4ee7d82718 CR3: 0000000020d45000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	e8 ff f6 dc fd       	callq  0xfddcf704
   5:	31 ff                	xor    %edi,%edi
   7:	89 c3                	mov    %eax,%ebx
   9:	89 c6                	mov    %eax,%esi
   b:	e8 d4 3b f3 fd       	callq  0xfdf33be4
  10:	84 db                	test   %bl,%bl
  12:	58                   	pop    %rax
  13:	0f 84 a4 08 00 00    	je     0x8bd
  19:	e8 56 3f f3 fd       	callq  0xfdf33f74
  1e:	4d 8d 74 24 20       	lea    0x20(%r12),%r14
  23:	4c 89 f0             	mov    %r14,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 38       	movzbl (%rax,%r15,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	74 08                	je     0x3b
  33:	3c 01                	cmp    $0x1,%al
  35:	0f 8e c2 0a 00 00    	jle    0xafd
  3b:	41                   	rex.B
  3c:	0f                   	.byte 0xf
  3d:	b7 6c                	mov    $0x6c,%bh
  3f:	24                   	.byte 0x24

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/11 00:21 upstream 38c1e0c65865 95871dcc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root general protection fault in gfs2_dump_glock
2022/12/11 11:28 upstream 296a7b7eb792 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/11/27 23:24 upstream faf68e3523c2 f4470a7b .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs KASAN: stack-out-of-bounds Read in gfs2_dump_glock
2022/12/26 21:09 upstream 1b929c02afd3 9da18ae8 .config strace log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs general protection fault in gfs2_dump_glock
2023/02/22 17:21 upstream 5b7c4cabbb65 9f1e2cb3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2023/02/19 18:18 upstream 925cf0457d7e bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2023/01/12 04:23 upstream 7dd4b804e080 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2023/01/10 08:53 upstream 5a41237ad1d4 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2023/01/08 05:19 upstream 0a71553536d2 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/26 07:17 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/26 04:03 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/25 05:15 upstream 72a85e2b0a1e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in gfs2_dump_glock
2022/12/20 02:52 upstream 2f26e424552e c52b2efb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in gfs2_dump_glock
2022/12/16 18:15 upstream 84e57d292203 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/11 09:18 upstream 296a7b7eb792 67be1ae7 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in gfs2_dump_glock
2022/12/04 15:39 upstream c2bf05db6c78 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/03 22:37 upstream 97ee9d1c1696 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/02 00:01 upstream ef4d3ea40565 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in gfs2_dump_glock
2022/12/01 22:15 upstream ef4d3ea40565 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/01 03:54 upstream 04aa64375f48 4c2a66e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/12/01 03:43 upstream 04aa64375f48 4c2a66e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in gfs2_dump_glock
2022/01/12 04:08 upstream 6f38be8f2ccd 44d1319a .config console log report info ci-qemu-upstream general protection fault in gfs2_dump_glock
2022/12/11 08:35 linux-next 591cd61541b9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in gfs2_dump_glock
2023/02/18 02:53 upstream ec35307e18ba cf8c2d39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: global-out-of-bounds Read in gfs2_dump_glock
2023/01/12 22:17 upstream e8f60cd7db24 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: vmalloc-out-of-bounds Read in gfs2_dump_glock
* Struck through repros no longer work on HEAD.