Skip to contentSkip to conversation

CVE-2026-99439: media: rc: Ensure registered is cleared in error path

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 19

lore
Share & tools
lore
#0 lore raw

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

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

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

media: rc: Ensure registered is cleared in error path

If rc_register_device() fails, ensure that registered is not set to true. If lirc_register() succeeded, then userspace could have an open file descriptor open. This leads to a use-after-free.

lirc_unregister() must be called with registered = false, else there is a possibility that an fd is open and polling, which would never return POLLERR unless registered is false.

Note that registered must be changed under dev->lock, many functions read registered under lock (e.g. lirc_ioctl).

The Linux kernel CVE team has assigned CVE-2026-99439 to this issue.

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

	Issue introduced in 6.12.93 with commit 75977f5f5c4974c72bbedefbf09ad33ebbaa36f1 and fixed in 6.12.117 with commit 4c94661218f2accf309372cac59ebe9e21853349
	Issue introduced in 6.18.35 with commit e250b672d40a9e0d97a8895cbb301248bea0fce6 and fixed in 6.18.61 with commit 63644a8b70dab7e67a8a6f563b7df9647324a41f
	Issue introduced in 7.1 with commit dccc0c3ddf8f16071736f98a7d6dd46a2d43e037 and fixed in 7.3.2 with commit 7a6e8c9726dfd1cb284708f7b179a6bc9bcd6e0e
	Issue introduced in 7.1 with commit dccc0c3ddf8f16071736f98a7d6dd46a2d43e037 and fixed in 7.4-rc1 with commit 37efd09ba2c62e46e3a3a793025c186f8cd1a417
	Issue introduced in 6.6.143 with commit a7becb58f6b8a3a3efe5d3acfd52e2c107de6772

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-2026-99439

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/media/rc/rc-main.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/4c94661218f2accf309372cac59ebe9e21853349
	https://git.kernel.org/stable/c/63644a8b70dab7e67a8a6f563b7df9647324a41f
	https://git.kernel.org/stable/c/7a6e8c9726dfd1cb284708f7b179a6bc9bcd6e0e
	https://git.kernel.org/stable/c/37efd09ba2c62e46e3a3a793025c186f8cd1a417