CVE-2022-50007

Source
https://cve.org/CVERecord?id=CVE-2022-50007
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50007.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50007
Downstream
Related
Published
2025-06-18T11:01:12.447Z
Modified
2026-04-11T12:44:47.682050Z
Summary
xfrm: fix refcount leak in __xfrm_policy_check()
Details

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

xfrm: fix refcount leak in __xfrmpolicycheck()

The issue happens on an error path in _xfrmpolicycheck(). When the fetching process of the object pols[1] fails, the function simply returns 0, forgetting to decrement the reference count of pols[0], which is incremented earlier by either xfrmskpolicylookup() or xfrmpolicylookup(). This may result in memory leaks.

Fix it by decreasing the reference count of pols[0] in that path.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50007.json"
}
References

Affected packages

Git / 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"

Linux / Kernel

Package

Name
Kernel

Affected 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"