syzbot


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

Status: auto-closed as invalid on 2021/09/01 10:35
Subsystems: ext4
[Documentation on labels]
First crash: 996d, last: 996d
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 (3) ext4 1 889d 889d 0/26 auto-closed as invalid on 2021/12/17 21:26
upstream KCSAN: data-race in copy_page_to_iter / strncpy (4) ext4 1 800d 799d 0/26 auto-closed as invalid on 2022/03/16 04:25
upstream KCSAN: data-race in copy_page_to_iter / strncpy ext4 1 1074d 1074d 0/26 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 0xffff888131a4e488 of 1 bytes by task 1919 on cpu 1:
 strncpy+0xcf/0x150 lib/string.c:118
 ext4_sample_last_mounted fs/ext4/file.c:829 [inline]
 ext4_file_open+0x3b0/0x4d0 fs/ext4/file.c:848
 do_dentry_open+0x529/0x850 fs/open.c:826
 vfs_open+0x43/0x50 fs/open.c:949
 do_open fs/namei.c:3374 [inline]
 path_openat+0x1787/0x1f20 fs/namei.c:3507
 do_filp_open+0xe9/0x200 fs/namei.c:3534
 do_sys_openat2+0xa3/0x250 fs/open.c:1204
 do_sys_open fs/open.c:1220 [inline]
 __do_sys_creat fs/open.c:1294 [inline]
 __se_sys_creat fs/open.c:1288 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1288
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888131a4e400 of 1024 bytes by task 1842 on cpu 0:
 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:801 [inline]
 copy_page_to_iter+0x2e1/0x940 lib/iov_iter.c:829
 filemap_read+0xef6/0x1220 mm/filemap.c:2605
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 blkdev_read_iter+0xb9/0xf0 fs/block_dev.c:1669
 call_read_iter include/linux/fs.h:2108 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x565/0x5d0 fs/read_write.c:496
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/28 10:33 upstream 7d549995d4e0 17d6ab15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in copy_page_to_iter / strncpy
* Struck through repros no longer work on HEAD.