syzbot


general protection fault in gfs2_lookup_simple

Status: fixed on 2023/10/12 12:47
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+57e590d90f42e6e925df@syzkaller.appspotmail.com
Fix commit: 111c7d27a1b7 gfs2: Use mapping->gfp_mask for metadata inodes
First crash: 269d, last: 268d
Cause bisection: introduced by (bisect log) :
commit 8f18190e31734e434a650d3435da072f03fe485f
Author: Andreas Gruenbacher <agruenba@redhat.com>
Date: Wed Jul 26 21:17:53 2023 +0000

  gfs2: Use mapping->gfp_mask for metadata inodes

Crash: BUG: unable to handle kernel NULL pointer dereference in gfs2_lookup_simple (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [gfs2?] general protection fault in gfs2_lookup_simple 0 (1) 2023/08/06 00:38
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/08/06 09:35 20m hdanton@sina.com https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master OK log

Sample crash report:
gfs2: fsid=noΒΕ ar?d: Trying to join cluster "lock_nolock", "noΒΕ ar?d"
gfs2: fsid=noΒΕ ar?d: Now mounting FS (format 1801)...
syz-executor418: attempt to access beyond end of device
loop0: rw=12288, sector=131072, nr_sectors = 8 limit=32768
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 1 PID: 5032 Comm: syz-executor418 Not tainted 6.5.0-rc4-next-20230801-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023
RIP: 0010:gfs2_lookup_simple+0xc6/0x160 fs/gfs2/inode.c:286
Code: 74 24 20 f7 d0 89 44 24 20 e8 66 d3 ff ff 48 85 c0 0f 84 85 00 00 00 48 89 c3 e8 e5 01 e3 fd 48 8d 7b 30 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 7b 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 30 49
RSP: 0018:ffffc900039ef848 EFLAGS: 00010206
RAX: 0000000000000005 RBX: fffffffffffffffb RCX: 0000000000000000
RDX: ffff888015bf8000 RSI: ffffffff83a38d4b RDI: 000000000000002b
RBP: 1ffff9200073df09 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: dffffc0000000000
R13: ffffffff8ab99700 R14: ffff888019f94000 R15: ffff8880783f06b8
FS:  00005555558fa380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557976244798 CR3: 0000000074978000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 init_journal fs/gfs2/ops_fstype.c:742 [inline]
 init_inodes+0x495/0x2e30 fs/gfs2/ops_fstype.c:885
 gfs2_fill_super+0x1a9e/0x2b10 fs/gfs2/ops_fstype.c:1248
 get_tree_bdev+0x390/0x6a0 fs/super.c:1345
 gfs2_get_tree+0x4e/0x280 fs/gfs2/ops_fstype.c:1333
 vfs_get_tree+0x88/0x350 fs/super.c:1521
 do_new_mount fs/namespace.c:3335 [inline]
 path_mount+0x1492/0x1ed0 fs/namespace.c:3662
 do_mount fs/namespace.c:3675 [inline]
 __do_sys_mount fs/namespace.c:3884 [inline]
 __se_sys_mount fs/namespace.c:3861 [inline]
 __x64_sys_mount+0x293/0x310 fs/namespace.c:3861
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f6d772a2c3a
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:00007fff3af18918 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff3af18920 RCX: 00007f6d772a2c3a
RDX: 0000000020000000 RSI: 0000000020000040 RDI: 00007fff3af18920
RBP: 0000000000000004 R08: 00007fff3af18960 R09: 00000000000125fe
R10: 0000000000000819 R11: 0000000000000282 R12: 00007fff3af18960
R13: 0000000000000003 R14: 0000000001000000 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:gfs2_lookup_simple+0xc6/0x160 fs/gfs2/inode.c:286
Code: 74 24 20 f7 d0 89 44 24 20 e8 66 d3 ff ff 48 85 c0 0f 84 85 00 00 00 48 89 c3 e8 e5 01 e3 fd 48 8d 7b 30 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 7b 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 30 49
RSP: 0018:ffffc900039ef848 EFLAGS: 00010206
RAX: 0000000000000005 RBX: fffffffffffffffb RCX: 0000000000000000
RDX: ffff888015bf8000 RSI: ffffffff83a38d4b RDI: 000000000000002b
RBP: 1ffff9200073df09 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: dffffc0000000000
R13: ffffffff8ab99700 R14: ffff888019f94000 R15: ffff8880783f06b8
FS:  00005555558fa380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564e741eb538 CR3: 0000000074978000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	74 24                	je     0x26
   2:	20 f7                	and    %dh,%bh
   4:	d0 89 44 24 20 e8    	rorb   -0x17dfdbbc(%rcx)
   a:	66 d3 ff             	sar    %cl,%di
   d:	ff 48 85             	decl   -0x7b(%rax)
  10:	c0 0f 84             	rorb   $0x84,(%rdi)
  13:	85 00                	test   %eax,(%rax)
  15:	00 00                	add    %al,(%rax)
  17:	48 89 c3             	mov    %rax,%rbx
  1a:	e8 e5 01 e3 fd       	call   0xfde30204
  1f:	48 8d 7b 30          	lea    0x30(%rbx),%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f:	75 7b                	jne    0xac
  31:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  38:	fc ff df
  3b:	4c 8b 63 30          	mov    0x30(%rbx),%r12
  3f:	49                   	rex.WB

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/02 00:48 linux-next a73466257270 df07ffe8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root general protection fault in gfs2_lookup_simple
2023/08/02 20:38 linux-next 626c67169f99 39a91c18 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in gfs2_lookup_simple
2023/08/02 00:34 linux-next a73466257270 df07ffe8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in gfs2_lookup_simple
* Struck through repros no longer work on HEAD.