syzbot


KCSAN: data-race in drop_nlink / generic_fillattr (9)

Status: moderation: reported on 2024/12/13 23:17
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+9641ae66a73e90af8f25@syzkaller.appspotmail.com
First crash: 154d, last: 13d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in drop_nlink / generic_fillattr (4) fs 2 807d 850d 0/28 auto-obsoleted due to no activity on 2023/04/11 17:00
upstream KCSAN: data-race in drop_nlink / generic_fillattr (6) fs 2 477d 484d 0/28 auto-obsoleted due to no activity on 2024/02/29 22:16
upstream KCSAN: data-race in drop_nlink / generic_fillattr (7) fs 2 435d 441d 0/28 auto-obsoleted due to no activity on 2024/04/11 18:19
upstream KCSAN: data-race in drop_nlink / generic_fillattr (5) fs 2 554d 523d 0/28 auto-obsoleted due to no activity on 2023/12/25 00:01
upstream KCSAN: data-race in drop_nlink / generic_fillattr (8) fs 1 209d 209d 0/28 auto-obsoleted due to no activity on 2024/11/23 13:06
upstream KCSAN: data-race in drop_nlink / generic_fillattr (3) fs 22 1312d 1523d 0/28 auto-closed as invalid on 2021/11/16 10:39
upstream KCSAN: data-race in drop_nlink / generic_fillattr fs 9 1703d 1778d 0/28 auto-closed as invalid on 2020/10/22 03:32
upstream KCSAN: data-race in drop_nlink / generic_fillattr (2) fs 8 1577d 1621d 0/28 auto-closed as invalid on 2021/02/25 00:13

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

write to 0xffff8881356b20c0 of 4 bytes by task 3296 on cpu 1:
 drop_nlink+0x3d/0xa0 fs/inode.c:418
 shmem_unlink+0x155/0x170 mm/shmem.c:3977
 shmem_rename2+0x1a1/0x290 mm/shmem.c:4063
 vfs_rename+0x7d6/0xa20 fs/namei.c:5121
 do_renameat2+0x764/0xab0 fs/namei.c:5270
 __do_sys_rename fs/namei.c:5317 [inline]
 __se_sys_rename fs/namei.c:5315 [inline]
 __x64_sys_rename+0x58/0x70 fs/namei.c:5315
 x64_sys_call+0x2aee/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:83
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881356b20c0 of 4 bytes by task 3007 on cpu 0:
 generic_fillattr+0xfb/0x340 fs/stat.c:91
 shmem_getattr+0x181/0x200 mm/shmem.c:1262
 vfs_getattr_nosec+0x143/0x1e0 fs/stat.c:210
 vfs_getattr fs/stat.c:259 [inline]
 vfs_fstat fs/stat.c:278 [inline]
 vfs_fstatat+0x11d/0x160 fs/stat.c:370
 __do_sys_newfstatat fs/stat.c:536 [inline]
 __se_sys_newfstatat+0x55/0x260 fs/stat.c:530
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:530
 x64_sys_call+0x2c22/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:263
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3007 Comm: udevd Not tainted 6.15.0-rc4-syzkaller-00291-g2a239ffbebb5 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/03 23:14 upstream 2a239ffbebb5 b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drop_nlink / generic_fillattr
2025/03/16 20:56 upstream cb82ca153949 e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drop_nlink / generic_fillattr
2025/01/26 15:19 upstream aa22f4da2a46 9fbd772e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drop_nlink / generic_fillattr
2025/01/04 05:29 upstream 63676eefb7a0 f3558dbf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drop_nlink / generic_fillattr
2024/12/13 23:16 upstream 243f750a2df0 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drop_nlink / generic_fillattr
* Struck through repros no longer work on HEAD.