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 6CFB62D5426 for ; Wed, 9 Jul 2025 10:43:59 +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=1752057839; cv=none; b=nk58g2bIPvqaYg1TxxVTAnnhVtZhn6KpE8Z2I8SqtO0ET9G/mRQfVad3DtWBGVlJpTnr4Kt1dfV6RRw8i1C3CGQckNthIQyQ+tLzpC+xw7Z1TUkiwk22iAzC+MzeXnc71mFXYOL4tjiMa+r0QRhD6vVnNYtZ48+vrkmHsVvXDMM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752057839; c=relaxed/simple; bh=6m7Wj5a9S2xUwn2WQ75HaWZsYo/tP7mKmhNV98ZCRvc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pw2IpXfP3jsOiaYMkyMo8CHWSxrut5mB0npr9QrggjVR7l3wZpHO1pTULdllr6o5UGvd96dAUU3YROtX75rbyvVFgwk5N1nTpc+pdj3Z8KpLCctLuLvnMEXNbJ79v+wyzp1Dz6l4nDjAuTaHDr8LnIqupyPTL4XLtciRgL0tdzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ro2hZdH8; 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="ro2hZdH8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96524C4CEEF; Wed, 9 Jul 2025 10:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752057839; bh=6m7Wj5a9S2xUwn2WQ75HaWZsYo/tP7mKmhNV98ZCRvc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ro2hZdH8LTTW5uE6MJyCauOiBNVwFaFyTuqqUH/0acZYLzsjZlYNaeMbbrx0HnsKm XyQGW/fqW8sJfuL56BT9yxKesxgF4uwzJjc4+2AV2KEhz5XwtKehTN3+OnmWQvG3Mb seQtBRswsO6nRZO94fU9l721JQ9/10iQltrReXFA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38252: cxl/ras: Fix CPER handler device confusion Date: Wed, 9 Jul 2025 12:42:44 +0200 Message-ID: <2025070935-CVE-2025-38252-41d6@gregkh> X-Mailer: git-send-email 2.50.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=2480; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Vc9KtDQj+uF84Jp2nyE8hBUlMEMuw/eHod+/0evqluM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl57rN/qIRa3zNw3bwqJk28SnfSxWK253/Evz/0bZvlZ j3faodARywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykOIVhftKmX/5ZK9qvfq+s ZJj4ZMJL+/3bHBjmu+ffWS7DvPj1/8mv9k3bEv7s1/5KcQA= 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: cxl/ras: Fix CPER handler device confusion By inspection, cxl_cper_handle_prot_err() is making a series of fragile assumptions that can lead to crashes: 1/ It assumes that endpoints identified in the record are a CXL-type-3 device, nothing guarantees that. 2/ It assumes that the device is bound to the cxl_pci driver, nothing guarantees that. 3/ Minor, it holds the device lock over the switch-port tracing for no reason as the trace is 100% generated from data in the record. Correct those by checking that the PCIe endpoint parents a cxl_memdev before assuming the format of the driver data, and move the lock to where it is required. Consequently this also makes the implementation ready for CXL accelerators that are not bound to cxl_pci. The Linux kernel CVE team has assigned CVE-2025-38252 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 36f257e3b0ba904f5a4e7fa8dafaa60e88cdd28c and fixed in 6.15.5 with commit 4bcb8dd36e9e3fad6c22862ac5b6993df838309b Issue introduced in 6.15 with commit 36f257e3b0ba904f5a4e7fa8dafaa60e88cdd28c and fixed in 6.16-rc4 with commit 3c70ec71abdaf4e4fa48cd8fdfbbd864d78235a8 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-38252 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/cxl/core/ras.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/4bcb8dd36e9e3fad6c22862ac5b6993df838309b https://git.kernel.org/stable/c/3c70ec71abdaf4e4fa48cd8fdfbbd864d78235a8