[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025050100-CVE-2022-49896-2593@gregkh>
Date: Thu, 1 May 2025 16:11:26 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-49896: cxl/pmem: Fix cxl_pmem_region and cxl_memdev leak
From: Greg Kroah-Hartman <gregkh@...nel.org>
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
Powered by blists - more mailing lists