Skip to contentSkip to conversation

CVE-2022-50742: misc: ocxl: fix possible refcount leak in afu_ioctl()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 24, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

misc: ocxl: fix possible refcount leak in afu_ioctl()

eventfd_ctx_put need to be called to put the refcount that gotten by eventfd_ctx_fdget when ocxl_irq_set_handler fails.

The Linux kernel CVE team has assigned CVE-2022-50742 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.2 with commit 060146614643ddc5978c73ffac0329762b4651c9 and fixed in 5.4.220 with commit fc797285c40a9cc441357abb3521d3e51c743f67
	Issue introduced in 5.2 with commit 060146614643ddc5978c73ffac0329762b4651c9 and fixed in 5.10.150 with commit 7ba19a60c74fb0057d4daef2fa2cbfc9522f3ba1
	Issue introduced in 5.2 with commit 060146614643ddc5978c73ffac0329762b4651c9 and fixed in 5.15.75 with commit 11bd8bbdf8f6f5c1145bb158793107a57e3a1f07
	Issue introduced in 5.2 with commit 060146614643ddc5978c73ffac0329762b4651c9 and fixed in 5.19.17 with commit 843433a02e344d30fbb62dfd834c60631baaa527
	Issue introduced in 5.2 with commit 060146614643ddc5978c73ffac0329762b4651c9 and fixed in 6.0.3 with commit 66032c43291672bae8b93184d2806f05be3e16df
	Issue introduced in 5.2 with commit 060146614643ddc5978c73ffac0329762b4651c9 and fixed in 6.1 with commit c3b69ba5114c860d730870c03ab4ee45276e5e35

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2022-50742

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/misc/ocxl/file.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/fc797285c40a9cc441357abb3521d3e51c743f67
	https://git.kernel.org/stable/c/7ba19a60c74fb0057d4daef2fa2cbfc9522f3ba1
	https://git.kernel.org/stable/c/11bd8bbdf8f6f5c1145bb158793107a57e3a1f07
	https://git.kernel.org/stable/c/843433a02e344d30fbb62dfd834c60631baaa527
	https://git.kernel.org/stable/c/66032c43291672bae8b93184d2806f05be3e16df
	https://git.kernel.org/stable/c/c3b69ba5114c860d730870c03ab4ee45276e5e35