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 C28C21F4E51 for ; Fri, 27 Dec 2024 14:25: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=1735309503; cv=none; b=o9dUiGNXP4WnIPktTO1abvYffMX6qFjPPkKvg9TuiD2jUOYt622wgOozj0Tt7E/gZYH8OHtgwVSvOG4680YPq6HvZnvQIKTYfSwc4Hti2TRBuz6et1CYU2WGZcRfSAQhK4x4p+aBlKoCnchRHGgeDW9EXDnZiEyDKsk/1D4QHRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735309503; c=relaxed/simple; bh=/wMsHzd7oYaRIaolTkTZXrYvDEokxCrn2numIjJshyM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cVlwexeKCd2b/RPQQapArmUANHy9hlnOPSNJn5FBtWjC4DYY7F8r3CWJXtfLKsT0Vo8z2NYOB5IODlWtJSSvJl5zsFP4mBSw5F/iyIo06a3NkeLMRv8riAm9dw7boQQd7rYe3px8He1QqjR58Zzr8mLa6AQU50cGBs3HpwYAfQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i1gS9i+d; 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="i1gS9i+d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 406E8C4CED0; Fri, 27 Dec 2024 14:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735309503; bh=/wMsHzd7oYaRIaolTkTZXrYvDEokxCrn2numIjJshyM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=i1gS9i+d5cECike7uThSvz79znO568nZ/cZY2YIWLNugXOAZBVoq9aylH2XJOOWXs lZUjlCCGWROzjHwiMLyC0S1B+oCKMQHKsiYIbYJ5LfOvuFEir7pfXFOfkWh9M2NBdu r7Idbs/HhNJHjo2LWwt2NYsHyzpFUDAbONDTCY9I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56561: PCI: endpoint: Fix PCI domain ID release in pci_epc_destroy() Date: Fri, 27 Dec 2024 15:23:12 +0100 Message-ID: <2024122713-CVE-2024-56561-a041@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=2388; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/wMsHzd7oYaRIaolTkTZXrYvDEokxCrn2numIjJshyM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5OwI3BnIefPWqwX2VSLlU08wzV1XXB6b+PPmk3yDMR T3mfGZZRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkkjjDgtMrHn5SZJ1deOKy xLbWlauE75V6zGCYKzRB+2Ym86+6Z5/uea5OMZwke4jHBwA= 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: PCI: endpoint: Fix PCI domain ID release in pci_epc_destroy() pci_epc_destroy() invokes pci_bus_release_domain_nr() to release the PCI domain ID, but there are two issues: - 'epc->dev' is passed to pci_bus_release_domain_nr() which was already freed by device_unregister(), leading to a use-after-free issue. - Domain ID corresponds to the EPC device parent, so passing 'epc->dev' is also wrong. Fix these issues by passing 'epc->dev.parent' to pci_bus_release_domain_nr() and also do it before device_unregister(). [mani: reworded subject and description] The Linux kernel CVE team has assigned CVE-2024-56561 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 0328947c50324cf4b2d8b181bf948edb8101f59f and fixed in 6.12.4 with commit c74a1df6c2a2df7dd45c3fc1a5edc29a075dcf22 Issue introduced in 6.12 with commit 0328947c50324cf4b2d8b181bf948edb8101f59f and fixed in 6.13-rc1 with commit 4acc902ed3743edd4ac2d3846604a99d17104359 Issue introduced in 6.11.4 with commit a4934cd7a18d35fc57025f23773f6f19e2b2dbb1 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-56561 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/pci/endpoint/pci-epc-core.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/c74a1df6c2a2df7dd45c3fc1a5edc29a075dcf22 https://git.kernel.org/stable/c/4acc902ed3743edd4ac2d3846604a99d17104359