syzbot


KCSAN: data-race in fat_alloc_clusters / fat_statfs (3)

Status: moderation: reported on 2025/06/16 21:50
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+84a49682e970f5bd639f@syzkaller.appspotmail.com
First crash: 2d21h, last: 2d21h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fat_alloc_clusters / fat_statfs (2) exfat 1 599d 599d 0/29 auto-obsoleted due to no activity on 2023/12/03 08:26
upstream KCSAN: data-race in fat_alloc_clusters / fat_statfs exfat 1 724d 724d 0/29 auto-obsoleted due to no activity on 2023/07/31 11:59

Sample crash report:
SELinux: security_context_str_to_sid (root) failed with errno=-22
==================================================================
BUG: KCSAN: data-race in fat_alloc_clusters / fat_statfs

write to 0xffff888118c5c0ac of 4 bytes by task 7533 on cpu 1:
 fat_alloc_clusters+0x662/0xa80 fs/fat/fatent.c:511
 fat_add_cluster fs/fat/inode.c:107 [inline]
 __fat_get_block fs/fat/inode.c:154 [inline]
 fat_get_block+0x258/0x5e0 fs/fat/inode.c:189
 __block_write_begin_int+0x400/0xf90 fs/buffer.c:2151
 block_write_begin fs/buffer.c:2262 [inline]
 cont_write_begin+0x5fc/0x970 fs/buffer.c:2601
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228
 generic_perform_write+0x184/0x490 mm/filemap.c:4112
 __generic_file_write_iter+0x9e/0x120 mm/filemap.c:4229
 generic_file_write_iter+0x8d/0x2f0 mm/filemap.c:4255
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x4a0/0x8e0 fs/read_write.c:686
 ksys_write+0xda/0x1a0 fs/read_write.c:738
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x40/0x50 fs/read_write.c:746
 x64_sys_call+0x2cdd/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888118c5c0ac of 4 bytes by task 7544 on cpu 0:
 fat_statfs+0x182/0x200 fs/fat/inode.c:843
 statfs_by_dentry fs/statfs.c:66 [inline]
 vfs_statfs+0xc8/0x1c0 fs/statfs.c:90
 user_statfs+0x71/0x110 fs/statfs.c:105
 __do_sys_statfs fs/statfs.c:193 [inline]
 __se_sys_statfs fs/statfs.c:190 [inline]
 __x64_sys_statfs+0x65/0xf0 fs/statfs.c:190
 x64_sys_call+0x1edd/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:138
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00001f52 -> 0x00001f51

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 7544 Comm: syz.6.1473 Not tainted 6.16.0-rc2-syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/16 21:49 upstream e04c78d86a96 d1716036 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_alloc_clusters / fat_statfs
* Struck through repros no longer work on HEAD.