xfrm: fix refcount leak in __xfrm_policy_check()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 134b0fc544ba062498451611cb6f3e4454221b3d · < 26ad2398fe4984f4f6f930bcb3bc9047fa77265b| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s __xfrm_policy_check() can leak a reference when fetching pols[1] fails after acquiring a reference to pols[0]. This may cause memory leaks. The input does not describe how an attacker could trigger the error or specify network, authentication, or user-interaction requirements.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.