{"id":"CVE-2022-50042","summary":"net: genl: fix error path memory leak in policy dumping","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: genl: fix error path memory leak in policy dumping\n\nIf construction of the array of policies fails when recording\nnon-first policy we need to unwind.\n\nnetlink_policy_dump_add_policy() itself also needs fixing as\nit currently gives up on error without recording the allocated\npointer in the pstate pointer.","modified":"2026-05-18T05:55:18.444417660Z","published":"2025-06-18T11:01:43.264Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50042.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/249801360db3dec4f73768c502192020bfddeacc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/26b6acd365823e99e46be3b27500f5dc235dda5e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/83411c9f05d5a8b637293b3389eca3d378197c04"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b0672895d8be5d19d4b05ac83f807026fc791037"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50042.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50042"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"50a896cf2d6f34e884a00139d6e6012c9833ace3"},{"fixed":"83411c9f05d5a8b637293b3389eca3d378197c04"},{"fixed":"b0672895d8be5d19d4b05ac83f807026fc791037"},{"fixed":"26b6acd365823e99e46be3b27500f5dc235dda5e"},{"fixed":"249801360db3dec4f73768c502192020bfddeacc"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50042.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.10.0"},{"fixed":"5.10.138"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.19.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50042.json"}}],"schema_version":"1.7.5"}