syzbot


KCSAN: data-race in _copy_to_iter / set_overhead

Status: auto-closed as invalid on 2022/09/20 11:39
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 108d, last: 108d

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

write to 0xffff888138e60648 of 4 bytes by task 16090 on cpu 1:
 set_overhead+0x24/0x30 fs/ext4/ioctl.c:1688
 ext4_update_primary_sb+0xe9/0x2c0 fs/ext4/ioctl.c:74
 ext4_update_superblocks_fn+0x123/0x370 fs/ext4/ioctl.c:222
 ext4_update_overhead+0xd8/0xf0 fs/ext4/ioctl.c:1701
 ext4_fill_super+0x12df/0x5000 fs/ext4/super.c:5536
 get_tree_bdev+0x2b4/0x3b0 fs/super.c:1323
 ext4_get_tree+0x18/0x20 fs/ext4/super.c:5547
 vfs_get_tree+0x49/0x190 fs/super.c:1530
 do_new_mount+0x200/0x650 fs/namespace.c:3040
 path_mount+0x4ad/0xbb0 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x281/0x2d0 fs/namespace.c:3568
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888138e60400 of 1024 bytes by task 9095 on cpu 0:
 instrument_copy_to_user include/linux/instrumented.h:119 [inline]
 copyout lib/iov_iter.c:169 [inline]
 _copy_to_iter+0x11d/0x8b0 lib/iov_iter.c:524
 copy_page_to_iter+0x333/0x3f0 lib/iov_iter.c:722
 copy_folio_to_iter include/linux/uio.h:169 [inline]
 filemap_read+0x119b/0x1430 mm/filemap.c:2711
 blkdev_read_iter+0x2c6/0x370 block/fops.c:598
 call_read_iter include/linux/fs.h:2186 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x3a5/0x560 fs/read_write.c:470
 ksys_read+0xe8/0x1a0 fs/read_write.c:607
 __do_sys_read fs/read_write.c:617 [inline]
 __se_sys_read fs/read_write.c:615 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:615
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 9095 Comm: udevd Not tainted 5.19.0-syzkaller-13930-g7ebfc85e2cd7-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop1, logical block 0, async page read
I/O error, dev loop0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop0, logical block 0, async page read
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop1, logical block 0, async page read
I/O error, dev loop0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop0, logical block 0, async page read
I/O error, dev loop0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop1, logical block 0, async page read
Buffer I/O error on dev loop1, logical block 0, async page read
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/08/16 11:33 upstream 7ebfc85e2cd7 7a7cb304 .config log report info KCSAN: data-race in _copy_to_iter / set_overhead
* Struck through repros no longer work on HEAD.