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: 738d, last: 20h12m

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

read to 0xffff888106444c50 of 4 bytes by task 3285 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:1402
 do_sys_open fs/open.c:1417 [inline]
 __do_sys_openat fs/open.c:1433 [inline]
 __se_sys_openat fs/open.c:1428 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1428
 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 0xffff888106444c50 of 4 bytes by task 2999 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: 0x00000009 -> 0x00000008

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 2999 Comm: udevd Not tainted 6.13.0-rc4-syzkaller-00110-g4099a71718b0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (606):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/29 20:36 upstream 4099a71718b0 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/29 00:59 upstream 059dd502b263 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/28 15:46 upstream fd0584d220fe d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/27 00:53 upstream d6ef8b40d075 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/26 14:01 upstream 9b2ffa6148b1 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/24 18:52 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/24 15:13 upstream f07044dd0df0 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/21 08:00 upstream e9b8ffafd20a d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/20 04:54 upstream baaa2567a712 5905cb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/19 17:33 upstream eabcdba3ad40 5905cb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/19 03:27 upstream eabcdba3ad40 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/18 16:10 upstream aef25be35d23 a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/17 02:59 upstream f44d154d6e3d eec85da6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/16 05:08 upstream 78d4f34e2115 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/15 05:07 upstream a0e3919a2df2 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/12 22:34 upstream 150b567e0d57 530e80f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/12 12:56 upstream 231825b2e1ff 6f1b0fa8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/11 08:24 upstream f92f4749861b cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/10 02:10 upstream 7cb1b4663150 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/09 14:23 upstream fac04efc5c79 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/08 10:45 upstream 7503345ac5f5 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/07 12:40 upstream b5f217084ab3 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/07 02:29 upstream 9a6e8c7c3a02 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/04 18:46 upstream feffde684ac2 b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/04 02:23 upstream ceb8bf2ceaa7 b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/03 12:54 upstream cdd30ebb1b9f 578925bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/02 16:43 upstream e70140ba0d2b b499ea68 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/12/01 09:37 upstream bcc8eda6d349 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/30 16:57 upstream 2ba9f676d0a2 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/28 22:04 upstream 7af08b57bcb9 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/28 16:14 upstream b86545e02e8c 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/24 16:17 upstream 9f16d5e6f220 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/23 11:53 upstream 06afb0f36106 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/22 12:59 upstream 28eb75e178d3 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/11/21 19:41 upstream 43fb83c17ba2 4b25d554 .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 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
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.