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 420B625B665 for ; Fri, 2 May 2025 16:01:03 +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=1746201663; cv=none; b=UpVkZ4bnLJCUGvst08B1szQZE4BiEXsQ9SmdxnrOpmUTXFo6u6OsRVyLtq2IoZEpgvIpTimu+gjjnPkSzfoABYXGkVRfbD3GtGJ2RzrAw2B8hUJnlN/26g/bwS5GSe/XAiqjuI75XGJh5PT8oAU/vfrvtpWVkLski2MKwlJEDmc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746201663; c=relaxed/simple; bh=d+OXxfP0+QkgNfErlw+7pINaJCg/6pWCOmRA5EHihVE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Kv4RGXUeiuL32bLxZQVVj74uhJSA8pbzSFqGnBz7N0gUphsLUBl6vEnahCdObBPVn7JSsieDsoXI6jDnYMdAjGvr2uwjDS3HKZ/GdhYpmE8bF7b5kPP9PBBgf4Rr1foHRhTwxjUBsoG1soQwxnAkVGkyTNY0kfd8OGWo3YgDV8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S+ma3XKS; 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="S+ma3XKS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF5CFC4CEE4; Fri, 2 May 2025 16:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746201663; bh=d+OXxfP0+QkgNfErlw+7pINaJCg/6pWCOmRA5EHihVE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=S+ma3XKS61uqSDEm8OZtkV/Y2cpIxmK3JvCV8Xy74nZ+EmnqRMhzmWE8A4hDiA+sT AdgDrMEg18ewcK/qNe+Z1lmo+AVV7WqViYUVNOmScb+/Z/jZRTP7UQzvAIiK2hbjYR c8yPBzJtVQmlCiNisPxgWCWBzSieOknHDCCbybBk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53111: loop: Fix use-after-free issues Date: Fri, 2 May 2025 17:56:16 +0200 Message-ID: <2025050227-CVE-2023-53111-2257@gregkh> X-Mailer: git-send-email 2.49.0 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=2857; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DdWg3pQVtpvk/OOhUY/KHySzJNM30IpwAmo+DRevyhg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkir96zv3rqsu/wOa4P7enfegXk9f+8MQ7U2nJ12oHlR 09x3/fd0hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT0brOsGDiktd6nPsC7/kW ZNb4hW5u/3eA9w7DghP+fV1//7GxzG2+z+Yh/EFQv3n2fAA= 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: loop: Fix use-after-free issues do_req_filebacked() calls blk_mq_complete_request() synchronously or asynchronously when using asynchronous I/O unless memory allocation fails. Hence, modify loop_handle_cmd() such that it does not dereference 'cmd' nor 'rq' after do_req_filebacked() finished unless we are sure that the request has not yet been completed. This patch fixes the following kernel crash: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000054 Call trace: css_put.42938+0x1c/0x1ac loop_process_work+0xc8c/0xfd4 loop_rootcg_workfn+0x24/0x34 process_one_work+0x244/0x558 worker_thread+0x400/0x8fc kthread+0x16c/0x1e0 ret_from_fork+0x10/0x20 The Linux kernel CVE team has assigned CVE-2023-53111 to this issue. Affected and fixed versions =========================== Issue introduced in 4.4 with commit bc07c10a3603a5ab3ef01ba42b3d41f9ac63d1b6 and fixed in 5.15.104 with commit 407badf73ec9fb0d5744bf2ca1745c1818aa222f Issue introduced in 4.4 with commit bc07c10a3603a5ab3ef01ba42b3d41f9ac63d1b6 and fixed in 6.1.21 with commit e3fda704903f6d1fc351412f1bc6620333959ada Issue introduced in 4.4 with commit bc07c10a3603a5ab3ef01ba42b3d41f9ac63d1b6 and fixed in 6.2.8 with commit 6917395c4667cfb607ed8bf1826205a59414657c Issue introduced in 4.4 with commit bc07c10a3603a5ab3ef01ba42b3d41f9ac63d1b6 and fixed in 6.3 with commit 9b0cb770f5d7b1ff40bea7ca385438ee94570eec 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-2023-53111 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: drivers/block/loop.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/407badf73ec9fb0d5744bf2ca1745c1818aa222f https://git.kernel.org/stable/c/e3fda704903f6d1fc351412f1bc6620333959ada https://git.kernel.org/stable/c/6917395c4667cfb607ed8bf1826205a59414657c https://git.kernel.org/stable/c/9b0cb770f5d7b1ff40bea7ca385438ee94570eec