{"id":"CVE-2022-50007","summary":"xfrm: fix refcount leak in __xfrm_policy_check()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: fix refcount leak in __xfrm_policy_check()\n\nThe issue happens on an error path in __xfrm_policy_check(). When the\nfetching process of the object `pols[1]` fails, the function simply\nreturns 0, forgetting to decrement the reference count of `pols[0]`,\nwhich is incremented earlier by either xfrm_sk_policy_lookup() or\nxfrm_policy_lookup(). This may result in memory leaks.\n\nFix it by decreasing the reference count of `pols[0]` in that path.","modified":"2026-04-11T12:44:47.682050Z","published":"2025-06-18T11:01:12.447Z","related":["SUSE-SU-2025:03204-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50007.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0769491a8acd3e85ca4c3f65080eac2c824262df"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1305d7d4f35ca6f214a2d23b075aa6a924cff3be"},{"type":"WEB","url":"https://git.kernel.org/stable/c/18e6b6e2555c93f5ca09f2b85ef1fa025c8accea"},{"type":"WEB","url":"https://git.kernel.org/stable/c/26ad2398fe4984f4f6f930bcb3bc9047fa77265b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/63da7a2bbf3f28094920e0b8a17d2571a9bd842d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8f94b933103ee1bda119543369cc18a1be5536db"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d66c052879791313f90c0584420f196a038fb8b8"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50007.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50007"},{"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":"134b0fc544ba062498451611cb6f3e4454221b3d"},{"fixed":"18e6b6e2555c93f5ca09f2b85ef1fa025c8accea"},{"fixed":"8f94b933103ee1bda119543369cc18a1be5536db"},{"fixed":"0769491a8acd3e85ca4c3f65080eac2c824262df"},{"fixed":"63da7a2bbf3f28094920e0b8a17d2571a9bd842d"},{"fixed":"1305d7d4f35ca6f214a2d23b075aa6a924cff3be"},{"fixed":"26ad2398fe4984f4f6f930bcb3bc9047fa77265b"},{"fixed":"d66c052879791313f90c0584420f196a038fb8b8"},{"fixed":"9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50007.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.6.19"},{"fixed":"4.9.327"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.10.0"},{"fixed":"4.14.292"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.15.0"},{"fixed":"4.19.257"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.20.0"},{"fixed":"5.4.212"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.140"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.19.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50007.json"}}],"schema_version":"1.7.5"}