# CVE-2022-50160: mtd: maps: Fix refcount leak in ap_flash_init

- 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:16.447Z
- Modified: 2026-06-17T05:22:52.873Z
- Assigned by: Linux

## Description

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

mtd: maps: Fix refcount leak in ap_flash_init

of_find_matching_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

(As written by CVE List.)

## Affected

- Linux Linux: from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before 995fb2874bb5696357846a91e59181c600e6aac8; from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before d10855876a6f47add6ff621cef25cc0171dac162; from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before 80b1465b2ae81ebb59bbe62bcb7a7f7d4e9ece6f; from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before 941ef6997f9db704fe4fd62fc01e420fdd5048b2; from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before d5730780e9ea84e5476752a47c749036c6a74af5; from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before a74322d4b897ddc268b340c4a397f6066c2f945d; from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before babd7b0124650ab71a6487e38588b8659b3aa2dc; from b0afd44bc192ff4c0e90a5fc1724350bcfc32b33 before 77087a04c8fd554134bddcb8a9ff87b21f357926; 4.7 (not affected: before 4.7; from 4.14.291 up to 4.14.*; from 4.19.256 up to 4.19.*; from 5.4.211 up to 5.4.*; 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.7 before 4.14.291; from 4.15 before 4.19.256; from 4.20 before 5.4.211; from 5.5 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/995fb2874bb5696357846a91e59181c600e6aac8> (patch)
- <https://git.kernel.org/stable/c/d10855876a6f47add6ff621cef25cc0171dac162> (patch)
- <https://git.kernel.org/stable/c/80b1465b2ae81ebb59bbe62bcb7a7f7d4e9ece6f> (patch)
- <https://git.kernel.org/stable/c/941ef6997f9db704fe4fd62fc01e420fdd5048b2> (patch)
- <https://git.kernel.org/stable/c/d5730780e9ea84e5476752a47c749036c6a74af5> (patch)
- <https://git.kernel.org/stable/c/a74322d4b897ddc268b340c4a397f6066c2f945d> (patch)
- <https://git.kernel.org/stable/c/babd7b0124650ab71a6487e38588b8659b3aa2dc> (patch)
- <https://git.kernel.org/stable/c/77087a04c8fd554134bddcb8a9ff87b21f357926> (patch)

## Sources

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

---

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