[syzbot] [ocfs2?] KMSAN: uninit-value in ocfs2_file_read_iter

From: syzbot
Date: Mon Oct 28 2024 - 04:30:34 EST


Hello,

syzbot found the following issue on:

HEAD commit: c2ee9f594da8 KVM: selftests: Fix build on on non-x86 archi..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=16057c30580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0a45c444eedcbdb
dashboard link: https://syzkaller.appspot.com/bug?extid=a73e253cca4f0230a5a5
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=11677640580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12035287980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f80f18f107d8/disk-c2ee9f59.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/64d58c958a32/vmlinux-c2ee9f59.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7c33b64644e2/bzImage-c2ee9f59.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/36ce847202f8/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a73e253cca4f0230a5a5@xxxxxxxxxxxxxxxxxxxxxxxxx

=====================================================
BUG: KMSAN: uninit-value in ocfs2_file_read_iter+0x9a4/0xf80 fs/ocfs2/file.c:2584
ocfs2_file_read_iter+0x9a4/0xf80 fs/ocfs2/file.c:2584
io_iter_do_read io_uring/rw.c:771 [inline]
__io_read+0x8d2/0x20f0 io_uring/rw.c:865
io_read+0x3e/0xf0 io_uring/rw.c:943
io_issue_sqe+0x429/0x22c0 io_uring/io_uring.c:1739
io_wq_submit_work+0xaf9/0xdc0 io_uring/io_uring.c:1848
io_worker_handle_work+0xd11/0x2110 io_uring/io-wq.c:601
io_wq_worker+0x447/0x1410 io_uring/io-wq.c:655
ret_from_fork+0x6d/0x90 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Uninit was created at:
__alloc_pages_noprof+0x9a7/0xe00 mm/page_alloc.c:4756
alloc_pages_mpol_noprof+0x299/0x990 mm/mempolicy.c:2265
alloc_pages_noprof+0x1bf/0x1e0 mm/mempolicy.c:2345
alloc_slab_page mm/slub.c:2412 [inline]
allocate_slab+0x33a/0x1250 mm/slub.c:2578
new_slab mm/slub.c:2631 [inline]
___slab_alloc+0x12ef/0x35e0 mm/slub.c:3818
__kmem_cache_alloc_bulk mm/slub.c:4895 [inline]
kmem_cache_alloc_bulk_noprof+0x486/0x1330 mm/slub.c:4967
__io_alloc_req_refill+0x84/0x560 io_uring/io_uring.c:969
io_alloc_req io_uring/io_uring.h:406 [inline]
io_submit_sqes+0x172f/0x2f30 io_uring/io_uring.c:2313
__do_sys_io_uring_enter io_uring/io_uring.c:3343 [inline]
__se_sys_io_uring_enter+0x406/0x41c0 io_uring/io_uring.c:3279
__x64_sys_io_uring_enter+0x11f/0x1a0 io_uring/io_uring.c:3279
x64_sys_call+0x2b54/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:427
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 0 UID: 0 PID: 5188 Comm: iou-wrk-5184 Not tainted 6.12.0-rc4-syzkaller-00047-gc2ee9f594da8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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@xxxxxxxxxxxxxxxx.

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