CVE-2022-50007 (GCVE-0-2022-50007)
Vulnerability from cvelistv5
Published
2025-06-18 11:01
Modified
2025-06-18 11:01
Severity ?
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.
Impacted products
Vendor Product Version
Linux Linux Version: 134b0fc544ba062498451611cb6f3e4454221b3d
Version: 134b0fc544ba062498451611cb6f3e4454221b3d
Version: 134b0fc544ba062498451611cb6f3e4454221b3d
Version: 134b0fc544ba062498451611cb6f3e4454221b3d
Version: 134b0fc544ba062498451611cb6f3e4454221b3d
Version: 134b0fc544ba062498451611cb6f3e4454221b3d
Version: 134b0fc544ba062498451611cb6f3e4454221b3d
Version: 134b0fc544ba062498451611cb6f3e4454221b3d
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",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50007\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T11:15:28.617\",\"lastModified\":\"2025-06-18T13:46:52.973\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"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.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: xfrm: se corrige una fuga de referencias en __xfrm_policy_check(). El problema ocurre en una ruta de error en __xfrm_policy_check(). Cuando falla la obtenci\u00f3n del objeto `pols[1]`, la funci\u00f3n simplemente devuelve 0, olvidando decrementar el recuento de referencias de `pols[0]`, que se incrementa previamente mediante xfrm_sk_policy_lookup() o xfrm_policy_lookup(). Esto puede provocar fugas de memoria. Para solucionarlo, reduzca el recuento de referencias de `pols[0]` en esa ruta.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0769491a8acd3e85ca4c3f65080eac2c824262df\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1305d7d4f35ca6f214a2d23b075aa6a924cff3be\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/18e6b6e2555c93f5ca09f2b85ef1fa025c8accea\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/26ad2398fe4984f4f6f930bcb3bc9047fa77265b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/63da7a2bbf3f28094920e0b8a17d2571a9bd842d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8f94b933103ee1bda119543369cc18a1be5536db\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9c9cb23e00ddf45679b21b4dacc11d1ae7961ebe\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d66c052879791313f90c0584420f196a038fb8b8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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 seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…