# CVE-2022-50146: PCI: dwc: Deallocate EPC memory on dw_pcie_ep_init() errors

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-06-18T11:03:07.031Z
- Modified: 2026-06-17T05:22:51.150Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

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

PCI: dwc: Deallocate EPC memory on dw_pcie_ep_init() errors

If dw_pcie_ep_init() fails to perform any action after the EPC memory is
initialized and the MSI memory region is allocated, the latter parts won't
be undone thus causing a memory leak.  Add a cleanup-on-error path to fix
these leaks.

[bhelgaas: commit log]

(As written by CVE List.)

## Affected

- Linux Linux: from 2fd0c9d966cc11bb5f73556dd788d12f501d8755 before e7599a5974d4c64eaae8009c3f2e47b9e3223e07; from 2fd0c9d966cc11bb5f73556dd788d12f501d8755 before b03a8f1264ea8c363bec9ef6e37b467f27cb04ea; from 2fd0c9d966cc11bb5f73556dd788d12f501d8755 before 2d546db5c80c45cac3ccd929550244fd58f4ff58; from 2fd0c9d966cc11bb5f73556dd788d12f501d8755 before 3b453f5d06d1f1d6b20a75ea51dc7b53ae78f479; from 2fd0c9d966cc11bb5f73556dd788d12f501d8755 before 8161e9626b50892eaedbd8070ecb1586ecedb109; 4.16 (not affected: before 4.16; from 5.10.137 up to 5.10.*; from 5.15.61 up to 5.15.*; from 5.18.18 up to 5.18.*; from 5.19.2 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 4.16 before 5.10.137; from 5.11 before 5.15.61; from 5.16 before 5.18.18; from 5.19 before 5.19.2

## References

- <https://git.kernel.org/stable/c/e7599a5974d4c64eaae8009c3f2e47b9e3223e07> (patch)
- <https://git.kernel.org/stable/c/b03a8f1264ea8c363bec9ef6e37b467f27cb04ea> (patch)
- <https://git.kernel.org/stable/c/2d546db5c80c45cac3ccd929550244fd58f4ff58> (patch)
- <https://git.kernel.org/stable/c/3b453f5d06d1f1d6b20a75ea51dc7b53ae78f479> (patch)
- <https://git.kernel.org/stable/c/8161e9626b50892eaedbd8070ecb1586ecedb109> (patch)

## Sources

- CVE List: [CVE-2022-50146](https://www.cve.org/CVERecord?id=CVE-2022-50146), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-50146](https://nvd.nist.gov/vuln/detail/CVE-2022-50146), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-50146 · Whole record: https://cve.day/CVE-2022-50146.json · Rebuilt by cve.day 2026-11-25T22:58:21.075Z
