syzbot


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

Status: moderation: reported on 2025/12/16 21:56
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+d021430ddd367627b89e@syzkaller.appspotmail.com
First crash: 110d, last: 6d04h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
0f47a6be-4e12-4ff5-81bf-2078c1006ccd assessment-kcsan Benign: ✅  Confident: ✅  KCSAN: data-race in _copy_to_iter / memcpy_and_pad (3) 2026/01/15 23:53 2026/01/15 23:53 2026/01/15 23:56 a9d6a79219801d2130df3b1a792c57f0e5428e9f
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _copy_to_iter / memcpy_and_pad block 6 2 318d 320d 0/29 auto-obsoleted due to no activity on 2025/07/17 19:38
upstream KCSAN: data-race in _copy_to_iter / memcpy_and_pad (2) block 6 4 168d 210d 0/29 auto-obsoleted due to no activity on 2025/12/14 18:55

Sample crash report:
EXT4-fs (loop2): ext4_check_descriptors: Checksum for group 0 failed (62631!=20869)
EXT4-fs (loop2): stripe (65535) is not aligned with cluster size (16), stripe is disabled
EXT4-fs error (device loop2): htree_dirblock_to_tree:1080: inode #2: block 48: comm syz.2.837: bad entry in directory: directory entry overrun - offset=76, inode=16, rec_len=65540, size=1024 fake=0
==================================================================
BUG: KCSAN: data-race in _copy_to_iter / memcpy_and_pad

read to 0xffff88811e380400 of 512 bytes by task 3699 on cpu 1:
 instrument_copy_to_user include/linux/instrumented.h:130 [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/0xea0 lib/iov_iter.c:197
 copy_page_to_iter+0x18f/0x2d0 lib/iov_iter.c:374
 copy_folio_to_iter include/linux/uio.h:204 [inline]
 filemap_read+0x407/0xa10 mm/filemap.c:2856
 blkdev_read_iter+0x22d/0x2e0 block/fops.c:855
 new_sync_read fs/read_write.c:493 [inline]
 vfs_read+0x6c0/0x7f0 fs/read_write.c:574
 ksys_read+0xdc/0x1a0 fs/read_write.c:717
 __do_sys_read fs/read_write.c:726 [inline]
 __se_sys_read fs/read_write.c:724 [inline]
 __x64_sys_read+0x40/0x50 fs/read_write.c:724
 x64_sys_call+0x2886/0x3020 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff88811e3805f6 of 10 bytes by task 5298 on cpu 0:
 memcpy_and_pad+0x5a/0x80 lib/string_helpers.c:1009
 ext4_update_super+0x790/0xba0 fs/ext4/super.c:6259
 ext4_commit_super+0x40/0x280 fs/ext4/super.c:6288
 ext4_handle_error+0x452/0x550 fs/ext4/super.c:719
 __ext4_error_inode+0x1bb/0x3f0 fs/ext4/super.c:865
 __ext4_check_dir_entry+0x53f/0x550 fs/ext4/dir.c:121
 htree_dirblock_to_tree+0x231/0x620 fs/ext4/namei.c:1077
 ext4_htree_fill_tree+0x458/0xa60 fs/ext4/namei.c:1188
 ext4_dx_readdir fs/ext4/dir.c:601 [inline]
 ext4_readdir+0x1915/0x1f80 fs/ext4/dir.c:147
 iterate_dir+0x114/0x330 fs/readdir.c:108
 __do_sys_getdents fs/readdir.c:327 [inline]
 __se_sys_getdents+0xd2/0x220 fs/readdir.c:312
 __x64_sys_getdents+0x43/0x50 fs/readdir.c:312
 x64_sys_call+0xea8/0x3020 arch/x86/include/generated/asm/syscalls_64.h:79
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 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: 5298 Comm: syz.2.837 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
==================================================================
EXT4-fs (loop2): Remounting filesystem read-only

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/31 09:29 upstream d0c3bcd5b897 aeea1c72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / memcpy_and_pad
2026/02/16 01:51 upstream 26a4cfaff82a 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / memcpy_and_pad
2026/01/27 19:57 upstream 1f97d9dcf536 9a514c2f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / memcpy_and_pad
2026/01/06 22:43 upstream f0b9d8eb98df d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / memcpy_and_pad
2025/12/16 21:56 upstream 40fbbd64bba6 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / memcpy_and_pad
* Struck through repros no longer work on HEAD.