syzbot


KCSAN: data-race in file_update_time / inode_update_timestamps

Status: moderation: reported on 2024/02/02 18:13
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+350a06399dc605f610f0@syzkaller.appspotmail.com
First crash: 70d, last: 4d12h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in file_update_time / inode_update_timestamps

write to 0xffff888106951b50 of 8 bytes by task 11972 on cpu 0:
 inode_set_ctime_to_ts include/linux/fs.h:1626 [inline]
 inode_set_ctime_current fs/inode.c:2515 [inline]
 inode_update_timestamps+0xb5/0x280 fs/inode.c:1861
 generic_update_time fs/inode.c:1900 [inline]
 inode_update_time fs/inode.c:1920 [inline]
 __file_update_time fs/inode.c:2109 [inline]
 file_update_time+0x22f/0x2c0 fs/inode.c:2139
 pipe_write+0xa87/0xd30 fs/pipe.c:607
 call_write_iter include/linux/fs.h:2110 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x771/0x8e0 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x72/0x7a

read to 0xffff888106951b50 of 8 bytes by task 11977 on cpu 1:
 inode_get_ctime include/linux/fs.h:1620 [inline]
 inode_needs_update_time fs/inode.c:2092 [inline]
 file_update_time+0x107/0x2c0 fs/inode.c:2135
 pipe_write+0xa87/0xd30 fs/pipe.c:607
 call_write_iter include/linux/fs.h:2110 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x771/0x8e0 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x72/0x7a

value changed: 0x0000000012385d1b -> 0x0000000012c533ca

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11977 Comm: syz-executor.0 Tainted: G        W          6.9.0-rc3-syzkaller-00011-g20cb38a7af88 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/09 04:12 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/04/07 03:14 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/04/05 20:44 upstream 8cb4a9a82b21 77230c29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/03/29 01:51 upstream 8d025e2092e2 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/03/21 13:01 upstream dba89d1b81df 6753db5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/03/20 03:19 upstream a4145ce1e7bc a485f239 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/03/16 01:03 upstream e5eb28f6d1af d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/02/19 13:19 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/02/12 12:42 upstream 841c35169323 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/02/11 05:10 upstream a5b6244cf87c 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
2024/02/02 18:12 upstream 021533194476 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
* Struck through repros no longer work on HEAD.