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: 699d, last: 13h29m

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

read to 0xffff88810686bac0 of 4 bytes by task 3304 on cpu 0:
 set_nlink+0x2b/0xb0
 kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
 kernfs_iop_permission+0x1c8/0x210 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:525 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:592
 may_lookup fs/namei.c:1819 [inline]
 link_path_walk+0x14b/0x820 fs/namei.c:2425
 path_openat+0x1af/0x1fa0 fs/namei.c:3983
 do_filp_open+0x107/0x230 fs/namei.c:4014
 do_sys_openat2+0xab/0x120 fs/open.c:1398
 do_sys_open fs/open.c:1413 [inline]
 __do_sys_openat fs/open.c:1429 [inline]
 __se_sys_openat fs/open.c:1424 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1424
 x64_sys_call+0x2b30/0x2dc0 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 0xffff88810686bac0 of 4 bytes by task 3016 on cpu 1:
 set_nlink+0x98/0xb0 fs/inode.c:448
 kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
 kernfs_iop_permission+0x1c8/0x210 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:525 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:592
 may_lookup fs/namei.c:1819 [inline]
 link_path_walk+0x14b/0x820 fs/namei.c:2425
 path_lookupat+0x72/0x2b0 fs/namei.c:2633
 filename_lookup+0x150/0x340 fs/namei.c:2663
 vfs_statx+0x9a/0x170 fs/stat.c:344
 vfs_fstatat fs/stat.c:366 [inline]
 __do_sys_newfstatat fs/stat.c:530 [inline]
 __se_sys_newfstatat+0xdc/0x300 fs/stat.c:524
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:524
 x64_sys_call+0x236d/0x2dc0 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

value changed: 0x00000008 -> 0x00000009

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3016 Comm: udevd Not tainted 6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (571):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 17:07 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/20 11:22 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/19 12:18 upstream 23acd177540d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/18 19:32 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/15 16:50 upstream cfaaa7d010d1 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/14 17:36 upstream 0a9b9d17f3a7 a8c99394 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/14 00:59 upstream 0a9b9d17f3a7 bb3f8425 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/13 03:24 upstream 3022e9d00ebe 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/11 18:54 upstream 2d5404caa8c7 0c4b1325 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/10 23:56 upstream a9cda7c0ffed 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/10 05:58 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/09 20:15 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/09 04:02 upstream f1dce1f09380 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/08 16:42 upstream 906bd684e4b1 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/07 01:49 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/01 15:36 upstream 5635f189425e 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/31 13:53 upstream 0fc810ae3ae1 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/30 04:48 upstream c1e939a21eb1 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/30 00:41 upstream e42b1a9a2557 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/26 20:28 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/23 07:28 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/22 07:51 upstream d12937763990 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/21 17:02 upstream 42f7652d3eb5 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/21 07:17 upstream 42f7652d3eb5 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/20 12:51 upstream 715ca9dd687f cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/19 18:39 upstream 3d5ad2d4eca3 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/18 10:11 upstream 4d939780b705 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/18 03:02 upstream 6efbea77b390 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/16 19:06 upstream 2f87d0916ce0 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/15 23:27 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/15 00:03 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/13 21:03 upstream 36c254515dc6 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/13 03:18 upstream 7234e2ea0edd 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/12 04:53 upstream 9e4c6c1ad9a1 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/10 22:16 upstream eb952c47d154 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/10 16:54 upstream d3d1556696c1 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/09 23:59 upstream 75b607fab38d 56fb2cb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/10/09 09:17 upstream 75b607fab38d 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/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
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.