syzbot


general protection fault in ovl_dentry_upper

Status: upstream: reported C repro on 2022/11/24 04:51
Reported-by: syzbot+a4055c78774bbf3498bb@syzkaller.appspotmail.com
Fix commit: ovl: fix use inode directly in rcu-walk mode
Patched on: [], missing on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 13d, last: 13d

Cause bisection: failed (bisect log)
Patch testing requests:
Created Duration User Patch Repo Result
2022/11/24 12:42 24m miklos@szeredi.hu patch upstream OK log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000092: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000490-0x0000000000000497]
CPU: 0 PID: 16299 Comm: syz-executor309 Not tainted 6.1.0-rc5-syzkaller-00307-gfe24a97cf254 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:ovl_upperdentry_dereference fs/overlayfs/ovl_entry.h:150 [inline]
RIP: 0010:ovl_dentry_upper+0x40/0x60 fs/overlayfs/util.c:213
Code: fe 49 83 c6 68 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 7f 28 e9 fe bb 90 04 00 00 49 03 1e 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 61 28 e9 fe 48 8b 03 5b 41 5e 41
RSP: 0018:ffffc9000ef3fa50 EFLAGS: 00010202
RAX: 0000000000000092 RBX: 0000000000000490 RCX: ffff888020328000
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff888075528758
RBP: dffffc0000000000 R08: ffffffff81f2119e R09: ffffed100eaa50fa
R10: ffffed100eaa50fa R11: 1ffff1100eaa50f9 R12: 0000000000000040
R13: ffffc9000ef3fc20 R14: ffff8880755287c0 R15: dffffc0000000000
FS:  00007f7e44d61700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7e44df1800 CR3: 000000007c404000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ovl_dentry_revalidate_common fs/overlayfs/super.c:146 [inline]
 ovl_dentry_revalidate+0x4b/0x380 fs/overlayfs/super.c:159
 d_revalidate fs/namei.c:856 [inline]
 lookup_fast+0x26c/0x480 fs/namei.c:1634
 walk_component+0x55/0x410 fs/namei.c:1989
 lookup_last fs/namei.c:2450 [inline]
 path_lookupat+0x17d/0x450 fs/namei.c:2474
 filename_lookup+0x274/0x650 fs/namei.c:2503
 user_path_at_empty+0x40/0x1a0 fs/namei.c:2876
 user_path_at include/linux/namei.h:57 [inline]
 __do_sys_name_to_handle_at fs/fhandle.c:107 [inline]
 __se_sys_name_to_handle_at+0xf8/0x610 fs/fhandle.c:93
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f7e44db0159
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 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:00007f7e44d612f8 EFLAGS: 00000246 ORIG_RAX: 000000000000012f
RAX: ffffffffffffffda RBX: 0000000000000034 RCX: 00007f7e44db0159
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00007f7e44e394a8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7e44e394a0
R13: 00007f7e44e394ac R14: 00007f7e44e06074 R15: 0030656c69662f2e
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ovl_upperdentry_dereference fs/overlayfs/ovl_entry.h:150 [inline]
RIP: 0010:ovl_dentry_upper+0x40/0x60 fs/overlayfs/util.c:213
Code: fe 49 83 c6 68 4c 89 f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 7f 28 e9 fe bb 90 04 00 00 49 03 1e 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 61 28 e9 fe 48 8b 03 5b 41 5e 41
RSP: 0018:ffffc9000ef3fa50 EFLAGS: 00010202
RAX: 0000000000000092 RBX: 0000000000000490 RCX: ffff888020328000
RDX: 0000000000000000 RSI: 0000000000000040 RDI: ffff888075528758
RBP: dffffc0000000000 R08: ffffffff81f2119e R09: ffffed100eaa50fa
R10: ffffed100eaa50fa R11: 1ffff1100eaa50f9 R12: 0000000000000040
R13: ffffc9000ef3fc20 R14: ffff8880755287c0 R15: dffffc0000000000
FS:  00007f7e44d61700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564e6292d008 CR3: 000000007c404000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	49 83 c6 68          	add    $0x68,%r14
   4:	4c 89 f0             	mov    %r14,%rax
   7:	48 c1 e8 03          	shr    $0x3,%rax
   b:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1)
  10:	74 08                	je     0x1a
  12:	4c 89 f7             	mov    %r14,%rdi
  15:	e8 7f 28 e9 fe       	callq  0xfee92899
  1a:	bb 90 04 00 00       	mov    $0x490,%ebx
  1f:	49 03 1e             	add    (%r14),%rbx
  22:	48 89 d8             	mov    %rbx,%rax
  25:	48 c1 e8 03          	shr    $0x3,%rax
* 29:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 61 28 e9 fe       	callq  0xfee92899
  38:	48 8b 03             	mov    (%rbx),%rax
  3b:	5b                   	pop    %rbx
  3c:	41 5e                	pop    %r14
  3e:	41                   	rex.B

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-fs 2022/11/20 06:08 upstream fe24a97cf254 5bb70014 .config log report syz C general protection fault in ovl_dentry_upper
ci2-upstream-fs 2022/11/20 04:44 upstream fe24a97cf254 5bb70014 .config log report info general protection fault in ovl_dentry_upper
* Struck through repros no longer work on HEAD.