Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E8B42EE60D for ; Fri, 25 Jul 2025 15:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753457345; cv=none; b=M1WulTrGS0bHo+C1zKPhj3Jr8Wm30wJ25dhDnGiU0Nk9UrGapA+LwqbAH/6pdlnf6bf/i9WJMX9XG+oN95LDD6J4AoOMfMwzdUvHSYrj3q8WQxPcb/Hu7/1sOxUOgtULhL2PljhhFtD1P9bfDgmXFmF7rXaWhONF0kAm2Q/7E8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753457345; c=relaxed/simple; bh=nEOD1IVgvNn9pNd3hsUHlYHNfP5ERMZA8P340EW2Hlg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=M2jz9ZcCwwaa/ANe/W55DRLVDk5jWokcgp+jhYftuaGrfB7rkZ4uPMuiBQCTp3z5LtlV9Vc+Kk9aFJHUWmHEqgJLRePuwZwcKTWxLwMnlghPJ6vlu/80zw70RfjXNrmOOmt0DounP8k9GfTHlJWQb7L9HS66JZqMKVUWVuAo0Kc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uGkhobBw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uGkhobBw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C45DC4CEE7; Fri, 25 Jul 2025 15:29:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753457345; bh=nEOD1IVgvNn9pNd3hsUHlYHNfP5ERMZA8P340EW2Hlg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=uGkhobBwwCiMsccmTUti0ifyoPgatVgNcZpRvezeK52E2IZW3TXnwfuUVePqky2CY alhHOLchObQZZViEiBfj4fVI8qBIm52BLHEyav4xrmcO7V0laD9WlncgT4GZ5aGc7w +z5g/ZaHnkCmJfHmiD5uUwfp83ZQJChLqfls2nwE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38453: io_uring/msg_ring: ensure io_kiocb freeing is deferred for RCU Date: Fri, 25 Jul 2025 17:28:15 +0200 Message-ID: <2025072505-CVE-2025-38453-69b1@gregkh> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3613; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=V1efdk21h2Bf31iMfLBucafLxGls/HcykM+NrTlNqX4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNi1qXBXw8v3vpqTnlhSV/1huIZh3d9epDkcjyyG+GE 1Wer/4d3xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATecTAMM9M+4Wgz8GLfeuX xCyePWfGpJv/FLQZ5vBeMQlNZk6RdYoOzmc4K/jWSLzuKwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: io_uring/msg_ring: ensure io_kiocb freeing is deferred for RCU syzbot reports that defer/local task_work adding via msg_ring can hit a request that has been freed: CPU: 1 UID: 0 PID: 19356 Comm: iou-wrk-19354 Not tainted 6.16.0-rc4-syzkaller-00108-g17bbde2e1716 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 io_req_local_work_add io_uring/io_uring.c:1184 [inline] __io_req_task_work_add+0x589/0x950 io_uring/io_uring.c:1252 io_msg_remote_post io_uring/msg_ring.c:103 [inline] io_msg_data_remote io_uring/msg_ring.c:133 [inline] __io_msg_ring_data+0x820/0xaa0 io_uring/msg_ring.c:151 io_msg_ring_data io_uring/msg_ring.c:173 [inline] io_msg_ring+0x134/0xa00 io_uring/msg_ring.c:314 __io_issue_sqe+0x17e/0x4b0 io_uring/io_uring.c:1739 io_issue_sqe+0x165/0xfd0 io_uring/io_uring.c:1762 io_wq_submit_work+0x6e9/0xb90 io_uring/io_uring.c:1874 io_worker_handle_work+0x7cd/0x1180 io_uring/io-wq.c:642 io_wq_worker+0x42f/0xeb0 io_uring/io-wq.c:696 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 which is supposed to be safe with how requests are allocated. But msg ring requests alloc and free on their own, and hence must defer freeing to a sane time. Add an rcu_head and use kfree_rcu() in both spots where requests are freed. Only the one in io_msg_tw_complete() is strictly required as it has been visible on the other ring, but use it consistently in the other spot as well. This should not cause any other issues outside of KASAN rightfully complaining about it. The Linux kernel CVE team has assigned CVE-2025-38453 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 0617bb500bfabf8447062f1e1edde92ed2b638f1 and fixed in 6.15.7 with commit e5b3432f4a6b418b8bd8fc91f38efbf17a77167a Issue introduced in 6.11 with commit 0617bb500bfabf8447062f1e1edde92ed2b638f1 and fixed in 6.16-rc6 with commit fc582cd26e888b0652bc1494f252329453fd3b23 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-38453 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: include/linux/io_uring_types.h io_uring/msg_ring.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/e5b3432f4a6b418b8bd8fc91f38efbf17a77167a https://git.kernel.org/stable/c/fc582cd26e888b0652bc1494f252329453fd3b23