syzbot


KCSAN: data-race in copy_page_to_iter / strncpy (4)

Status: auto-closed as invalid on 2022/03/16 04:25
Reported-by: syzbot+88a9b535e28311efdcd4@syzkaller.appspotmail.com
First crash: 290d, last: 290d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in copy_page_to_iter / strncpy (2) 1 486d 486d 0/24 auto-closed as invalid on 2021/09/01 10:35
upstream KCSAN: data-race in copy_page_to_iter / strncpy (3) 1 378d 378d 0/24 auto-closed as invalid on 2021/12/17 21:26
upstream KCSAN: data-race in copy_page_to_iter / strncpy 1 564d 564d 0/24 auto-closed as invalid on 2021/06/15 06:17

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

write to 0xffff888108b1b488 of 1 bytes by task 16090 on cpu 1:
 strncpy+0xcf/0x150 lib/string.c:114
 ext4_sample_last_mounted fs/ext4/file.c:828 [inline]
 ext4_file_open+0x3a6/0x4e0 fs/ext4/file.c:847
 do_dentry_open+0x52c/0x860 fs/open.c:824
 vfs_open+0x43/0x50 fs/open.c:959
 do_open fs/namei.c:3476 [inline]
 path_openat+0x170c/0x1f30 fs/namei.c:3609
 do_filp_open+0x105/0x220 fs/namei.c:3636
 do_sys_openat2+0xb5/0x2b0 fs/open.c:1214
 do_sys_open fs/open.c:1230 [inline]
 __do_sys_open fs/open.c:1238 [inline]
 __se_sys_open fs/open.c:1234 [inline]
 __x64_sys_open+0xe2/0x110 fs/open.c:1234
 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 0xffff888108b1b400 of 1024 bytes by task 10450 on cpu 0:
 instrument_copy_to_user include/linux/instrumented.h:119 [inline]
 copyout lib/iov_iter.c:154 [inline]
 copy_page_to_iter_iovec lib/iov_iter.c:226 [inline]
 __copy_page_to_iter lib/iov_iter.c:850 [inline]
 copy_page_to_iter+0x2cb/0x950 lib/iov_iter.c:878
 copy_folio_to_iter include/linux/uio.h:153 [inline]
 filemap_read+0x1126/0x1430 mm/filemap.c:2727
 blkdev_read_iter+0x2cc/0x380 block/fops.c:614
 call_read_iter include/linux/fs.h:2068 [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: 0 PID: 10450 Comm: udevd Not tainted 5.17.0-rc3-syzkaller-00029-ge6251ab4551f-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/09 04:24 upstream e6251ab4551f 0b33604d .config log report info KCSAN: data-race in copy_page_to_iter / strncpy
* Struck through repros no longer work on HEAD.