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 D83F5145B21 for ; Mon, 29 Jul 2024 15:48: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=1722268139; cv=none; b=t6thIvPlV1VX2jJO8+hv4z0N/bqFBP/KUfqp2H0QJzl6mRduJ0d8MF12Oje/qsp1vfigKY2QTFqxEnsT6qtJB2QA5/LuImkX3tb5XLQmkzD24upgrwFbHwGnyKTuVVhcXzejkLv7CYPC9/v1YtkwB1ANqA07hQNXPqI+0bpXX2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722268139; c=relaxed/simple; bh=imq9iTdQdDCEVAdbbm47LmF1gLhqBw5zDhuMC+w7Z2k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nGAhubrWnCOOrySnfjkwn+8TbX4qFiZu5d1DmmQ64xhp2SRNngYRv5lVdubiIzZFZIaAWeKgyoMSidL3sdjYKMld1l1vRsES5fnmJfxh6sx+MrlwJKBGehLCYoh0Es0KlCTgcWYepBgeq0Ej9WFn15KSxgBo0PE4kJmFbJgcmQo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iq0u0li/; 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="iq0u0li/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E00D3C32786; Mon, 29 Jul 2024 15:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722268139; bh=imq9iTdQdDCEVAdbbm47LmF1gLhqBw5zDhuMC+w7Z2k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=iq0u0li/IBRwGUNBisebWf5RZ3ltxpI7nmwXHZe/pzTeBC9D3ry8YFY+TRSNLD/Qt u+6rjMVB4NGGXDXdGKOBl3jtwi7FJAZIaD/7iA56W0C1Tj/Z4raCLRrCbx45LSXRDq 8KfCUUHEsp3YRryPJhzSK5sf69GAcSZ5Rzv7pawM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-41084: cxl/region: Avoid null pointer dereference in region lookup Date: Mon, 29 Jul 2024 17:48:48 +0200 Message-ID: <2024072951-CVE-2024-41084-c144@gregkh> X-Mailer: git-send-email 2.45.2 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=2722; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=imq9iTdQdDCEVAdbbm47LmF1gLhqBw5zDhuMC+w7Z2k=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnLdz52K5Q3PHL3hiSD4ay1LXliEv6Vl+5W6S0T0tgy/ ZiEPb9uRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyk6QbDXEEmm7xzfFf5sjQe KvGbcD1Kv6TwimG+13+mh6kb7JXXJqoye/82SPfgYUsHAA== 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: cxl/region: Avoid null pointer dereference in region lookup cxl_dpa_to_region() looks up a region based on a memdev and DPA. It wrongly assumes an endpoint found mapping the DPA is also of a fully assembled region. When not true it leads to a null pointer dereference looking up the region name. This appears during testing of region lookup after a failure to assemble a BIOS defined region or if the lookup raced with the assembly of the BIOS defined region. Failure to clean up BIOS defined regions that fail assembly is an issue in itself and a fix to that problem will alleviate some of the impact. It will not alleviate the race condition so let's harden this path. The behavior change is that the kernel oops due to a null pointer dereference is replaced with a dev_dbg() message noting that an endpoint was mapped. Additional comments are added so that future users of this function can more clearly understand what it provides. The Linux kernel CVE team has assigned CVE-2024-41084 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 0a105ab28a4d and fixed in 6.6.37 with commit a9e099e29e92 Issue introduced in 6.4 with commit 0a105ab28a4d and fixed in 6.9.8 with commit b8a40a6dbfb0 Issue introduced in 6.4 with commit 0a105ab28a4d and fixed in 6.10 with commit 285f2a088414 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-41084 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/region.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/a9e099e29e925f8b31cfe53e8a786b9796f8e453 https://git.kernel.org/stable/c/b8a40a6dbfb0150c1081384caa9bbe28ce5d5060 https://git.kernel.org/stable/c/285f2a08841432fc3e498b1cd00cce5216cdf189