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: 511d, last: 8d17h

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

read to 0xffff888121aadb18 of 4 bytes by task 2784 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+0x1a1/0x1d80 fs/namei.c:3795
 do_filp_open+0xf7/0x200 fs/namei.c:3826
 do_sys_openat2+0xab/0x120 fs/open.c:1406
 do_sys_open fs/open.c:1421 [inline]
 __do_sys_openat fs/open.c:1437 [inline]
 __se_sys_openat fs/open.c:1432 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1432
 x64_sys_call+0x2cad/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff888121aadb18 of 4 bytes by task 5393 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+0x1a1/0x1d80 fs/namei.c:3795
 do_filp_open+0xf7/0x200 fs/namei.c:3826
 do_sys_openat2+0xab/0x120 fs/open.c:1406
 do_sys_open fs/open.c:1421 [inline]
 __do_sys_openat fs/open.c:1437 [inline]
 __se_sys_openat fs/open.c:1432 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1432
 x64_sys_call+0x2cad/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000004 -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5393 Comm: udevd Not tainted 6.9.0-rc7-syzkaller-00056-g45db3ab70092 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (418):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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
2024/03/23 23:05 upstream 484193fecd2b 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/23 08:15 upstream bfa8f18691ed 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/23 04:02 upstream bfa8f18691ed 4b6cdce6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/21 21:16 upstream ebc9bee8814d 7a239ce7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/19 08:57 upstream b3603fcb79b1 baa80228 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/18 10:45 upstream f6cef5f8c37f d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/18 01:13 upstream 906a93befec8 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/17 04:13 upstream 741e9d668aa5 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/15 12:08 upstream e5eb28f6d1af d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/14 15:59 upstream 480e035fc4c7 8d8ee116 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/12 23:55 upstream 855684c7d938 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/11 19:33 upstream e8f897f4afef 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/10 11:36 upstream 005f6f34bd47 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/09 23:56 upstream 09e5c48fea17 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/09 10:41 upstream 10d48d70e82d 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/09 03:04 upstream 10d48d70e82d 8e75c913 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/07 21:13 upstream 135288b73cef 2b789849 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/07 07:30 upstream 67be068d31d4 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/06 17:24 upstream 5847c9777c30 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/05 07:23 upstream 90d35da658da 5fc53669 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/04 18:16 upstream 90d35da658da 3717835d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/04 10:01 upstream 90d35da658da 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/03 22:07 upstream 58c806d867bf 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/03 05:42 upstream 04b8076df253 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/02 05:42 upstream 17ba56605bfd 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/01 21:07 upstream 17ba56605bfd 83acf9e0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/03/01 04:53 upstream 87adedeba51a 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/02/29 16:36 upstream 805d849d7c3c 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/02/29 01:40 upstream e326df53af00 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in set_nlink / set_nlink
2024/02/28 03:07 upstream cf1182944c7c d367cbe5 .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.