syzbot


KMSAN: uninit-value in io_rw_fail (2)

Status: fixed on 2024/02/14 16:17
Subsystems: io-uring
[Documentation on labels]
Reported-by: syzbot+0198afa90d8c29ef9557@syzkaller.appspotmail.com
Fix commit: 0a535eddbe0d io_uring/rw: ensure io->bytes_done is always initialized
First crash: 103d, last: 103d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [io-uring?] KMSAN: uninit-value in io_rw_fail (2) 2 (3) 2024/02/12 14:06
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in io_rw_fail io-uring C 25 109d 125d 26/26 fixed on 2024/02/02 04:06

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in io_fixup_rw_res io_uring/rw.c:311 [inline]
BUG: KMSAN: uninit-value in io_rw_fail+0x1a7/0x1b0 io_uring/rw.c:1099
 io_fixup_rw_res io_uring/rw.c:311 [inline]
 io_rw_fail+0x1a7/0x1b0 io_uring/rw.c:1099
 io_req_defer_failed+0x217/0x3e0 io_uring/io_uring.c:1065
 io_queue_sqe_fallback+0x1f4/0x260 io_uring/io_uring.c:2100
 io_submit_state_end io_uring/io_uring.c:2345 [inline]
 io_submit_sqes+0x2b85/0x2ff0 io_uring/io_uring.c:2463
 __do_sys_io_uring_enter io_uring/io_uring.c:3712 [inline]
 __se_sys_io_uring_enter+0x40c/0x42d0 io_uring/io_uring.c:3647
 __x64_sys_io_uring_enter+0x11b/0x1a0 io_uring/io_uring.c:3647
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x6d/0x140 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Uninit was created at:
 slab_post_alloc_hook+0x129/0xa70 mm/slab.h:768
 slab_alloc_node mm/slub.c:3478 [inline]
 __kmem_cache_alloc_node+0x5c9/0x970 mm/slub.c:3517
 __do_kmalloc_node mm/slab_common.c:1006 [inline]
 __kmalloc+0x121/0x3c0 mm/slab_common.c:1020
 kmalloc include/linux/slab.h:604 [inline]
 io_alloc_async_data io_uring/io_uring.c:1780 [inline]
 io_req_prep_async+0x384/0x5a0 io_uring/io_uring.c:1801
 io_queue_sqe_fallback+0x95/0x260 io_uring/io_uring.c:2097
 io_submit_state_end io_uring/io_uring.c:2345 [inline]
 io_submit_sqes+0x2b85/0x2ff0 io_uring/io_uring.c:2463
 __do_sys_io_uring_enter io_uring/io_uring.c:3712 [inline]
 __se_sys_io_uring_enter+0x40c/0x42d0 io_uring/io_uring.c:3647
 __x64_sys_io_uring_enter+0x11b/0x1a0 io_uring/io_uring.c:3647
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x6d/0x140 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

CPU: 0 PID: 5401 Comm: syz-executor.4 Not tainted 6.7.0-syzkaller-00562-g9f8413c4a66f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/05 22:01 upstream 9f8413c4a66f 4e988e80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in io_rw_fail
* Struck through repros no longer work on HEAD.