[moderation] [ext4?] KCSAN: data-race in _copy_to_iter / strncpy (6)

1 view
Skip to first unread message

syzbot

unread,
Feb 22, 2024, 11:29:19 AMFeb 22
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 39133352cbed Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1726ff58180000
kernel config: https://syzkaller.appspot.com/x/.config?x=7507056e4ee79a
dashboard link: https://syzkaller.appspot.com/bug?extid=469d1e07bdb2daaf3af8
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [adilger...@dilger.ca linux...@vger.kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org ty...@mit.edu]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/da67c50a8865/disk-39133352.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4ec0da5364e5/vmlinux-39133352.xz
kernel image: https://storage.googleapis.com/syzbot-assets/29aba2ced196/bzImage-39133352.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+469d1e...@syzkaller.appspotmail.com

==================================================================
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


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Mar 28, 2024, 12:29:15 PMMar 28
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages