syzbot


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

Status: auto-closed as invalid on 2021/12/17 21:26
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 390d, last: 390d
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 497d 497d 0/24 auto-closed as invalid on 2021/09/01 10:35
upstream KCSAN: data-race in copy_page_to_iter / strncpy (4) 1 301d 300d 0/24 auto-closed as invalid on 2022/03/16 04:25
upstream KCSAN: data-race in copy_page_to_iter / strncpy 1 575d 575d 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 0xffff888158e04488 of 1 bytes by task 10924 on cpu 0:
 strncpy+0xcf/0x150 lib/string.c:114
 ext4_sample_last_mounted fs/ext4/file.c:832 [inline]
 ext4_file_open+0x430/0x5a0 fs/ext4/file.c:851
 do_dentry_open+0x52c/0x860 fs/open.c:822
 vfs_open+0x43/0x50 fs/open.c:957
 do_open fs/namei.c:3426 [inline]
 path_openat+0x17b8/0x1eb0 fs/namei.c:3559
 do_filp_open+0x105/0x220 fs/namei.c:3586
 do_sys_openat2+0xb5/0x2b0 fs/open.c:1212
 do_sys_open fs/open.c:1228 [inline]
 __do_sys_creat fs/open.c:1304 [inline]
 __se_sys_creat fs/open.c:1298 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1298
 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 0xffff888158e04400 of 1024 bytes by task 15430 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: 15430 Comm: udevd Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/12 21:26 upstream 5833291ab6de 75b04091 .config log report info KCSAN: data-race in copy_page_to_iter / strncpy
* Struck through repros no longer work on HEAD.