syzbot


KCSAN: data-race in _copy_to_iter / fat12_ent_put (7)

Status: moderation: reported on 2025/09/01 20:08
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+03122956fefeb0ca4c43@syzkaller.appspotmail.com
First crash: 1d17h, last: 1d17h
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _copy_to_iter / fat12_ent_put exfat 6 6 1089d 1120d 0/29 auto-obsoleted due to no activity on 2022/10/14 22:33
upstream KCSAN: data-race in _copy_to_iter / fat12_ent_put (4) exfat 6 5 829d 859d 0/29 auto-obsoleted due to no activity on 2023/07/02 02:14
upstream KCSAN: data-race in _copy_to_iter / fat12_ent_put (5) exfat 6 21 649d 634d 0/29 auto-obsoleted due to no activity on 2023/12/28 22:56
upstream KCSAN: data-race in _copy_to_iter / fat12_ent_put (6) exfat 6 1 552d 552d 0/29 auto-obsoleted due to no activity on 2024/04/04 01:15
upstream KCSAN: data-race in _copy_to_iter / fat12_ent_put (3) exfat 6 3 903d 919d 0/29 auto-obsoleted due to no activity on 2023/04/24 07:39
upstream KCSAN: data-race in _copy_to_iter / fat12_ent_put (2) exfat 6 3 1019d 1053d 0/29 auto-obsoleted due to no activity on 2022/12/31 00:12

Sample crash report:
Buffer I/O error on dev loop9, logical block 0, async page read
Buffer I/O error on dev loop9, logical block 0, async page read
==================================================================
BUG: KCSAN: data-race in _copy_to_iter / fat12_ent_put

write to 0xffff88811c75323f of 1 bytes by task 9199 on cpu 1:
 fat12_ent_put+0x74/0x170 fs/fat/fatent.c:168
 fat_alloc_clusters+0x4ce/0xa80 fs/fat/fatent.c:503
 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:2145
 block_write_begin fs/buffer.c:2256 [inline]
 cont_write_begin+0x5fc/0x970 fs/buffer.c:2594
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:229
 cont_expand_zero fs/buffer.c:2522 [inline]
 cont_write_begin+0x1b0/0x970 fs/buffer.c:2584
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:229
 generic_cont_expand_simple+0xad/0x150 fs/buffer.c:2485
 fat_cont_expand+0x3e/0x170 fs/fat/file.c:223
 fat_setattr+0x2a5/0x8a0 fs/fat/file.c:513
 notify_change+0x806/0x890 fs/attr.c:552
 do_truncate fs/open.c:68 [inline]
 do_ftruncate+0x34b/0x450 fs/open.c:195
 do_sys_ftruncate fs/open.c:210 [inline]
 __do_sys_ftruncate fs/open.c:215 [inline]
 __se_sys_ftruncate fs/open.c:213 [inline]
 __x64_sys_ftruncate+0x68/0xc0 fs/open.c:213
 x64_sys_call+0x2d52/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:78
 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 0xffff88811c753200 of 512 bytes by task 4193 on cpu 0:
 instrument_copy_to_user include/linux/instrumented.h:113 [inline]
 copy_to_user_iter lib/iov_iter.c:24 [inline]
 iterate_ubuf include/linux/iov_iter.h:30 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:302 [inline]
 iterate_and_advance include/linux/iov_iter.h:330 [inline]
 _copy_to_iter+0x130/0xe70 lib/iov_iter.c:185
 copy_page_to_iter+0x18f/0x2d0 lib/iov_iter.c:362
 copy_folio_to_iter include/linux/uio.h:204 [inline]
 filemap_read+0x407/0xa00 mm/filemap.c:2763
 blkdev_read_iter+0x22d/0x2e0 block/fops.c:849
 new_sync_read fs/read_write.c:491 [inline]
 vfs_read+0x649/0x770 fs/read_write.c:572
 ksys_read+0xda/0x1a0 fs/read_write.c:715
 __do_sys_read fs/read_write.c:724 [inline]
 __se_sys_read fs/read_write.c:722 [inline]
 __x64_sys_read+0x40/0x50 fs/read_write.c:722
 x64_sys_call+0x27bc/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:1
 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

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4193 Comm: udevd Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/01 20:07 upstream b320789d6883 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / fat12_ent_put
* Struck through repros no longer work on HEAD.