{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "87db7579ebd5ded337056eb765542eb2608f16e3"
            },
            {
              "fixed": "a40e1b0a922a53fa925ea8b296e3de30a31ed028"
            },
            {
              "fixed": "37a13b274e4513c757e50c002ddcbf4bc89adbb2"
            },
            {
              "fixed": "9a1b3148975b71fdc194e62612478346bbe618cd"
            },
            {
              "fixed": "40ff4c2335a98f0ee96b099bfd70b8e6644f321f"
            },
            {
              "fixed": "27158c72678b39ee01cc01de1aba6b51c71abe2f"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50337.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nocxl: fix pci device refcount leak when calling get_function_0()\n\nget_function_0() calls pci_get_domain_bus_and_slot(), as comment\nsays, it returns a pci device with refcount increment, so after\nusing it, pci_dev_put() needs be called.\n\nGet the device reference when get_function_0() is not called, so\npci_dev_put() can be called in the error path and callers\nunconditionally. And add comment above get_dvsec_vendor0() to tell\ncallers to call pci_dev_put().",
  "id": "CVE-2022-50337",
  "modified": "2026-04-01T23:09:32.973337840Z",
  "published": "2025-09-15T14:49:52.919Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/27158c72678b39ee01cc01de1aba6b51c71abe2f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/37a13b274e4513c757e50c002ddcbf4bc89adbb2"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/40ff4c2335a98f0ee96b099bfd70b8e6644f321f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9a1b3148975b71fdc194e62612478346bbe618cd"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a40e1b0a922a53fa925ea8b296e3de30a31ed028"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50337.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-50337"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.7.3",
  "summary": "ocxl: fix pci device refcount leak when calling get_function_0()"
}