syzbot


WARNING in ovl_fh_to_dentry

Status: upstream: reported C repro on 2022/09/23 16:05
Reported-by: syzbot+9d14351a171d0d1c7955@syzkaller.appspotmail.com
Fix commit: ovl: Use "buf" flexible array for memcpy() destination
Patched on: [ci-upstream-linux-next-kasan-gce-root], 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-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 72d, last: 5d09h

Sample crash report:
------------[ cut here ]------------
memcpy: detected field-spanning write (size 93) of single field "&fh->fb" at fs/overlayfs/export.c:799 (size 21)
WARNING: CPU: 0 PID: 3609 at fs/overlayfs/export.c:799 ovl_fid_to_fh fs/overlayfs/export.c:799 [inline]
WARNING: CPU: 0 PID: 3609 at fs/overlayfs/export.c:799 ovl_fh_to_dentry+0x880/0x950 fs/overlayfs/export.c:812
Modules linked in:
CPU: 0 PID: 3609 Comm: syz-executor307 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
RIP: 0010:ovl_fid_to_fh fs/overlayfs/export.c:799 [inline]
RIP: 0010:ovl_fh_to_dentry+0x880/0x950 fs/overlayfs/export.c:812
Code: f9 ff ff e8 c2 0f ab fe b9 15 00 00 00 4c 89 f6 48 c7 c2 e0 26 28 8a 48 c7 c7 40 27 28 8a c6 05 77 db fa 0a 01 e8 0c 31 78 06 <0f> 0b e9 ec f8 ff ff 49 c7 c6 ea ff ff ff bb ea ff ff ff c7 44 24
RSP: 0018:ffffc90003e6fb30 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000060 RCX: 0000000000000000
RDX: ffff88801e5e57c0 RSI: ffffffff81621b98 RDI: fffff520007cdf58
RBP: ffff88807f4a4180 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 203a7970636d656d R12: 00000000000000fb
R13: 1ffff920007cdf6e R14: 000000000000005d R15: ffff88807f4a4183
FS:  00005555565eb300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005632055db6f8 CR3: 00000000204b2000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 exportfs_decode_fh_raw+0x127/0x7d0 fs/exportfs/expfs.c:435
 exportfs_decode_fh+0x38/0x90 fs/exportfs/expfs.c:575
 do_handle_to_path fs/fhandle.c:152 [inline]
 handle_to_path fs/fhandle.c:207 [inline]
 do_handle_open+0x2b6/0x8b0 fs/fhandle.c:223
 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:0x7f27eed2fcc9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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:00007fffc2b58678 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f27eed2fcc9
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00007f27eecf3e70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f27eecf3f00
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (148):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/10/30 22:14 upstream b229b6ca5abb 2a71366b .config log report syz C WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/21 12:47 upstream 6d36c728bc2e 63e790dd .config log report syz C WARNING in ovl_fh_to_dentry
ci-upstream-linux-next-kasan-gce-root 2022/09/21 20:39 linux-next 483fed3b5dc8 380f82fb .config log report syz C WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/27 15:47 upstream faf68e3523c2 f4470a7b .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-root 2022/11/23 14:34 upstream eb7081409f94 75740b3f .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/21 07:50 upstream eb7081409f94 5bb70014 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/20 01:20 upstream fe24a97cf254 5bb70014 .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-root 2022/11/18 20:23 upstream 84368d882b96 5bb70014 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/18 16:32 upstream 84368d882b96 5bb70014 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/18 12:54 upstream 84368d882b96 5bb70014 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/17 20:56 upstream 81ac25651a62 4ba8ab94 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/17 02:50 upstream 59d0d52c30d4 3a127a31 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/15 02:13 upstream e01d50cbd6ee 97de9cfc .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/14 14:51 upstream 094226ad94f4 943f4cb8 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/14 05:37 upstream af7a05689189 7ba4d859 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/14 00:59 upstream af7a05689189 7ba4d859 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/12 23:58 upstream 8f2975c2bb4c f42ee5d8 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/12 21:07 upstream 8f2975c2bb4c f42ee5d8 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/12 01:44 upstream eb037f16f7e8 f42ee5d8 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/07 10:41 upstream 089d1c31224e 6d752409 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/06 19:40 upstream b208b9fbbcba 6d752409 .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-selinux-root 2022/11/06 12:28 upstream 2f5065a0bc9d 6d752409 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/06 08:36 upstream b208b9fbbcba 6d752409 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/02 23:11 upstream b229b6ca5abb 08977f5d .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/02 12:11 upstream b229b6ca5abb 08977f5d .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/02 10:39 upstream b229b6ca5abb 08977f5d .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/11/01 11:56 upstream b229b6ca5abb a1d8560a .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/31 11:39 upstream b229b6ca5abb 2a71366b .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/30 12:12 upstream b229b6ca5abb 2a71366b .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/30 07:56 upstream b229b6ca5abb 2a71366b .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/30 01:02 upstream b229b6ca5abb 2a71366b .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-root 2022/10/29 15:59 upstream b229b6ca5abb 899d812a .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/29 13:29 upstream b229b6ca5abb 899d812a .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/27 11:42 upstream 4dc12f37a8e9 86777b7f .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/27 08:51 upstream 4dc12f37a8e9 86777b7f .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/27 06:54 upstream 4dc12f37a8e9 86777b7f .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-root 2022/10/26 19:03 upstream 4dc12f37a8e9 2159e4d2 .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-root 2022/10/26 09:14 upstream 4dc12f37a8e9 1984aebd .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-root 2022/10/26 08:03 upstream 4dc12f37a8e9 1984aebd .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-selinux-root 2022/10/26 04:03 upstream 1a2dcbdde82e 1984aebd .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-selinux-root 2022/10/26 02:52 upstream 1a2dcbdde82e 1984aebd .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-kasan-gce-selinux-root 2022/10/26 01:29 upstream 1a2dcbdde82e 1984aebd .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/26 00:16 upstream 1a2dcbdde82e 2159e4d2 .config log report info WARNING in ovl_fh_to_dentry
ci2-upstream-fs 2022/10/21 07:11 upstream 493ffd6605b2 a0fd4dab .config log report info WARNING in ovl_fh_to_dentry
ci-qemu-upstream 2022/10/05 02:53 upstream 0326074ff465 267e3bb1 .config log report info WARNING in ovl_fh_to_dentry
ci-qemu-upstream-386 2022/11/27 15:48 upstream faf68e3523c2 f4470a7b .config log report info WARNING in ovl_fh_to_dentry
ci-qemu-upstream-386 2022/11/18 15:09 upstream 84368d882b96 5bb70014 .config log report info WARNING in ovl_fh_to_dentry
ci-qemu-upstream-386 2022/11/06 13:30 upstream 2f5065a0bc9d 6d752409 .config log report info WARNING in ovl_fh_to_dentry
ci-qemu-upstream-386 2022/11/02 06:21 upstream 200204f56f3b 08977f5d .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-linux-next-kasan-gce-root 2022/10/03 00:49 linux-next aaa11ce2ffc8 feb56351 .config log report info WARNING in ovl_fh_to_dentry
ci-upstream-linux-next-kasan-gce-root 2022/09/21 11:36 linux-next 483fed3b5dc8 380f82fb .config log report info WARNING in ovl_fh_to_dentry
* Struck through repros no longer work on HEAD.