syzbot


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

Status: moderation: reported on 2024/12/10 04:40
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+e9c3b6fa2c18c2de97ae@syzkaller.appspotmail.com
First crash: 134d, last: 34d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in generic_fillattr / shmem_symlink (2) mm 247 364d 503d 0/28 auto-obsoleted due to no activity on 2024/05/30 03:00
upstream KCSAN: data-race in generic_fillattr / shmem_symlink (3) mm 16 193d 300d 0/28 auto-obsoleted due to no activity on 2024/11/16 05:24
upstream KCSAN: data-race in generic_fillattr / shmem_symlink fs 30 1775d 1965d 0/28 closed as invalid on 2020/06/18 14:24

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

write to 0xffff888104bab82c of 4 bytes by task 6348 on cpu 0:
 inode_set_mtime_to_ts include/linux/fs.h:1708 [inline]
 shmem_symlink+0x344/0x390 mm/shmem.c:4144
 vfs_symlink+0xca/0x1d0 fs/namei.c:4671
 do_symlinkat+0xe1/0x350 fs/namei.c:4697
 __do_sys_symlink fs/namei.c:4718 [inline]
 __se_sys_symlink fs/namei.c:4716 [inline]
 __x64_sys_symlink+0x50/0x60 fs/namei.c:4716
 x64_sys_call+0x28b0/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:89
 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 0xffff888104bab82c of 4 bytes by task 4280 on cpu 1:
 inode_get_mtime_nsec include/linux/fs.h:1694 [inline]
 inode_get_mtime include/linux/fs.h:1700 [inline]
 generic_fillattr+0x205/0x330 fs/stat.c:102
 shmem_getattr+0x17b/0x200 mm/shmem.c:1249
 vfs_getattr_nosec fs/stat.c:208 [inline]
 vfs_getattr+0x172/0x1b0 fs/stat.c:246
 vfs_statx_path fs/stat.c:283 [inline]
 vfs_statx+0x12d/0x320 fs/stat.c:349
 vfs_fstatat+0xe4/0x130 fs/stat.c:368
 __do_sys_newfstatat fs/stat.c:532 [inline]
 __se_sys_newfstatat+0x58/0x260 fs/stat.c:526
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:526
 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: 0x0a3a54ec -> 0x0a5ed6c8

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4280 Comm: udevd Not tainted 6.14.0-rc7-syzkaller-00074-ga7f2e10ecd8f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================
udevd[4280]: inotify_add_watch(7, /dev/loop1p80, 10) failed: No such file or directory

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/20 12:20 upstream a7f2e10ecd8f 9209bc22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_symlink
2025/02/10 11:43 upstream a64dcfb451e2 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_symlink
2025/02/08 22:18 upstream 8f6629c004b1 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_symlink
2025/01/28 21:23 upstream 6d61a53dd6f5 f5427d7c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_symlink
2024/12/29 23:15 upstream 4099a71718b0 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_symlink
2024/12/10 04:39 upstream 7cb1b4663150 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / shmem_symlink
* Struck through repros no longer work on HEAD.