syzbot


KCSAN: data-race in _copy_to_iter / string (3)

Status: auto-obsoleted due to no activity on 2024/10/03 11:49
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+c9e5dc9ea39872eed454@syzkaller.appspotmail.com
First crash: 54d, last: 47d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _copy_to_iter / string (2) ext4 2 187d 206d 0/28 auto-obsoleted due to no activity on 2024/05/15 22:06
upstream KCSAN: data-race in _copy_to_iter / string ext4 1 266d 266d 0/28 auto-obsoleted due to no activity on 2024/02/26 12:58

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

write to 0xffff88811bb16050 of 1 bytes by task 4878 on cpu 0:
 string_nocheck lib/vsprintf.c:650 [inline]
 string+0x16c/0x210 lib/vsprintf.c:728
 bdev_name+0x140/0x250 lib/vsprintf.c:968
 pointer+0x5e3/0xd20 lib/vsprintf.c:2474
 vsnprintf+0x861/0xe30 lib/vsprintf.c:2828
 snprintf+0x87/0xb0 lib/vsprintf.c:2959
 ext4_multi_mount_protect+0x4d0/0x5e0 fs/ext4/mmp.c:386
 __ext4_fill_super fs/ext4/super.c:5325 [inline]
 ext4_fill_super+0x2940/0x39e0 fs/ext4/super.c:5664
 get_tree_bdev+0x256/0x2e0 fs/super.c:1635
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5696
 vfs_get_tree+0x56/0x1e0 fs/super.c:1800
 do_new_mount+0x227/0x690 fs/namespace.c:3472
 path_mount+0x49b/0xb30 fs/namespace.c:3799
 do_mount fs/namespace.c:3812 [inline]
 __do_sys_mount fs/namespace.c:4020 [inline]
 __se_sys_mount+0x27c/0x2d0 fs/namespace.c:3997
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3997
 x64_sys_call+0x203e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811bb16000 of 512 bytes by task 4477 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/0xb00 lib/iov_iter.c:185
 copy_page_to_iter+0x171/0x2b0 lib/iov_iter.c:362
 copy_folio_to_iter include/linux/uio.h:180 [inline]
 filemap_read+0x42c/0x690 mm/filemap.c:2676
 blkdev_read_iter+0x217/0x2c0 block/fops.c:764
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5e9/0x6e0 fs/read_write.c:476
 ksys_read+0xeb/0x1b0 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
 x64_sys_call+0x27d3/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4477 Comm: udevd Not tainted 6.11.0-rc5-syzkaller-00079-g928f79a188aa #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/29 11:49 upstream 928f79a188aa ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / string
2024/08/22 08:00 upstream 872cf28b8df9 ca02180f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _copy_to_iter / string
* Struck through repros no longer work on HEAD.