# CVE-2022-50042: net: genl: fix error path memory leak in policy dumping

- 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.27%, higher than 19% of CVEs (2026-12-01)
- Published: 2025-06-18T11:01:43.264Z
- Modified: 2026-11-05T20:17:21.253Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

net: genl: fix error path memory leak in policy dumping

If construction of the array of policies fails when recording
non-first policy we need to unwind.

netlink_policy_dump_add_policy() itself also needs fixing as
it currently gives up on error without recording the allocated
pointer in the pstate pointer.

(As written by CVE List.)

## Affected

- Linux Linux: from 50a896cf2d6f34e884a00139d6e6012c9833ace3 before 83411c9f05d5a8b637293b3389eca3d378197c04; from 50a896cf2d6f34e884a00139d6e6012c9833ace3 before b0672895d8be5d19d4b05ac83f807026fc791037; from 50a896cf2d6f34e884a00139d6e6012c9833ace3 before 26b6acd365823e99e46be3b27500f5dc235dda5e; from 50a896cf2d6f34e884a00139d6e6012c9833ace3 before 249801360db3dec4f73768c502192020bfddeacc; 5.10 (not affected: before 5.10; from 5.10.138 up to 5.10.*; from 5.15.63 up to 5.15.*; from 5.19.4 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 5.10 before 5.10.138; from 5.11 before 5.15.63; from 5.16 before 5.19.4; 6.0

## References

- <https://git.kernel.org/stable/c/83411c9f05d5a8b637293b3389eca3d378197c04> (patch)
- <https://git.kernel.org/stable/c/b0672895d8be5d19d4b05ac83f807026fc791037> (patch)
- <https://git.kernel.org/stable/c/26b6acd365823e99e46be3b27500f5dc235dda5e> (patch)
- <https://git.kernel.org/stable/c/249801360db3dec4f73768c502192020bfddeacc> (patch)

## Sources

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

---

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