syzbot


KCSAN: data-race in generic_fillattr / touch_atime

Status: moderation: reported on 2024/02/16 06:47
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+9d0e6a86893402e94936@syzkaller.appspotmail.com
First crash: 70d, last: 12d

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

write to 0xffff8881175f1570 of 8 bytes by task 5404 on cpu 0:
 inode_set_atime_to_ts include/linux/fs.h:1566 [inline]
 inode_update_timestamps fs/inode.c:1878 [inline]
 generic_update_time fs/inode.c:1900 [inline]
 inode_update_time fs/inode.c:1920 [inline]
 touch_atime+0x1f3/0x350 fs/inode.c:1992
 file_accessed include/linux/fs.h:2459 [inline]
 shmem_file_read_iter+0x4b3/0x550 mm/shmem.c:2906
 call_read_iter include/linux/fs.h:2104 [inline]
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5bc/0x6b0 fs/read_write.c:476
 ksys_read+0xeb/0x1b0 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:627
 x64_sys_call+0x27ad/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:1
 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

read to 0xffff8881175f1570 of 8 bytes by task 5735 on cpu 1:
 inode_get_atime include/linux/fs.h:1560 [inline]
 generic_fillattr+0x16f/0x2f0 fs/stat.c:60
 shmem_getattr+0x17b/0x200 mm/shmem.c:1145
 vfs_getattr_nosec fs/stat.c:135 [inline]
 vfs_getattr fs/stat.c:176 [inline]
 vfs_fstat+0x1b9/0x470 fs/stat.c:198
 vfs_fstatat+0x85/0x100 fs/stat.c:300
 __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+0x25ff/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:263
 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: 0x00000000130b9500 -> 0x0000000013a42b81

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5735 Comm: udevd Not tainted 6.9.0-rc3-syzkaller-00355-g7efd0a74039f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/14 07:07 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / touch_atime
2024/03/23 03:40 upstream bfa8f18691ed 4b6cdce6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / touch_atime
2024/03/07 16:15 upstream 67be068d31d4 2b789849 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / touch_atime
2024/02/16 06:46 upstream 4f5e5092fdbf 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / touch_atime
* Struck through repros no longer work on HEAD.