OpenCloudOS-Kernel/drivers/nvdimm
Philip Chen 97a094893c virtio_pmem: Check device status before requesting flush
Upstream commit: e25fbcd97cf52c3c9824d44b5c56c19673c3dd50

CVE ID: CVE-2024-50184 [1]

If a pmem device is in a bad status, the driver side could wait for
host ack forever in virtio_pmem_flush(), causing the system to hang.

So add a status check in the beginning of virtio_pmem_flush() to return
early if the device is not activated.

Link: https://tapd.woa.com/tapd_fe/69992352/bug/detail/1069992352134342997 [1]

Signed-off-by: Philip Chen <philipchen@chromium.org>
Message-Id: <20240826215313.2673566-1-philipchen@chromium.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-12-31 17:48:03 +08:00
..
Kconfig libnvdimm: Enable unit test infrastructure compile checks 2019-09-07 04:28:05 -03:00
Makefile libnvdimm: Enable unit test infrastructure compile checks 2019-09-07 04:28:05 -03:00
badrange.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
blk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
btt.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
btt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
btt_devs.c driver-core, libnvdimm: Let device subsystems add local lockdep coverage 2019-07-18 16:23:27 -07:00
bus.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
claim.c libnvdimm: nd_region flush callback support 2019-07-05 15:19:10 -07:00
core.c driver-core, libnvdimm: Let device subsystems add local lockdep coverage 2019-07-18 16:23:27 -07:00
dax_devs.c libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields 2019-07-18 17:08:07 -07:00
dimm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
dimm_devs.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
e820.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
label.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
label.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 295 2019-06-05 17:36:38 +02:00
namespace_devs.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
nd-core.h libnvdimm/region: Rewrite _probe_success() to _advance_seeds() 2019-09-05 16:11:14 -07:00
nd.h libnvdimm/dax: Pick the right alignment default when creating dax devices 2019-09-24 10:23:41 -07:00
nd_virtio.c virtio_pmem: Check device status before requesting flush 2024-12-31 17:48:03 +08:00
of_pmem.c libnvdimm/of_pmem: Provide a unique name for bus provider 2019-08-13 20:31:57 -07:00
pfn.h libnvdimm/pfn_dev: Add page size and struct page size to pfn superblock 2019-09-05 16:11:14 -07:00
pfn_devs.c libnvdimm fixes v5.4-rc1 2019-09-29 10:33:41 -07:00
pmem.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
pmem.h libnvdimm, pmem: Restore page attributes when clearing errors 2018-08-20 09:22:45 -07:00
region.c libnvdimm/region: Initialize bad block for volatile namespaces 2019-09-24 10:27:51 -07:00
region_devs.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
security.c tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
virtio_pmem.c virtio-pmem: Add virtio pmem driver 2019-07-05 15:19:10 -07:00
virtio_pmem.h virtio-pmem: Add virtio pmem driver 2019-07-05 15:19:10 -07:00