syzbot


KCSAN: data-race in inode_set_ctime_current / inode_update_timestamps (2)

Status: moderation: reported on 2024/11/01 11:57
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+c0720e600644b25b76fa@syzkaller.appspotmail.com
First crash: 34d, last: 34d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in inode_set_ctime_current / inode_update_timestamps fs 3 441d 456d 0/28 auto-obsoleted due to no activity on 2023/10/26 06:20

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

write to 0xffff8881047d7b18 of 4 bytes by task 27687 on cpu 0:
 inode_set_ctime_to_ts include/linux/fs.h:1678 [inline]
 inode_set_ctime_current+0x35/0x50 fs/inode.c:2664
 shmem_truncate_range+0x2f/0x70 mm/shmem.c:1145
 shmem_setattr+0x791/0x830 mm/shmem.c:1229
 notify_change+0x85c/0x8e0 fs/attr.c:503
 do_truncate fs/open.c:65 [inline]
 do_ftruncate+0x3cf/0x460 fs/open.c:181
 do_sys_ftruncate fs/open.c:199 [inline]
 __do_sys_ftruncate fs/open.c:207 [inline]
 __se_sys_ftruncate fs/open.c:205 [inline]
 __x64_sys_ftruncate+0x6a/0xc0 fs/open.c:205
 x64_sys_call+0x8e5/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:78
 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 0xffff8881047d7b18 of 4 bytes by task 27678 on cpu 1:
 inode_get_ctime_nsec include/linux/fs.h:1663 [inline]
 inode_get_ctime include/linux/fs.h:1669 [inline]
 inode_update_timestamps+0x56/0x280 fs/inode.c:1994
 generic_update_time fs/inode.c:2036 [inline]
 inode_update_time fs/inode.c:2056 [inline]
 __file_update_time fs/inode.c:2245 [inline]
 file_update_time+0x220/0x2b0 fs/inode.c:2275
 fault_dirty_shared_page+0xde/0x340 mm/memory.c:3204
 do_shared_fault mm/memory.c:5389 [inline]
 do_fault mm/memory.c:5435 [inline]
 do_pte_missing mm/memory.c:3965 [inline]
 handle_pte_fault mm/memory.c:5766 [inline]
 __handle_mm_fault mm/memory.c:5909 [inline]
 handle_mm_fault+0x1370/0x2a80 mm/memory.c:6077
 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x3b9/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x25e79932 -> 0x35ff78b7

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 27678 Comm: syz.0.4118 Not tainted 6.12.0-rc5-syzkaller-00176-g5635f189425e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/01 11:56 upstream 5635f189425e 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in inode_set_ctime_current / inode_update_timestamps
* Struck through repros no longer work on HEAD.