Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2022-50337

MEDIUM 5.5EPSS 8%

ocxl: fix pci device refcount leak when calling get_function_0()

Mitigation

  • Upgrade Linux to 27158c72678b39ee01cc01de1aba6b51c71abe2f or later.

Who should check

  • Anyone running Linux >= 87db7579ebd5ded337056eb765542eb2608f16e3, < a40e1b0a922a53fa925ea8b296e3de30a31ed028; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 37a13b274e4513c757e50c002ddcbf4bc89adbb2; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 9a1b3148975b71fdc194e62612478346bbe618cd; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 40ff4c2335a98f0ee96b099bfd70b8e6644f321f; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 27158c72678b39ee01cc01de1aba6b51c71abe2f
  • Anyone running Linux 5.9

Vulnerability facts

Affected
Linux >= 87db7579ebd5ded337056eb765542eb2608f16e3, < a40e1b0a922a53fa925ea8b296e3de30a31ed028; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 37a13b274e4513c757e50c002ddcbf4bc89adbb2; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 9a1b3148975b71fdc194e62612478346bbe618cd; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 40ff4c2335a98f0ee96b099bfd70b8e6644f321f; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 27158c72678b39ee01cc01de1aba6b51c71abe2f; Linux 5.9
Fixed in
Linux 37a13b274e4513c757e50c002ddcbf4bc89adbb2, Linux 9a1b3148975b71fdc194e62612478346bbe618cd, Linux 40ff4c2335a98f0ee96b099bfd70b8e6644f321f, Linux 27158c72678b39ee01cc01de1aba6b51c71abe2f
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: None
  • Availability impact: High
EPSS
0.23% chance of exploitation in 30 days (percentile 8, 2026-11-26)
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: ocxl: fix pci device refcount leak when calling get_function_0() get_function_0() calls pci_get_domain_bus_and_slot(), as comment says, it returns a pci device with refcount increment, so after using it, pci_dev_put() needs be called. Get the device reference when get_function_0() is not called, so pci_dev_put() can be called in the error path and callers unconditionally. And add comment above get_dvsec_vendor0() to tell callers to call pci_dev_put().

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 87db7579ebd5ded337056eb765542eb2608f16e3, < a40e1b0a922a53fa925ea8b296e3de30a31ed028; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 37a13b274e4513c757e50c002ddcbf4bc89adbb2; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 9a1b3148975b71fdc194e62612478346bbe618cd; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 40ff4c2335a98f0ee96b099bfd70b8e6644f321f; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 27158c72678b39ee01cc01de1aba6b51c71abe2f—cvelist
Linux5.9—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2022-50337. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50337.md
Affected: Linux >= 87db7579ebd5ded337056eb765542eb2608f16e3, < a40e1b0a922a53fa925ea8b296e3de30a31ed028; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 37a13b274e4513c757e50c002ddcbf4bc89adbb2; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 9a1b3148975b71fdc194e62612478346bbe618cd; >= 87db7579ebd5ded337056eb…
Fixed in: Linux 37a13b274e4513c757e50c002ddcbf4bc89adbb2, Linux 9a1b3148975b71fdc194e62612478346bbe618cd, Linux 40ff4c2335a98f0ee96b099bfd70b8e6644f321f, Linux 27158c72678b39ee01cc01de1aba6b51c71abe2f

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2022-50337 being exploited?

There is no confirmed exploitation: CVE-2022-50337 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2022-50337?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2022-50337?

Linux >= 87db7579ebd5ded337056eb765542eb2608f16e3, < a40e1b0a922a53fa925ea8b296e3de30a31ed028; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 37a13b274e4513c757e50c002ddcbf4bc89adbb2; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 9a1b3148975b71fdc194e62612478346bbe618cd; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 40ff4c2335a98f0ee96b099bfd70b8e6644f321f; >= 87db7579ebd5ded337056eb765542eb2608f16e3, < 27158c72678b39ee01cc01de1aba6b51c71abe2f; Linux 5.9.

Is there a fix for CVE-2022-50337?

Yes. Fixed in Linux 37a13b274e4513c757e50c002ddcbf4bc89adbb2, Linux 9a1b3148975b71fdc194e62612478346bbe618cd, Linux 40ff4c2335a98f0ee96b099bfd70b8e6644f321f, Linux 27158c72678b39ee01cc01de1aba6b51c71abe2f. Upgrade Linux to 27158c72678b39ee01cc01de1aba6b51c71abe2f or later.

How do I check if I'm affected by CVE-2022-50337?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors