CVE-2022-50007 (GCVE-0-2022-50007)

Vulnerability from cvelistv5 – Published: 2025-06-18 11:01 – Updated: 2025-06-18 11:01
VLAI?
Title
xfrm: fix refcount leak in __xfrm_policy_check()
Summary
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.
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < 18e6b6e2555c93f5ca09f2b85ef1fa025c8accea (git)
Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < 8f94b933103ee1bda119543369cc18a1be5536db (git)
Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < 0769491a8acd3e85ca4c3f65080eac2c824262df (git)
Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < 63da7a2bbf3f28094920e0b8a17d2571a9bd842d (git)
Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < 1305d7d4f35ca6f214a2d23b075aa6a924cff3be (git)
Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < 26ad2398fe4984f4f6f930bcb3bc9047fa77265b (git)
Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < d66c052879791313f90c0584420f196a038fb8b8 (git)
Affected: 134b0fc544ba062498451611cb6f3e4454221b3d , < 9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe (git)
Create a notification for this product.
    Linux Linux Affected: 2.6.19
Unaffected: 0 , < 2.6.19 (semver)
Unaffected: 4.9.327 , ≤ 4.9.* (semver)
Unaffected: 4.14.292 , ≤ 4.14.* (semver)
Unaffected: 4.19.257 , ≤ 4.19.* (semver)
Unaffected: 5.4.212 , ≤ 5.4.* (semver)
Unaffected: 5.10.140 , ≤ 5.10.* (semver)
Unaffected: 5.15.64 , ≤ 5.15.* (semver)
Unaffected: 5.19.6 , ≤ 5.19.* (semver)
Unaffected: 6.0 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/xfrm/xfrm_policy.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "18e6b6e2555c93f5ca09f2b85ef1fa025c8accea",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            },
            {
              "lessThan": "8f94b933103ee1bda119543369cc18a1be5536db",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            },
            {
              "lessThan": "0769491a8acd3e85ca4c3f65080eac2c824262df",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            },
            {
              "lessThan": "63da7a2bbf3f28094920e0b8a17d2571a9bd842d",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            },
            {
              "lessThan": "1305d7d4f35ca6f214a2d23b075aa6a924cff3be",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            },
            {
              "lessThan": "26ad2398fe4984f4f6f930bcb3bc9047fa77265b",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            },
            {
              "lessThan": "d66c052879791313f90c0584420f196a038fb8b8",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            },
            {
              "lessThan": "9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe",
              "status": "affected",
              "version": "134b0fc544ba062498451611cb6f3e4454221b3d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/xfrm/xfrm_policy.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.19"
            },
            {
              "lessThan": "2.6.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.9.*",
              "status": "unaffected",
              "version": "4.9.327",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.292",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.257",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.212",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.140",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.64",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.9.327",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.292",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.257",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.212",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.140",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.64",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.6",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "2.6.19",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-18T11:01:12.447Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/18e6b6e2555c93f5ca09f2b85ef1fa025c8accea"
        },
        {
          "url": "https://git.kernel.org/stable/c/8f94b933103ee1bda119543369cc18a1be5536db"
        },
        {
          "url": "https://git.kernel.org/stable/c/0769491a8acd3e85ca4c3f65080eac2c824262df"
        },
        {
          "url": "https://git.kernel.org/stable/c/63da7a2bbf3f28094920e0b8a17d2571a9bd842d"
        },
        {
          "url": "https://git.kernel.org/stable/c/1305d7d4f35ca6f214a2d23b075aa6a924cff3be"
        },
        {
          "url": "https://git.kernel.org/stable/c/26ad2398fe4984f4f6f930bcb3bc9047fa77265b"
        },
        {
          "url": "https://git.kernel.org/stable/c/d66c052879791313f90c0584420f196a038fb8b8"
        },
        {
          "url": "https://git.kernel.org/stable/c/9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe"
        }
      ],
      "title": "xfrm: fix refcount leak in __xfrm_policy_check()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50007",
    "datePublished": "2025-06-18T11:01:12.447Z",
    "dateReserved": "2025-06-18T10:57:27.388Z",
    "dateUpdated": "2025-06-18T11:01:12.447Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…