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 F0CD11F4727 for ; Fri, 27 Dec 2024 14:58:53 +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=1735311534; cv=none; b=YngXEL4ue8N1SWO9mq/sZcPbRGWT8PSWkuOAumFRmgFYVQ7Z/eXOYhZNkuthqDU/jiwQb3NiTZrr8n4+HfEQCJ8IndE/7gKfOsnl6C+XHWFt9j4q1eglyexCRokBdbhpciibpuKLx+KQw+0UdYpHKjnSDHVIoZctgDfQ4M5iaVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311534; c=relaxed/simple; bh=ABBLwMlVOqRnb67vAcNhlKOghfpuj2QYeXBY+CQKIKQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mnmv4jJoA+/LgwZfVHW2wndCSfqehTvdVDP3P5Rj2Re7rigDTLXY4MgqNOnTezxj/PL8hR4tTR5oi2tsyzg66jgvffvPSq/wlBsdUaKngDuR2AYNseiJGlEh/i3RNQbE/g7RSCiDkLtKV3lT91BIRLSQoiCjPjM9zrmDhArkMeE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hvP3XoYz; 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="hvP3XoYz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EB9DC4CED0; Fri, 27 Dec 2024 14:58:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735311533; bh=ABBLwMlVOqRnb67vAcNhlKOghfpuj2QYeXBY+CQKIKQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hvP3XoYz4q+pONm+hC2IPwFSir+c637GrNfgpFLADQHdvyvEGXAXEJb5Z0dHyZwWA +J3CPgJ7LCktLfyQFU4I7xA7VW8YKUZApmXOGHiafUUPrC7QJA7By80QfEYN1yKY8i AO+3kebFK4vDSLlinPUFMn5/HQg5jLoTTGzd6NAY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56584: io_uring/tctx: work around xa_store() allocation error issue Date: Fri, 27 Dec 2024 15:50:51 +0100 Message-ID: <2024122757-CVE-2024-56584-dad9@gregkh> X-Mailer: git-send-email 2.47.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=2540; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ABBLwMlVOqRnb67vAcNhlKOghfpuj2QYeXBY+CQKIKQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5+y7WOMxu27byVLVxe45jg8pttQOGfw5/vfVshsO3H 88mvreS64hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJhIswLLhUlHBCPSmhYfqM Qy4cpxbPYgrRm82wYN2Z3xPKpzUxvlt5rmtGbkh3Wo+0BQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: io_uring/tctx: work around xa_store() allocation error issue syzbot triggered the following WARN_ON: WARNING: CPU: 0 PID: 16 at io_uring/tctx.c:51 __io_uring_free+0xfa/0x140 io_uring/tctx.c:51 which is the WARN_ON_ONCE(!xa_empty(&tctx->xa)); sanity check in __io_uring_free() when a io_uring_task is going through its final put. The syzbot test case includes injecting memory allocation failures, and it very much looks like xa_store() can fail one of its memory allocations and end up with ->head being non-NULL even though no entries exist in the xarray. Until this issue gets sorted out, work around it by attempting to iterate entries in our xarray, and WARN_ON_ONCE() if one is found. The Linux kernel CVE team has assigned CVE-2024-56584 to this issue. Affected and fixed versions =========================== Fixed in 6.1.120 with commit 94ad56f61b873ffeebcc620d451eacfbdf9d40f0 Fixed in 6.6.66 with commit 42882b583095dcf747da6e3af1daeff40e27033e Fixed in 6.12.5 with commit d5b2ddf1f90c7248eff9630b95895c8950f2f36d Fixed in 6.13-rc1 with commit 7eb75ce7527129d7f1fee6951566af409a37a1c4 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-2024-56584 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: io_uring/tctx.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/94ad56f61b873ffeebcc620d451eacfbdf9d40f0 https://git.kernel.org/stable/c/42882b583095dcf747da6e3af1daeff40e27033e https://git.kernel.org/stable/c/d5b2ddf1f90c7248eff9630b95895c8950f2f36d https://git.kernel.org/stable/c/7eb75ce7527129d7f1fee6951566af409a37a1c4