syzbot


KCSAN: data-race in _copy_to_iter / set_overhead (3)

Status: moderation: reported on 2025/06/20 19:22
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+6d6d8f707a01b190ec85@syzkaller.appspotmail.com
First crash: 20h47m, last: 20h47m
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _copy_to_iter / set_overhead ext4 1 1040d 1040d 0/29 auto-closed as invalid on 2022/09/20 11:39
upstream KCSAN: data-race in _copy_to_iter / set_overhead (2) ext4 1 183d 183d 0/29 auto-obsoleted due to no activity on 2025/02/14 15:25

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

write to 0xffff88811fc91648 of 4 bytes by task 10363 on cpu 1:
 set_overhead+0x28/0x40 fs/ext4/ioctl.c:1708
 ext4_update_primary_sb fs/ext4/ioctl.c:74 [inline]
 ext4_update_superblocks_fn+0x203/0xaa0 fs/ext4/ioctl.c:218
 ext4_update_overhead+0x135/0x160 fs/ext4/ioctl.c:1721
 ext4_fill_super+0x2d16/0x34e0 fs/ext4/super.c:5745
 get_tree_bdev_flags+0x28e/0x300 fs/super.c:1681
 get_tree_bdev+0x1f/0x30 fs/super.c:1704
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5756
 vfs_get_tree+0x57/0x1d0 fs/super.c:1804
 do_new_mount+0x207/0x680 fs/namespace.c:3885
 path_mount+0x4a4/0xb20 fs/namespace.c:4209
 do_mount fs/namespace.c:4222 [inline]
 __do_sys_mount fs/namespace.c:4433 [inline]
 __se_sys_mount+0x28f/0x2e0 fs/namespace.c:4410
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4410
 x64_sys_call+0xd36/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:166
 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 0xffff88811fc91400 of 1024 bytes by task 3487 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:300 [inline]
 iterate_and_advance include/linux/iov_iter.h:328 [inline]
 _copy_to_iter+0x12d/0xe30 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:2762
 blkdev_read_iter+0x22d/0x2e0 block/fops.c:833
 new_sync_read fs/read_write.c:491 [inline]
 vfs_read+0x5ca/0x6f0 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+0x2d77/0x2fb0 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: 3487 Comm: udevd Not tainted 6.16.0-rc2-syzkaller-00231-g75f5f23f8787 #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/20 19:22 upstream 75f5f23f8787 804b3919 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / set_overhead
* Struck through repros no longer work on HEAD.