[syzbot] [btrfs?] KMSAN: uninit-value in iov_iter_alignment_iovec

syzbot
2024-06-12T15:00:25Z

Hello,

syzbot found the following issue on:

HEAD commit: 614da38e2f7a Merge tag 'hid-for-linus-2024051401' of git:/..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=166b7286980000
kernel config: https://syzkaller.appspot.com/x/.config?x=f5d2cbf33633f507
dashboard link: https://syzkaller.appspot.com/bug?extid=f2a9c06bfaa027217ebb
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=113f7f16980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11698dce980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/89eafb874b71/disk-614da38e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/356000512ad9/vmlinux-614da38e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/839c73939115/bzImage-614da38e.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b8b22127e3de/mount_2.gz

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

=====================================================
BUG: KMSAN: uninit-value in iov_iter_alignment_iovec+0x1a8/0x470 lib/iov_iter.c:788
iov_iter_alignment_iovec+0x1a8/0x470 lib/iov_iter.c:788
iov_iter_alignment+0x1aa/0x290 lib/iov_iter.c:833
check_direct_IO fs/btrfs/file.c:1452 [inline]
check_direct_read fs/btrfs/file.c:3736 [inline]
btrfs_direct_read fs/btrfs/file.c:3765 [inline]
btrfs_file_read_iter+0x46f/0xc70 fs/btrfs/file.c:3826
call_read_iter include/linux/fs.h:2114 [inline]
aio_read+0x4b3/0x690 fs/aio.c:1611
io_submit_one+0x2809/0x3280 fs/aio.c:2061
__do_sys_io_submit fs/aio.c:2120 [inline]
__se_sys_io_submit+0x275/0x700 fs/aio.c:2090
__x64_sys_io_submit+0x96/0xe0 fs/aio.c:2090
x64_sys_call+0x3620/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:210
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable inline_vecs created at:
aio_read+0x4c/0x690 fs/aio.c:1592
io_submit_one+0x2809/0x3280 fs/aio.c:2061

CPU: 1 PID: 5053 Comm: syz-executor335 Not tainted 6.9.0-syzkaller-02707-g614da38e2f7a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
=====================================================

---
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 syzkaller@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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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