Skip to contentSkip to conversation

CVE-2022-50119: rpmsg: Fix possible refcount leak in rpmsg_register_device_override()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 18, 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:

rpmsg: Fix possible refcount leak in rpmsg_register_device_override()

rpmsg_register_device_override need to call put_device to free vch when driver_set_override fails.

Fix this by adding a put_device() to the error path.

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

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

	Issue introduced in 5.19 with commit bb17d110cbf270d5247a6e261c5ad50e362d1675 and fixed in 5.19.2 with commit c29335612ff44df979678a38e1f55c62004f421c
	Issue introduced in 5.19 with commit bb17d110cbf270d5247a6e261c5ad50e362d1675 and fixed in 6.0 with commit d7bd416d35121c95fe47330e09a5c04adbc5f928

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-50119

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/rpmsg/rpmsg_core.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/280ae5a028ef5d14ef9277746a3026a30aaebe4f
	https://git.kernel.org/stable/c/c449b28e437d18ae807479c4ac6b69d87b287c79
	https://git.kernel.org/stable/c/01e6885b75e25a2dd0726455ef18ef9ce5e7dc87
	https://git.kernel.org/stable/c/3fdd5b2bb09fc2b5bf3504778f51c89bb48c097f
	https://git.kernel.org/stable/c/d4c8bf5635c4bedaf2470761ced1f502b2d5434e
	https://git.kernel.org/stable/c/c29335612ff44df979678a38e1f55c62004f421c
	https://git.kernel.org/stable/c/d7bd416d35121c95fe47330e09a5c04adbc5f928