syzbot


general protection fault in ovl_llseek

Status: upstream: reported C repro on 2024/09/26 17:02
Subsystems: overlayfs
[Documentation on labels]
Reported-by: syzbot+d9efec94dcbfa0de1c07@syzkaller.appspotmail.com
Fix commit: 0c33037c825e ovl: fix file leak in ovl_real_fdget_meta()
Patched on: [ci-qemu-gce-upstream-auto 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-snapshot-upstream-root ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root 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-386-root ci-upstream-kmsan-gce-root 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], missing on: [ci-qemu-native-arm64-kvm ci-upstream-bpf-kasan-gce]
First crash: 9d19h, last: 9d15h
Discussions (2)
Title Replies (including bot) Last reply
Re: [syzbot] [overlayfs?] general protection fault in ovl_llseek 6 (7) 2024/09/27 20:20
[syzbot] [overlayfs?] general protection fault in ovl_llseek 0 (1) 2024/09/26 17:02
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/09/27 07:10 20m leocstone@gmail.com patch upstream OK log

Sample crash report:
RBP: 0000000000000001 R08: 00007ffcab8ccc77 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffcab8cd000
R13: 431bde82d7b634db R14: 00007ffcab8ccf20 R15: 00007ffcab8ccf00
 </TASK>
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000022: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000110-0x0000000000000117]
CPU: 0 UID: 0 PID: 5098 Comm: syz-executor398 Not tainted 6.11.0-syzkaller-10669-g11a299a7933e #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:ovl_llseek+0x2a4/0x3f0 fs/overlayfs/file.c:214
Code: 8d 7c 24 60 e8 ad db e0 fe 48 8b 44 24 60 48 89 44 24 30 48 83 e0 fc 48 89 44 24 20 4c 8d b0 20 01 00 00 4d 89 f7 49 c1 ef 03 <43> 80 3c 27 00 74 08 4c 89 f7 e8 6d dc e0 fe 49 89 1e 48 8b 1c 24
RSP: 0018:ffffc90002d0fe00 EFLAGS: 00010207
RAX: fffffffffffffff4 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff8c610080 RDI: 0000000000000001
RBP: ffffc90002d0fec8 R08: ffffffff901ce56f R09: 1ffffffff2039cad
R10: dffffc0000000000 R11: fffffbfff2039cae R12: dffffc0000000000
R13: 1ffff11007b299e4 R14: 0000000000000114 R15: 0000000000000022
FS:  0000555562f9d380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbfc24e3406 CR3: 0000000036176000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 vfs_llseek fs/read_write.c:382 [inline]
 ksys_lseek fs/read_write.c:395 [inline]
 __do_sys_lseek fs/read_write.c:406 [inline]
 __se_sys_lseek fs/read_write.c:404 [inline]
 __x64_sys_lseek+0x150/0x1e0 fs/read_write.c:404
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbfc248dbd9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 1a 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:00007ffcab8cced8 EFLAGS: 00000246 ORIG_RAX: 0000000000000008
RAX: ffffffffffffffda RBX: 00007ffcab8ccef0 RCX: 00007fbfc248dbd9
RDX: 0000000000000000 RSI: 0000000000010000 RDI: 0000000000000004
RBP: 0000000000000001 R08: 00007ffcab8ccc77 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffcab8cd000
R13: 431bde82d7b634db R14: 00007ffcab8ccf20 R15: 00007ffcab8ccf00
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ovl_llseek+0x2a4/0x3f0 fs/overlayfs/file.c:214
Code: 8d 7c 24 60 e8 ad db e0 fe 48 8b 44 24 60 48 89 44 24 30 48 83 e0 fc 48 89 44 24 20 4c 8d b0 20 01 00 00 4d 89 f7 49 c1 ef 03 <43> 80 3c 27 00 74 08 4c 89 f7 e8 6d dc e0 fe 49 89 1e 48 8b 1c 24
RSP: 0018:ffffc90002d0fe00 EFLAGS: 00010207
RAX: fffffffffffffff4 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff8c610080 RDI: 0000000000000001
RBP: ffffc90002d0fec8 R08: ffffffff901ce56f R09: 1ffffffff2039cad
R10: dffffc0000000000 R11: fffffbfff2039cae R12: dffffc0000000000
R13: 1ffff11007b299e4 R14: 0000000000000114 R15: 0000000000000022
FS:  0000555562f9d380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbfc24e3406 CR3: 0000000036176000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	8d 7c 24 60          	lea    0x60(%rsp),%edi
   4:	e8 ad db e0 fe       	call   0xfee0dbb6
   9:	48 8b 44 24 60       	mov    0x60(%rsp),%rax
   e:	48 89 44 24 30       	mov    %rax,0x30(%rsp)
  13:	48 83 e0 fc          	and    $0xfffffffffffffffc,%rax
  17:	48 89 44 24 20       	mov    %rax,0x20(%rsp)
  1c:	4c 8d b0 20 01 00 00 	lea    0x120(%rax),%r14
  23:	4d 89 f7             	mov    %r14,%r15
  26:	49 c1 ef 03          	shr    $0x3,%r15
* 2a:	43 80 3c 27 00       	cmpb   $0x0,(%r15,%r12,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 f7             	mov    %r14,%rdi
  34:	e8 6d dc e0 fe       	call   0xfee0dca6
  39:	49 89 1e             	mov    %rbx,(%r14)
  3c:	48 8b 1c 24          	mov    (%rsp),%rbx

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/26 19:04 upstream 11a299a7933e 9314348a .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in ovl_llseek
2024/09/26 18:03 upstream 11a299a7933e 9314348a .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in ovl_llseek
2024/09/26 17:04 upstream 11a299a7933e 9314348a .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in ovl_llseek
2024/09/26 16:03 upstream 11a299a7933e 9314348a .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in ovl_llseek
2024/09/26 15:05 upstream 11a299a7933e 9314348a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in ovl_llseek
* Struck through repros no longer work on HEAD.