syzbot


KCSAN: data-race in set_nlink / set_nlink

Status: moderation: reported on 2023/12/08 00:02
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+1b6aa3108f79850c5fa6@syzkaller.appspotmail.com
First crash: 655d, last: 15h12m

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

read to 0xffff888104e60518 of 4 bytes by task 4163 on cpu 1:
 set_nlink+0x2b/0xb0
 kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
 kernfs_iop_permission+0x1d5/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:468 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:535
 may_lookup fs/namei.c:1760 [inline]
 link_path_walk+0x14b/0x820 fs/namei.c:2366
 path_lookupat+0x72/0x2b0 fs/namei.c:2579
 filename_lookup+0x127/0x300 fs/namei.c:2609
 vfs_statx+0xa1/0x2f0 fs/stat.c:312
 vfs_fstatat+0xec/0x110 fs/stat.c:341
 __do_sys_newfstatat fs/stat.c:505 [inline]
 __se_sys_newfstatat+0x58/0x260 fs/stat.c:499
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:499
 x64_sys_call+0x141f/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:263
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff888104e60518 of 4 bytes by task 2967 on cpu 0:
 set_nlink+0x98/0xb0 fs/inode.c:375
 kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
 kernfs_iop_permission+0x1d5/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:468 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:535
 may_lookup fs/namei.c:1760 [inline]
 link_path_walk+0x14b/0x820 fs/namei.c:2366
 path_openat+0x1af/0x1fa0 fs/namei.c:3929
 do_filp_open+0xf7/0x200 fs/namei.c:3960
 do_sys_openat2+0xab/0x120 fs/open.c:1415
 do_sys_open fs/open.c:1430 [inline]
 __do_sys_openat fs/open.c:1446 [inline]
 __se_sys_openat fs/open.c:1441 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1441
 x64_sys_call+0x1025/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000005 -> 0x00000006

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 2967 Comm: udevd Not tainted 6.12.0-rc2-syzkaller-00006-g87d6aab2389e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (533):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/08 13:57 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/07 09:00 upstream 8cf0b93919e1 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/05 09:10 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/05 05:16 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/03 18:46 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/03 01:34 upstream f23aa4c0761a 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/01 11:42 upstream e32cde8d2bd7 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/01 08:47 upstream e32cde8d2bd7 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/30 14:39 upstream 9852d85ec9d4 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/30 10:34 upstream 9852d85ec9d4 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/29 06:12 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/28 17:02 upstream ad46e8f95e93 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/28 09:17 upstream ad46e8f95e93 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/27 15:56 upstream 075dbe9f6e3c 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/26 21:36 upstream 11a299a7933e 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/26 02:55 upstream aa486552a110 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/25 12:35 upstream 684a64bf32b6 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/23 00:13 upstream af9c191ac2a0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/20 21:22 upstream baeb9a7d8b60 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/19 21:26 upstream 2004cef11ea0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/19 12:48 upstream 839c4f596f89 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/18 23:02 upstream 4a39ac5b7d62 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/18 12:37 upstream bdf56c7580d2 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/17 23:40 upstream 2f27fce67173 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/16 16:16 upstream adfc3ded5c33 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/16 00:42 upstream 98f7e32f20d2 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/15 00:15 upstream 0babf683783d 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/13 17:16 upstream 196145c606d0 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/13 06:00 upstream fdf042df0463 73e8a465 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/11 23:04 upstream 7c6a3a65ace7 d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/11 06:42 upstream 8d8d276ba2fb 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/10 23:06 upstream 8d8d276ba2fb 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/10 04:35 upstream bc83b4d1f086 784df80e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/09 23:32 upstream da3ea35007d0 073f8be2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/08 12:02 upstream d1f2d51b711a 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/07 17:22 upstream b31c44928842 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/06 23:32 upstream b831f83e40a2 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/06 03:21 upstream ad618736883b 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/05 20:56 upstream c763c4339688 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/03 09:08 upstream 67784a74e258 8045124c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/01 14:44 upstream 431c1646e1f8 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/09/01 04:59 upstream e8784b0aef62 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/08/31 10:12 upstream 1934261d8974 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/08/29 20:48 upstream d5d547aa7b51 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2023/12/08 00:00 upstream 9ace34a8e446 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2023/11/23 10:29 upstream 9b6de136b5f0 fc59b78e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
* Struck through repros no longer work on HEAD.