CVE-2022-49219

vfio/pci: fix memory leak during D3hot to D0 transition

No CVSS score yet EPSS 0.27%

Published 26 Feb 2025 Updated 5 Nov 2026 CNA: Linux

Check your servers for CVE-2022-49219

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-49219 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

vfio/pci: fix memory leak during D3hot to D0 transition

If 'vfio_pci_core_device::needs_pm_restore' is set (PCI device does not have No_Soft_Reset bit set in its PMCSR config register), then the current PCI state will be saved locally in 'vfio_pci_core_device::pm_save' during D0->D3hot transition and same will be restored back during D3hot->D0 transition. For saving the PCI state locally, pci_store_saved_state() is being used and the pci_load_and_free_saved_state() will free the allocated memory.

But for reset related IOCTLs, vfio driver calls PCI reset-related API's which will internally change the PCI power state back to D0. So, when the guest resumes, then it will get the current state as D0 and it will skip the call to vfio_pci_set_power_state() for changing the power state to D0 explicitly. In this case, the memory pointed by 'pm_save' will never be freed. In a malicious sequence, the state changing to D3hot followed by VFIO_DEVICE_RESET/VFIO_DEVICE_PCI_HOT_RESET can be run in a loop and it can cause an OOM situation.

This patch frees the earlier allocated memory first before overwriting 'pm_save' to prevent the mentioned memory leak.

Exploitation

EPSS 0.27%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 20.5% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 51ef3a004b1eb6241e56b3aa8495769a092a4dc2, before da426ad86027b849b877d4628b277ffbbd2f5325
affected from 51ef3a004b1eb6241e56b3aa8495769a092a4dc2, before 4319f17fb8264ba39352b611dfa913a4d8c1d1a0
affected from 51ef3a004b1eb6241e56b3aa8495769a092a4dc2, before 26ddd196e9eb264da8e1bdc4df8a94d62581c8b5
affected from 51ef3a004b1eb6241e56b3aa8495769a092a4dc2, before c8a1f8bd586ee31020614b8d48b702ece3e2ae44
affected from 51ef3a004b1eb6241e56b3aa8495769a092a4dc2, before eadf88ecf6ac7d6a9f47a76c6055d9a1987a8991
Other versions: unaffected
Linux
affected 5.1
unaffected before 5.1
unaffected from 5.10.237 up to and including 5.10.*
unaffected from 5.15.33 up to and including 5.15.*
unaffected from 5.16.19 up to and including 5.16.*
unaffected from 5.17.2 up to and including 5.17.*
unaffected 5.18 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-49219 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-49219

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-49219
trivy image --scanners vuln IMAGE | grep CVE-2022-49219

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-49219 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.