syzbot


KCSAN: data-race in _copy_to_iter / strncpy (6)

Status: auto-obsoleted due to no activity on 2024/03/28 16:29
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+469d1e07bdb2daaf3af8@syzkaller.appspotmail.com
First crash: 52d, last: 52d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _copy_to_iter / strncpy (3) ext4 1 371d 371d 0/26 auto-obsoleted due to no activity on 2023/05/14 07:57
upstream KCSAN: data-race in _copy_to_iter / strncpy (4) ext4 2 300d 321d 0/26 auto-obsoleted due to no activity on 2023/07/24 06:44
upstream KCSAN: data-race in _copy_to_iter / strncpy (5) ext4 3 200d 252d 0/26 auto-obsoleted due to no activity on 2023/11/01 08:28
upstream KCSAN: data-race in _copy_to_iter / strncpy (2) kernel 1 433d 433d 0/26 auto-obsoleted due to no activity on 2023/03/20 15:50
upstream KCSAN: data-race in _copy_to_iter / strncpy ext4 1 521d 521d 0/26 auto-obsoleted due to no activity on 2022/12/15 15:24

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

write to 0xffff8881465e2488 of 1 bytes by task 16331 on cpu 0:
 strncpy+0x9b/0x150 lib/string.c:96
 ext4_sample_last_mounted fs/ext4/file.c:847 [inline]
 ext4_file_open+0x367/0x3f0 fs/ext4/file.c:866
 do_dentry_open+0x637/0xbd0 fs/open.c:953
 vfs_open+0x4a/0x50 fs/open.c:1087
 do_open fs/namei.c:3641 [inline]
 path_openat+0x1821/0x1d40 fs/namei.c:3798
 do_filp_open+0xf6/0x200 fs/namei.c:3825
 do_sys_openat2+0xab/0x110 fs/open.c:1404
 do_sys_open fs/open.c:1419 [inline]
 __do_sys_open fs/open.c:1427 [inline]
 __se_sys_open fs/open.c:1423 [inline]
 __x64_sys_open+0xe6/0x110 fs/open.c:1423
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881465e2400 of 1024 bytes by task 3246 on cpu 1:
 instrument_copy_to_user include/linux/instrumented.h:113 [inline]
 copy_to_user_iter lib/iov_iter.c:24 [inline]
 iterate_ubuf include/linux/iov_iter.h:29 [inline]
 iterate_and_advance2 include/linux/iov_iter.h:245 [inline]
 iterate_and_advance include/linux/iov_iter.h:271 [inline]
 _copy_to_iter+0x126/0xb20 lib/iov_iter.c:186
 copy_page_to_iter+0x171/0x2b0 lib/iov_iter.c:381
 copy_folio_to_iter include/linux/uio.h:181 [inline]
 filemap_read+0x42c/0x680 mm/filemap.c:2654
 blkdev_read_iter+0x217/0x2c0 block/fops.c:757
 call_read_iter include/linux/fs.h:2079 [inline]
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5ab/0x6a0 fs/read_write.c:476
 ksys_read+0xeb/0x1a0 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+0x42/0x50 fs/read_write.c:627
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3246 Comm: udevd Not tainted 6.8.0-rc5-syzkaller-00029-g39133352cbed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/22 16:28 upstream 39133352cbed 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / strncpy
* Struck through repros no longer work on HEAD.