[moderation] [block?] KCSAN: data-race in _copy_to_iter / fat_mirror_bhs (3)

0 views
Skip to first unread message

syzbot

unread,
1:36 AM (2 hours ago) 1:36 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f0e9c8cefa9 Merge tag 'block-6.19-20251226' of git://git...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=164d84fc580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b319ff1b6a2797ca
dashboard link: https://syzkaller.appspot.com/bug?extid=7283384e463450436383
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [ax...@kernel.dk linux...@vger.kernel.org linux-...@vger.kernel.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e144e2932fb5/disk-3f0e9c8c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c9d16e596ebc/vmlinux-3f0e9c8c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/22f8acbc8a3a/bzImage-3f0e9c8c.xz

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

==================================================================
BUG: KCSAN: data-race in _copy_to_iter / fat_mirror_bhs

read to 0xffff888119f14000 of 512 bytes by task 3307 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:30 [inline]
iterate_and_advance2 include/linux/iov_iter.h:302 [inline]
iterate_and_advance include/linux/iov_iter.h:330 [inline]
_copy_to_iter+0x130/0xe70 lib/iov_iter.c:197
copy_page_to_iter+0x18f/0x2d0 lib/iov_iter.c:374
copy_folio_to_iter include/linux/uio.h:204 [inline]
filemap_read+0x407/0xa00 mm/filemap.c:2851
blkdev_read_iter+0x22d/0x2e0 block/fops.c:856
new_sync_read fs/read_write.c:491 [inline]
vfs_read+0x64c/0x770 fs/read_write.c:572
ksys_read+0xda/0x1a0 fs/read_write.c:715
__do_sys_read fs/read_write.c:724 [inline]
__se_sys_read fs/read_write.c:722 [inline]
__x64_sys_read+0x40/0x50 fs/read_write.c:722
x64_sys_call+0x2889/0x3000 arch/x86/include/generated/asm/syscalls_64.h:1
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff888119f14000 of 2048 bytes by task 14059 on cpu 0:
fat_mirror_bhs+0x1df/0x320 fs/fat/fatent.c:395
fat_alloc_clusters+0x98b/0xa80 fs/fat/fatent.c:543
fat_add_cluster fs/fat/inode.c:108 [inline]
__fat_get_block fs/fat/inode.c:155 [inline]
fat_get_block+0x258/0x5e0 fs/fat/inode.c:190
__block_write_begin_int+0x400/0xf90 fs/buffer.c:2145
block_write_begin fs/buffer.c:2256 [inline]
cont_write_begin+0x5ff/0x970 fs/buffer.c:2594
fat_write_begin+0x4f/0xe0 fs/fat/inode.c:230
cont_expand_zero fs/buffer.c:2522 [inline]
cont_write_begin+0x1b0/0x970 fs/buffer.c:2584
fat_write_begin+0x4f/0xe0 fs/fat/inode.c:230
generic_cont_expand_simple+0xb0/0x150 fs/buffer.c:2485
fat_cont_expand+0x3e/0x170 fs/fat/file.c:223
fat_setattr+0x2a5/0x8a0 fs/fat/file.c:513
notify_change+0x872/0x8f0 fs/attr.c:546
do_truncate fs/open.c:68 [inline]
do_ftruncate+0x335/0x3c0 fs/open.c:195
do_sys_ftruncate fs/open.c:207 [inline]
__do_sys_ftruncate fs/open.c:212 [inline]
__se_sys_ftruncate fs/open.c:210 [inline]
__x64_sys_ftruncate+0x68/0xc0 fs/open.c:210
x64_sys_call+0x2e35/0x3000 arch/x86/include/generated/asm/syscalls_64.h:78
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 14059 Comm: syz.7.3367 Tainted: G W syzkaller #0 PREEMPT(voluntary)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================


---
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
Reply all
Reply to author
Forward
0 new messages