syzbot


KCSAN: data-race in generic_fillattr / shmem_unlink (4)

Status: moderation: reported on 2024/06/23 18:44
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+58bc3169b550bf7ad5d5@syzkaller.appspotmail.com
First crash: 19d, last: 5d04h
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in generic_fillattr / shmem_unlink (2) mm 51 1488d 1487d 0/27 auto-closed as invalid on 2020/07/21 00:44
upstream KCSAN: data-race in generic_fillattr / shmem_unlink (3) mm 654 59d 446d 0/27 auto-obsoleted due to no activity on 2024/06/11 16:04
upstream KCSAN: data-race in generic_fillattr / shmem_unlink fs 3 1705d 1719d 0/27 closed as invalid on 2019/11/19 14:54

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

write to 0xffff888104082140 of 8 bytes by task 3685 on cpu 0:
 inode_set_mtime_to_ts include/linux/fs.h:1587 [inline]
 shmem_unlink+0x150/0x190 mm/shmem.c:3393
 vfs_unlink+0x275/0x430 fs/namei.c:4349
 do_unlinkat+0x236/0x4c0 fs/namei.c:4413
 __do_sys_unlink fs/namei.c:4461 [inline]
 __se_sys_unlink fs/namei.c:4459 [inline]
 __x64_sys_unlink+0x30/0x40 fs/namei.c:4459
 x64_sys_call+0x28a3/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:88
 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

read to 0xffff888104082140 of 8 bytes by task 3073 on cpu 1:
 inode_get_mtime include/linux/fs.h:1581 [inline]
 generic_fillattr+0x1a6/0x2f0 fs/stat.c:61
 shmem_getattr+0x17b/0x200 mm/shmem.c:1139
 vfs_getattr_nosec fs/stat.c:135 [inline]
 vfs_getattr+0x19b/0x1e0 fs/stat.c:176
 vfs_statx+0x140/0x320 fs/stat.c:248
 vfs_fstatat+0xcd/0x100 fs/stat.c:304
 __do_sys_newfstatat fs/stat.c:468 [inline]
 __se_sys_newfstatat+0x58/0x260 fs/stat.c:462
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:462
 x64_sys_call+0x1451/0x2d70 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: 0x000000000b19c601 -> 0x000000000bb25c81

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

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/08 06:42 upstream 256abd8e550c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_unlink
2024/06/23 18:44 upstream 7c16f0a4ed1c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_unlink
* Struck through repros no longer work on HEAD.