syzbot


general protection fault in d_flags_for_inode

Status: upstream: reported C repro on 2022/09/25 03:17
Reported-by: syzbot+2f012b85ac8ce9be92e5@syzkaller.appspotmail.com
First crash: 88d, last: 3d16h

Cause bisection: failed (bisect log)

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3: loop0: Different NTFS' sector size (1024) and media sector size (512)
ntfs3: loop0: Mark volume as dirty due to NTFS errors
general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 1 PID: 3608 Comm: syz-executor344 Not tainted 6.1.0-rc1-syzkaller-00249-g4da34b7d175d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
RIP: 0010:d_flags_for_inode+0x21b/0x2a0 fs/dcache.c:1980
Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 90 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 20 49 8d 7c 24 08 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 69 49 83 7c 24 08 00 75 34 e8 f2 63 9f ff 41 83 cd
RSP: 0018:ffffc90003bff8c8 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: ffff888074be70f0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff81dd26b2 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000000 R11: 000000000008c07e R12: 0000000000000000
R13: 0000000000000008 R14: ffff888074acc380 R15: 0000000000000000
FS:  00005555560af300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffea4ce8000 CR3: 000000001f763000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 __d_add fs/dcache.c:2787 [inline]
 d_splice_alias+0x19c/0xd30 fs/dcache.c:3182
 lookup_open.isra.0+0x76a/0x12a0 fs/namei.c:3391
 open_last_lookups fs/namei.c:3481 [inline]
 path_openat+0x996/0x2860 fs/namei.c:3710
 do_filp_open+0x1b6/0x400 fs/namei.c:3740
 do_sys_openat2+0x16d/0x4c0 fs/open.c:1310
 do_sys_open fs/open.c:1326 [inline]
 __do_sys_open fs/open.c:1334 [inline]
 __se_sys_open fs/open.c:1330 [inline]
 __x64_sys_open+0x119/0x1c0 fs/open.c:1330
 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+0x63/0xcd
RIP: 0033:0x7f73f04faf79
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffea4ce7648 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f73f04faf79
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000080
RBP: 00007f73f04ba740 R08: 00005555560af2c0 R09: 0000000000000000
R10: 00007ffea4ce7510 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000000 R14: 00030030454c4946 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:d_flags_for_inode+0x21b/0x2a0 fs/dcache.c:1980
Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 90 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 20 49 8d 7c 24 08 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 69 49 83 7c 24 08 00 75 34 e8 f2 63 9f ff 41 83 cd
RSP: 0018:ffffc90003bff8c8 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: ffff888074be70f0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff81dd26b2 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000000 R11: 000000000008c07e R12: 0000000000000000
R13: 0000000000000008 R14: ffff888074acc380 R15: 0000000000000000
FS:  00005555560af300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffea4ce8000 CR3: 000000001f763000 CR4: 0000000000350ee0
----------------
Code disassembly (best guess):
   0:	89 fa                	mov    %edi,%edx
   2:	48 c1 ea 03          	shr    $0x3,%rdx
   6:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   a:	0f 85 90 00 00 00    	jne    0xa0
  10:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  17:	fc ff df
  1a:	4c 8b 63 20          	mov    0x20(%rbx),%r12
  1e:	49 8d 7c 24 08       	lea    0x8(%r12),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	75 69                	jne    0x99
  30:	49 83 7c 24 08 00    	cmpq   $0x0,0x8(%r12)
  36:	75 34                	jne    0x6c
  38:	e8 f2 63 9f ff       	callq  0xff9f642f
  3d:	41                   	rex.B
  3e:	83                   	.byte 0x83
  3f:	cd                   	.byte 0xcd

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/11/25 18:18 upstream 08ad43d554ba c0b80a55 .config log report syz C
* Struck through repros no longer work on HEAD.
Crashes (10):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/10/23 01:39 upstream 4da34b7d175d c0b80a55 .config log report syz C general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-root 2022/10/09 06:09 upstream a6afa4199d3d aea5da89 .config log report syz C general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-root 2022/09/25 03:17 upstream 1a61b828566f 0042f2b4 .config log report syz C general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-selinux-root 2022/10/26 17:52 upstream 4dc12f37a8e9 2159e4d2 .config log report info general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-selinux-root 2022/10/23 00:00 upstream bd8e963412c8 c0b80a55 .config log report info general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-root 2022/10/11 21:24 upstream 55be6084c8e0 1353c374 .config log report info general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-root 2022/10/10 03:05 upstream a6afa4199d3d aea5da89 .config log report info general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-selinux-root 2022/10/05 00:35 upstream a5088ee7251e eab8f949 .config log report info general protection fault in d_flags_for_inode
ci-upstream-kasan-gce-root 2022/10/03 21:00 upstream 4fe89d07dcc2 feb56351 .config log report info general protection fault in d_flags_for_inode
ci-qemu-upstream 2022/09/02 10:24 upstream 42e66b1cc3a0 a805568e .config log report info general protection fault in d_flags_for_inode
* Struck through repros no longer work on HEAD.