syzbot


KCSAN: data-race in copy_page_to_iter / ext4_ext_insert_extent

Status: auto-closed as invalid on 2022/01/06 02:58
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 372d, last: 362d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in copy_page_to_iter / ext4_ext_insert_extent

write to 0xffff88814e7f9002 of 2 bytes by task 21982 on cpu 0:
 le16_add_cpu include/linux/byteorder/generic.h:146 [inline]
 ext4_ext_insert_extent+0x1b4c/0x3060 fs/ext4/extents.c:2156
 ext4_ext_map_blocks+0x1779/0x2120 fs/ext4/extents.c:4306
 ext4_map_blocks+0x71e/0xf00 fs/ext4/inode.c:637
 _ext4_get_block+0x103/0x290 fs/ext4/inode.c:793
 ext4_get_block_unwritten+0x26/0x30 fs/ext4/inode.c:824
 __block_write_begin_int+0x4c5/0x1010 fs/buffer.c:2010
 __block_write_begin+0x2b/0x40 fs/buffer.c:2060
 ext4_write_begin+0x3fd/0xcc0
 ext4_da_write_begin+0x1fe/0x590 fs/ext4/inode.c:2941
 generic_perform_write+0x1c8/0x400 mm/filemap.c:3756
 ext4_buffered_write_iter+0x25b/0x380 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x1200
 call_write_iter include/linux/fs.h:2162 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x7f5/0x950 fs/read_write.c:590
 ksys_write+0xd9/0x190 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:652
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88814e7f9000 of 512 bytes by task 3480 on cpu 1:
 instrument_copy_to_user include/linux/instrumented.h:119 [inline]
 copyout lib/iov_iter.c:156 [inline]
 copy_page_to_iter_iovec lib/iov_iter.c:228 [inline]
 __copy_page_to_iter lib/iov_iter.c:852 [inline]
 copy_page_to_iter+0x2cb/0x950 lib/iov_iter.c:880
 filemap_read+0x138b/0x16d0 mm/filemap.c:2697
 generic_file_read_iter+0x72/0x2a0 mm/filemap.c:2792
 blkdev_read_iter+0x96/0x140 block/fops.c:583
 call_read_iter include/linux/fs.h:2156 [inline]
 new_sync_read fs/read_write.c:400 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:481
 ksys_read+0xd9/0x190 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+0x3e/0x50 fs/read_write.c:627
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3480 Comm: udevd Not tainted 5.16.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/02 02:52 upstream 58e1100fdc59 61f86278 .config log report info KCSAN: data-race in copy_page_to_iter / ext4_ext_insert_extent
ci2-upstream-kcsan-gce 2021/11/21 17:12 upstream 923dcc5eb0c1 4eb20a4e .config log report info KCSAN: data-race in copy_page_to_iter / ext4_ext_insert_extent
* Struck through repros no longer work on HEAD.