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 8DB9A1EF360 for ; Thu, 1 May 2025 14:17:41 +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=1746109061; cv=none; b=IyRj9NIRe/IKNx48EaHahwxK0OiD33WkkqE6Z/yv48zHwmUYitfIpBcbKutvv1joNGWjWqzlfSmdgvPv2puVOMbw3XE/F/NmBbO/e552YnRgswhj3F7eNcHvnAnpiZmkk8k20aG5AMeM+Z1d4w6Xv9FOZiNSG6zwVrYwGC5DECs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746109061; c=relaxed/simple; bh=tqv3nQ7/i2dxaYOBM26wKozxlFVfROwgZoLRAEZFaCU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nAObASQHR+F3QjKrwDX7SspCEIKEKPCDJBO73ljg/XObmnagaAZiI8ZdM+8sx9WngLjsxE/xxg6GsEVY6H3avs/A+CGLLc9Xq3CA68mb2KSZGRJEAWKxiKl/NpIOjsuWYWT3Op8OhxIAORgSWeVyncvDEK5NwCGcwrkZm/E/OQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wvVPkrqO; 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="wvVPkrqO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00444C4CEE3; Thu, 1 May 2025 14:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746109061; bh=tqv3nQ7/i2dxaYOBM26wKozxlFVfROwgZoLRAEZFaCU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wvVPkrqOw5c2EqzpsaPGj9nx37Q4BZiwSaTRtKjPrsNQ/YFOSU+Fnn8J5vTggJlde UiX53HwR5gs5u019WoI+3i0F4L+Sitl6vdiKFFZfFfR9xBFP758rCM/+1bp38jdJtt F873vGDl7ZqJabgOWxQH+hmc3e0YCotJ0ssTq514= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49896: cxl/pmem: Fix cxl_pmem_region and cxl_memdev leak Date: Thu, 1 May 2025 16:11:26 +0200 Message-ID: <2025050100-CVE-2022-49896-2593@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=2407; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pidkRDaiqr5GjXDyOdnsVuHlVsHCvWkg7iVc6Md7g5g=; b=kA0DAAIRMUfUDdst+ykByyZiAGgTgLjIG3vo7PDqVSJrJxqXzQ1a+C7KWKtE37iStT7AnuBjh YhdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmgTgLgACgkQMUfUDdst+ynq4wCgoOVZ skrrYBb8q865eXcHQt1coRcAoI7CpFpJ7SHF0CN+GYQ4cMSPJjuM 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/pmem: Fix cxl_pmem_region and cxl_memdev leak When a cxl_nvdimm object goes through a ->remove() event (device physically removed, nvdimm-bridge disabled, or nvdimm device disabled), then any associated regions must also be disabled. As highlighted by the cxl-create-region.sh test [1], a single device may host multiple regions, but the driver was only tracking one region at a time. This leads to a situation where only the last enabled region per nvdimm device is cleaned up properly. Other regions are leaked, and this also causes cxl_memdev reference leaks. Fix the tracking by allowing cxl_nvdimm objects to track multiple region associations. The Linux kernel CVE team has assigned CVE-2022-49896 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 04ad63f086d1a9649b8b082748cbc7a570ade461 and fixed in 6.0.8 with commit f43b6bfdbab78606735ba81185cf0602b81e40b6 Issue introduced in 6.0 with commit 04ad63f086d1a9649b8b082748cbc7a570ade461 and fixed in 6.1 with commit 4d07ae22e79ebc2d7528bbc69daa53b86981cb3a 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-2022-49896 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/pmem.c drivers/cxl/cxl.h drivers/cxl/pmem.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/f43b6bfdbab78606735ba81185cf0602b81e40b6 https://git.kernel.org/stable/c/4d07ae22e79ebc2d7528bbc69daa53b86981cb3a