CVE-2022-50007

xfrm: fix refcount leak in __xfrm_policy_check()

MEDIUM
5.5
CVSS Score
Published: June 18, 2025 at 11:01 AM UTC
Updated: June 17, 2026 at 05:22 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%

Description

In the Linux kernel, the following vulnerability has been resolved: xfrm: fix refcount leak in __xfrm_policy_check() The issue happens on an error path in __xfrm_policy_check(). 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 xfrm_sk_policy_lookup() or xfrm_policy_lookup(). This may result in memory leaks. Fix it by decreasing the reference count of `pols[0]` in that path.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.6.19 ≤ v < 4.14.2922.6.19 ≤ v < 4.19.2572.6.19 ≤ v < 4.9.3272.6.19 ≤ v < 5.10.1402.6.19 ≤ v < 5.15.642.6.19 ≤ v < 5.19.62.6.19 ≤ v < 5.4.2122.6.19 ≤ v < 6.02.6.20 ≤ v < 4.9.3274.10 ≤ v < 4.14.2924.15 ≤ v < 4.19.2574.20 ≤ v < 5.4.2125.11 ≤ v < 5.15.645.16 ≤ v < 5.19.65.5 ≤ v < 5.10.140134b0fc544ba062498451611cb6f3e4454221b3d2.6.192.6.19 rc22.6.19 rc32.6.19 rc42.6.19 rc52.6.19 rc66.0 rc16.0 rc2
Vendor states this is fixed in 0769491a8acd3e85ca4c3f65080eac2c824262df (fixed)
Vendor states this is fixed in 1305d7d4f35ca6f214a2d23b075aa6a924cff3be (fixed)
Vendor states this is fixed in 18e6b6e2555c93f5ca09f2b85ef1fa025c8accea (fixed)
Vendor states this is fixed in 26ad2398fe4984f4f6f930bcb3bc9047fa77265b (fixed)
Vendor states this is fixed in 63da7a2bbf3f28094920e0b8a17d2571a9bd842d (fixed)
Vendor states this is fixed in 8f94b933103ee1bda119543369cc18a1be5536db (fixed)
Vendor states this is fixed in 9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe (fixed)
Vendor states this is fixed in d66c052879791313f90c0584420f196a038fb8b8 (fixed)
Vendor states this is fixed in 2.6.19 (unaffected)
Vendor states this is fixed in 4.14.292 (unaffected)
Vendor states this is fixed in 4.19.257 (unaffected)
Vendor states this is fixed in 4.9.327 (unaffected)
Vendor states this is fixed in 5.10.140 (unaffected)
Vendor states this is fixed in 5.15.64 (unaffected)
Vendor states this is fixed in 5.19.6 (unaffected)
Vendor states this is fixed in 5.4.212 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0769491a8acd3e85ca4c3f65080eac2c824262df
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1305d7d4f35ca6f214a2d23b075aa6a924cff3be
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/18e6b6e2555c93f5ca09f2b85ef1fa025c8accea
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/26ad2398fe4984f4f6f930bcb3bc9047fa77265b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/63da7a2bbf3f28094920e0b8a17d2571a9bd842d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8f94b933103ee1bda119543369cc18a1be5536db
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d66c052879791313f90c0584420f196a038fb8b8

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card