CVE-2022-50042

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

State
Published
Severity
Not scored
Published
Jun 18, 2025
Updated
May 11, 2026
Reserved
Jun 18, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 50a896cf2d6f34e884a00139d6e6012c9833ace3 to before 83411c9f05d5a8b637293b3389eca3d378197c04Affected
  • 50a896cf2d6f34e884a00139d6e6012c9833ace3 to before b0672895d8be5d19d4b05ac83f807026fc791037Affected
  • 50a896cf2d6f34e884a00139d6e6012c9833ace3 to before 26b6acd365823e99e46be3b27500f5dc235dda5eAffected
  • 50a896cf2d6f34e884a00139d6e6012c9833ace3 to before 249801360db3dec4f73768c502192020bfddeaccAffected
LinuxLinux
  • 5.10Affected
  • before 5.10Not affected
  • 5.10.138 through 5.10.*Not affected
  • 5.15.63 through 5.15.*Not affected
  • 5.19.4 through 5.19.*Not affected
  • 6.0 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.