[moderation] [ext4?] KCSAN: data-race in copy_page_from_iter_atomic / copy_page_from_iter_atomic

0 views
Skip to first unread message

syzbot

unread,
Apr 25, 2025, 8:55:24 AMApr 25
Hello,

syzbot found the following issue on:

HEAD commit: 02ddfb981de8 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=145e7fcf980000
kernel config: https://syzkaller.appspot.com/x/.config?x=881e3ae9e3cc6f4e
dashboard link: https://syzkaller.appspot.com/bug?extid=c3de969e7ffdd4a612e6
compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
CC: [[email protected] [email protected] [email protected] [email protected]]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2bee38e5cde1/disk-02ddfb98.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4f48b9d54eac/vmlinux-02ddfb98.xz
kernel image: https://storage.googleapis.com/syzbot-assets/195c60d459be/bzImage-02ddfb98.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

==================================================================
BUG: KCSAN: data-race in copy_page_from_iter_atomic / copy_page_from_iter_atomic

write to 0xffff888121a2fa22 of 2 bytes by task 4459 on cpu 1:
memcpy_from_iter lib/iov_iter.c:73 [inline]
iterate_bvec include/linux/iov_iter.h:123 [inline]
iterate_and_advance2 include/linux/iov_iter.h:304 [inline]
iterate_and_advance include/linux/iov_iter.h:328 [inline]
__copy_from_iter lib/iov_iter.c:249 [inline]
copy_page_from_iter_atomic+0x77f/0xff0 lib/iov_iter.c:483
copy_folio_from_iter_atomic include/linux/uio.h:210 [inline]
generic_perform_write+0x2c2/0x490 mm/filemap.c:4121
ext4_buffered_write_iter+0x1ee/0x3c0 fs/ext4/file.c:299
ext4_file_write_iter+0x383/0xf00 fs/ext4/file.c:-1
iter_file_splice_write+0x5ef/0x970 fs/splice.c:738
do_splice_from fs/splice.c:935 [inline]
direct_splice_actor+0x153/0x2a0 fs/splice.c:1158
splice_direct_to_actor+0x30f/0x680 fs/splice.c:1102
do_splice_direct_actor fs/splice.c:1201 [inline]
do_splice_direct+0xda/0x150 fs/splice.c:1227
do_sendfile+0x380/0x640 fs/read_write.c:1368
__do_sys_sendfile64 fs/read_write.c:1429 [inline]
__se_sys_sendfile64 fs/read_write.c:1415 [inline]
__x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1415
x64_sys_call+0xb39/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:41
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888121a2f800 of 1024 bytes by task 4116 on cpu 0:
memcpy_from_iter lib/iov_iter.c:73 [inline]
iterate_bvec include/linux/iov_iter.h:123 [inline]
iterate_and_advance2 include/linux/iov_iter.h:304 [inline]
iterate_and_advance include/linux/iov_iter.h:328 [inline]
__copy_from_iter lib/iov_iter.c:249 [inline]
copy_page_from_iter_atomic+0x77f/0xff0 lib/iov_iter.c:483
copy_folio_from_iter_atomic include/linux/uio.h:210 [inline]
generic_perform_write+0x2c2/0x490 mm/filemap.c:4121
shmem_file_write_iter+0xc5/0xf0 mm/shmem.c:3464
lo_rw_aio+0x5f7/0x7c0 drivers/block/loop.c:-1
do_req_filebacked drivers/block/loop.c:-1 [inline]
loop_handle_cmd drivers/block/loop.c:1866 [inline]
loop_process_work+0x52d/0xa60 drivers/block/loop.c:1901
loop_workfn+0x31/0x40 drivers/block/loop.c:1925
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0x4cb/0x9d0 kernel/workqueue.c:3319
worker_thread+0x582/0x770 kernel/workqueue.c:3400
kthread+0x486/0x510 kernel/kthread.c:464
ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4116 Comm: kworker/u8:13 Not tainted 6.15.0-rc3-syzkaller-00094-g02ddfb981de8 #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: loop0 loop_workfn
==================================================================


---
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 [email protected].

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