{"id":"CVE-2022-50337","summary":"ocxl: fix pci device refcount leak when calling get_function_0()","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().","modified":"2026-08-12T03:51:19.145913504Z","published":"2025-09-15T14:49:52.919Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50337.json","cna_assigner":"Linux"},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"87db7579ebd5ded337056eb765542eb2608f16e3"},{"fixed":"a40e1b0a922a53fa925ea8b296e3de30a31ed028"},{"fixed":"37a13b274e4513c757e50c002ddcbf4bc89adbb2"},{"fixed":"9a1b3148975b71fdc194e62612478346bbe618cd"},{"fixed":"40ff4c2335a98f0ee96b099bfd70b8e6644f321f"},{"fixed":"27158c72678b39ee01cc01de1aba6b51c71abe2f"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50337.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.9.0"},{"fixed":"5.10.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50337.json"}}],"schema_version":"1.9.0"}