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: 569d, last: 8h46m

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

read to 0xffff888105ff1d88 of 4 bytes by task 3397 on cpu 1:
 set_nlink+0x2b/0xb0
 kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
 kernfs_iop_permission+0x1dd/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:461 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:528
 may_lookup fs/namei.c:1726 [inline]
 link_path_walk+0x1b8/0x810 fs/namei.c:2273
 path_openat+0x1aa/0x1fa0 fs/namei.c:3809
 do_filp_open+0xf7/0x200 fs/namei.c:3840
 do_sys_openat2+0xab/0x120 fs/open.c:1413
 do_sys_open fs/open.c:1428 [inline]
 __do_sys_openat fs/open.c:1444 [inline]
 __se_sys_openat fs/open.c:1439 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1439
 x64_sys_call+0x1057/0x2d70 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

write to 0xffff888105ff1d88 of 4 bytes by task 2783 on cpu 0:
 set_nlink+0x98/0xb0 fs/inode.c:373
 kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
 kernfs_iop_permission+0x1dd/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:461 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:528
 may_lookup fs/namei.c:1726 [inline]
 link_path_walk+0x1b8/0x810 fs/namei.c:2273
 path_openat+0x1aa/0x1fa0 fs/namei.c:3809
 do_filp_open+0xf7/0x200 fs/namei.c:3840
 do_sys_openat2+0xab/0x120 fs/open.c:1413
 do_sys_open fs/open.c:1428 [inline]
 __do_sys_openat fs/open.c:1444 [inline]
 __se_sys_openat fs/open.c:1439 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1439
 x64_sys_call+0x1057/0x2d70 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 -> 0x00000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2783 Comm: udevd Not tainted 6.10.0-rc7-syzkaller-00266-g4d145e3f830b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (444):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/14 15:37 upstream 4d145e3f830b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/13 21:57 upstream d0d0cd380055 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/13 05:09 upstream 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/10 03:44 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/10 00:51 upstream 34afb82a3c67 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/09 05:56 upstream 4376e966ecb7 bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/07 17:56 upstream c6653f49e4fd 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/05 19:19 upstream 661e504db04c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/04 23:27 upstream 661e504db04c 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/01 19:10 upstream 9903efbddba0 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/07/01 05:27 upstream 22a40d14b572 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/30 13:22 upstream 8282d5af7be8 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/29 22:13 upstream 27b31deb900d 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/29 10:41 upstream de0a9f448633 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/28 20:55 upstream 6c0483dbfe72 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/27 03:10 upstream afcd48134c58 c6d33a01 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/26 00:36 upstream 55027e689933 dec8bc94 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/25 09:42 upstream 55027e689933 04bd2a30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/23 23:41 upstream 7c16f0a4ed1c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/20 00:59 upstream e5b3efbe1ab1 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/18 06:21 upstream 14d7c92f8df9 ce6011bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/06 17:49 upstream d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/06/05 09:24 upstream 32f88d65f01b e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/05/23 10:02 upstream 2a8120d7b482 4c2072ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/05/21 21:30 upstream 2a8120d7b482 1014eca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/05/20 07:05 upstream eb6a9339efeb c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/05/09 08:47 upstream 45db3ab70092 05079661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/05/06 16:21 upstream dd5a440a31fa d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/29 21:51 upstream b947cc5bf6d7 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/28 08:28 upstream 2c8159388952 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/25 08:51 upstream e88c4cfcb7b8 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/19 23:23 upstream 3cdb45594619 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/14 19:46 upstream 399f4dae683a c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/13 21:25 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/10 08:59 upstream 2c71fdf02a95 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/09 07:23 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/08 18:40 upstream fec50db7033e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/06 21:59 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/06 09:33 upstream 104db052b62d ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/04/02 04:04 upstream 026e680b0a08 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/29 21:25 upstream 4535e1a4174c c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/28 17:36 upstream 8d025e2092e2 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/27 02:51 upstream 7033999ecd7b 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/26 16:12 upstream 928a87efa423 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/24 20:48 upstream 5e74df2f8f15 0ea90952 .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.