Re: [syzbot] [io-uring?] KMSAN: uninit-value in io_sendrecv_fail

syzbot
2024-03-16T16:29:02Z

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
KMSAN: uninit-value in io_sendrecv_fail

=====================================================
BUG: KMSAN: uninit-value in io_sendrecv_fail+0x91/0x1e0 io_uring/net.c:1334
io_sendrecv_fail+0x91/0x1e0 io_uring/net.c:1334
io_req_defer_failed+0x456/0x6d0 io_uring/io_uring.c:1050
io_queue_sqe_fallback+0x1e3/0x280 io_uring/io_uring.c:2126
io_submit_fail_init+0x4e1/0x790 io_uring/io_uring.c:2310
io_submit_sqes+0x1a60/0x3030 io_uring/io_uring.c:2486
__do_sys_io_uring_enter io_uring/io_uring.c:3662 [inline]
__se_sys_io_uring_enter+0x409/0x4390 io_uring/io_uring.c:3597
__x64_sys_io_uring_enter+0x11b/0x1a0 io_uring/io_uring.c:3597
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+0x63/0x6b

Uninit was created at:
__alloc_pages+0x9a6/0xe00 mm/page_alloc.c:4592
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page mm/slub.c:2190 [inline]
allocate_slab mm/slub.c:2354 [inline]
new_slab+0x2d7/0x1400 mm/slub.c:2407
___slab_alloc+0x16b5/0x3970 mm/slub.c:3540
__kmem_cache_alloc_bulk mm/slub.c:4574 [inline]
kmem_cache_alloc_bulk+0x52a/0x1440 mm/slub.c:4648
__io_alloc_req_refill+0x248/0x780 io_uring/io_uring.c:1101
io_alloc_req io_uring/io_uring.h:405 [inline]
io_submit_sqes+0xaa2/0x3030 io_uring/io_uring.c:2475
__do_sys_io_uring_enter io_uring/io_uring.c:3662 [inline]
__se_sys_io_uring_enter+0x409/0x4390 io_uring/io_uring.c:3597
__x64_sys_io_uring_enter+0x11b/0x1a0 io_uring/io_uring.c:3597
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+0x63/0x6b

CPU: 0 PID: 5478 Comm: syz-executor.0 Not tainted 6.8.0-syzkaller-00721-g3fdefe13e0a9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
=====================================================

Tested on:

commit: 3fdefe13 io_uring: explicitly flag early request failure
git tree: git://git.kernel.dk/linux.git io_uring-6.9
console output: https://syzkaller.appspot.com/x/log.txt?x=15c58006180000
kernel config: https://syzkaller.appspot.com/x/.config?x=a271c5dca0ff14df
dashboard link: https://syzkaller.appspot.com/bug?extid=f8e9a371388aa62ecab4
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.