syzbot


KCSAN: data-race in __alloc_file / copy_creds

Status: auto-closed as invalid on 2020/01/17 13:33
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+11d36ae6a74de730709b@syzkaller.appspotmail.com
First crash: 1639d, last: 1623d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __alloc_file / copy_creds

write to 0xffff8880a86e92d8 of 4 bytes by task 11635 on cpu 1:
 get_cred include/linux/cred.h:253 [inline]
 __alloc_file+0x74/0x210 fs/file_table.c:105
 alloc_empty_file+0x8f/0x180 fs/file_table.c:151
 alloc_file+0x4e/0x2b0 fs/file_table.c:193
 alloc_file_pseudo+0x11c/0x1b0 fs/file_table.c:232
 anon_inode_getfile fs/anon_inodes.c:91 [inline]
 anon_inode_getfile+0x103/0x1d0 fs/anon_inodes.c:74
 kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:3456 [inline]
 kvm_dev_ioctl+0x571/0xc10 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3496
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0x991/0xc60 fs/ioctl.c:696
 ksys_ioctl+0xbd/0xe0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x4c/0x60 fs/ioctl.c:718
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8880a86e92d8 of 4 bytes by task 11633 on cpu 0:
 get_cred include/linux/cred.h:253 [inline]
 copy_creds+0x258/0x340 kernel/cred.c:346
 copy_process+0x926/0x3b50 kernel/fork.c:1884
 _do_fork+0xfe/0x6e0 kernel/fork.c:2366
 __do_sys_clone kernel/fork.c:2521 [inline]
 __se_sys_clone kernel/fork.c:2502 [inline]
 __x64_sys_clone+0x12b/0x160 kernel/fork.c:2502
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11633 Comm: syz-executor.5 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/08 13:32 https://github.com/google/ktsan.git kcsan 94c006602e13 1e35461e .config console log report ci2-upstream-kcsan-gce
2019/11/06 19:23 https://github.com/google/ktsan.git kcsan 94c006602e13 da505f84 .config console log report ci2-upstream-kcsan-gce
2019/11/06 03:54 https://github.com/google/ktsan.git kcsan 94c006602e13 bc2c6e45 .config console log report ci2-upstream-kcsan-gce
2019/10/29 05:07 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
2019/10/25 11:49 https://github.com/google/ktsan.git kcsan 05f2236801fe 04ca72cd .config console log report ci2-upstream-kcsan-gce
2019/10/23 15:22 https://github.com/google/ktsan.git kcsan 05f2236801fe b602d64b .config console log report ci2-upstream-kcsan-gce
2019/10/23 12:57 https://github.com/google/ktsan.git kcsan 05f2236801fe d0686497 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.