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: 57d, last: 22d

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

write to 0xffff888107aa78b0 of 8 bytes by task 3528 on cpu 1:
 inode_set_atime_to_ts include/linux/fs.h:1564 [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:2457 [inline]
 shmem_file_read_iter+0x4b3/0x550 mm/shmem.c:2906
 call_read_iter include/linux/fs.h:2102 [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
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

read to 0xffff888107aa78b0 of 8 bytes by task 3872 on cpu 0:
 inode_get_atime include/linux/fs.h:1558 [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
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

value changed: 0x000000003349f7dd -> 0x000000003513bb5d

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3872 Comm: udevd Not tainted 6.8.0-syzkaller-13161-gbfa8f18691ed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
==================================================================
udevd[3872]: inotify_add_watch(7, /dev/loop2p1, 10) failed: No such file or directory
udevd[3872]: inotify_add_watch(7, /dev/loop1p1, 10) failed: No such file or directory
I/O error, dev loop4, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
udevd[3872]: inotify_add_watch(7, /dev/loop0p1, 10) failed: No such file or directory
udevd[3872]: inotify_add_watch(7, /dev/loop0p1, 10) failed: No such file or directory

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.