syzbot


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

Status: auto-obsoleted due to no activity on 2024/04/05 03:03
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+33d3a155fe2eb4624356@syzkaller.appspotmail.com
First crash: 283d, last: 224d
Similar bugs (8)
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 357d 378d 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 423d 423d 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 479d 479d 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 18d 18d 0/28 moderation: reported on 2024/09/22 23:03
upstream KCSAN: data-race in _copy_to_iter / fat_set_state (8) exfat 2 96d 129d 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 573d 573d 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 700d 727d 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 799d 799d 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 0xffff8881155a0041 of 1 bytes by task 18004 on cpu 0:
 fat_set_state+0x16e/0x1d0
 fat_put_super+0x2e/0x80 fs/fat/inode.c:737
 generic_shutdown_super+0xdb/0x210 fs/super.c:641
 kill_block_super+0x2a/0x60 fs/super.c:1675
 deactivate_locked_super+0x7a/0x1c0 fs/super.c:472
 deactivate_super+0x9b/0xb0 fs/super.c:505
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1267
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1274
 task_work_run+0x135/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:108 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline]
 syscall_exit_to_user_mode+0xbd/0x120 kernel/entry/common.c:212
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881155a0000 of 1024 bytes by task 7621 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:29 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
 iterate_and_advance include/linux/iov_iter.h:271 [inline]
 _copy_to_iter+0x126/0xb20 lib/iov_iter.c:186
 copy_page_to_iter+0x171/0x2b0 lib/iov_iter.c:381
 copy_folio_to_iter include/linux/uio.h:181 [inline]
 filemap_read+0x42c/0x680 mm/filemap.c:2654
 blkdev_read_iter+0x217/0x2c0 block/fops.c:757
 call_read_iter include/linux/fs.h:2081 [inline]
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5ab/0x6a0 fs/read_write.c:476
 ksys_read+0xeb/0x1a0 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:627
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7621 Comm: udevd Not tainted 6.8.0-rc6-syzkaller-00120-g87adedeba51a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/01 03:02 upstream 87adedeba51a 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / fat_set_state
2024/02/21 10:33 upstream 9fc1ccccfd8d 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / fat_set_state
2024/02/21 06:20 upstream fca7526b7d89 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / fat_set_state
2024/01/29 17:25 upstream 41bccc98fb79 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / fat_set_state
2024/01/16 06:16 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / fat_set_state
2024/01/01 21:47 upstream 610a9b8f49fb fb427a07 .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.