syzbot


KCSAN: data-race in _copy_to_iter / fat_set_state (11)

Status: moderation: reported on 2025/02/16 16:36
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+f2b943aec596ea162a82@syzkaller.appspotmail.com
First crash: 4d12h, last: 4d12h
Similar bugs (10)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (6) exfat 4 489d 511d 0/28 auto-obsoleted due to no activity on 2023/11/24 07:27
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (5) exfat 1 555d 555d 0/28 auto-obsoleted due to no activity on 2023/09/19 09:04
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (4) exfat 1 612d 612d 0/28 auto-obsoleted due to no activity on 2023/07/24 15:00
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (9) exfat 1 151d 151d 0/28 auto-obsoleted due to no activity on 2024/10/27 23:03
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (7) exfat 6 357d 416d 0/28 auto-obsoleted due to no activity on 2024/04/05 03:03
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (10) exfat 2 65d 91d 0/28 auto-obsoleted due to no activity on 2025/02/11 10:54
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (8) exfat 2 229d 262d 0/28 auto-obsoleted due to no activity on 2024/08/11 01:41
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (3) exfat 1 706d 706d 0/28 auto-obsoleted due to no activity on 2023/04/29 03:39
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (2) exfat 2 833d 860d 0/28 auto-obsoleted due to no activity on 2022/12/15 10:49
upstream KCSAN: data-race in _copy_to_iter / fat_set_state exfat 1 932d 932d 0/28 auto-closed as invalid on 2022/09/08 00:15

Sample crash report:
==================================================================
BUG: KCSAN: data-race in _copy_to_iter / fat_set_state

write to 0xffff88813269a041 of 1 bytes by task 6098 on cpu 0:
 fat_set_state+0x16e/0x1e0
 fat_fill_super+0x17c6/0x1c30 fs/fat/inode.c:1832
 vfat_fill_super+0x24/0x30 fs/fat/namei_vfat.c:1197
 get_tree_bdev_flags+0x29f/0x310 fs/super.c:1636
 get_tree_bdev+0x1f/0x30 fs/super.c:1659
 vfat_get_tree+0x1c/0x30 fs/fat/namei_vfat.c:1202
 vfs_get_tree+0x56/0x1e0 fs/super.c:1814
 do_new_mount+0x227/0x690 fs/namespace.c:3560
 path_mount+0x49b/0xb30 fs/namespace.c:3887
 do_mount fs/namespace.c:3900 [inline]
 __do_sys_mount fs/namespace.c:4111 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:4088
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4088
 x64_sys_call+0x2c84/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:166
 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 0xffff88813269a000 of 1024 bytes by task 4012 on cpu 1:
 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:300 [inline]
 iterate_and_advance include/linux/iov_iter.h:328 [inline]
 _copy_to_iter+0x130/0xd00 lib/iov_iter.c:185
 copy_page_to_iter+0x171/0x2b0 lib/iov_iter.c:362
 copy_folio_to_iter include/linux/uio.h:198 [inline]
 filemap_read+0x43d/0x8c0 mm/filemap.c:2742
 blkdev_read_iter+0x228/0x2d0 block/fops.c:796
 new_sync_read fs/read_write.c:484 [inline]
 vfs_read+0x5cc/0x6f0 fs/read_write.c:565
 ksys_read+0xe8/0x1b0 fs/read_write.c:708
 __do_sys_read fs/read_write.c:717 [inline]
 __se_sys_read fs/read_write.c:715 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:715
 x64_sys_call+0x2874/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:1
 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

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4012 Comm: udevd Not tainted 6.14.0-rc2-syzkaller-00303-gad1b832bf1cf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/16 16:35 upstream ad1b832bf1cf 40a34ec9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / fat_set_state
* Struck through repros no longer work on HEAD.