syzbot


KCSAN: data-race in _copy_to_iter / kmmpd

Status: moderation: reported on 2024/08/23 00:36
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+c1161218be8dcd8946b9@syzkaller.appspotmail.com
First crash: 22d, last: 22d

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

write to 0xffff88814f57c008 of 8 bytes by task 4132 on cpu 0:
 kmmpd+0xb8/0x610 fs/ext4/mmp.c:153
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff88814f57c000 of 512 bytes by task 3503 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/0xb00 lib/iov_iter.c:185
 copy_page_to_iter+0x171/0x2b0 lib/iov_iter.c:362
 copy_folio_to_iter include/linux/uio.h:180 [inline]
 filemap_read+0x42c/0x690 mm/filemap.c:2676
 blkdev_read_iter+0x217/0x2c0 block/fops.c:764
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5e9/0x6e0 fs/read_write.c:476
 ksys_read+0xeb/0x1b0 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
 x64_sys_call+0x27d3/0x2d60 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: 3503 Comm: udevd Not tainted 6.11.0-rc4-syzkaller-00033-g872cf28b8df9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/23 00:35 upstream 872cf28b8df9 ce8a9099 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / kmmpd
* Struck through repros no longer work on HEAD.