CVE-2026-64494: iio: light: gp2ap002: fix runtime PM leak on read error

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:51:51 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072551-CVE-2026-64494-f2cb@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

iio: light: gp2ap002: fix runtime PM leak on read error

gp2ap002_read_raw() calls pm_runtime_get_sync() before reading the
lux value, but if gp2ap002_get_lux() fails, it returns directly. This
skips the pm_runtime_put_autosuspend() call at the "out" label,
permanently leaking a runtime PM reference and preventing the device
from autosuspending.

Replace the direct return with a "goto out" to ensure the reference
is properly dropped on the error path.

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


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

	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 5.10.261 with commit 62e0d74821a02f0e0c5c79b99ae64dc83a9a90f5
	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 5.15.212 with commit 7110201c6b21455240c63388f30113f3baafacfc
	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 6.1.178 with commit 2593f0c6ea37df168975694a3b17e7086f11453e
	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 6.6.145 with commit f350883989ced96d6da7f582f9a6f9c6ffc94e34
	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 6.12.96 with commit 29137052c4485c74bc2d1b0717f69ca4de14274f
	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 6.18.39 with commit 0c655d067ac69ee24e2e9d706c54179ea58a43db
	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 7.1.4 with commit 2ebaea7f3089decb01a8294d89d7e0cf288146c4
	Issue introduced in 5.8 with commit f6dbf83c17cb223ceabd7c42d441414f3e0e8a86 and fixed in 7.2-rc3 with commit 38b72267b7e22768a1f26d9935de4e1752a1dc85
	Issue introduced in 5.7.6 with commit f3e84bf3f86bb3b7bd50666bb8ef7a203a656ca3

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-64494
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/iio/light/gp2ap002.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/62e0d74821a02f0e0c5c79b99ae64dc83a9a90f5
	https://git.kernel.org/stable/c/7110201c6b21455240c63388f30113f3baafacfc
	https://git.kernel.org/stable/c/2593f0c6ea37df168975694a3b17e7086f11453e
	https://git.kernel.org/stable/c/f350883989ced96d6da7f582f9a6f9c6ffc94e34
	https://git.kernel.org/stable/c/29137052c4485c74bc2d1b0717f69ca4de14274f
	https://git.kernel.org/stable/c/0c655d067ac69ee24e2e9d706c54179ea58a43db
	https://git.kernel.org/stable/c/2ebaea7f3089decb01a8294d89d7e0cf288146c4
	https://git.kernel.org/stable/c/38b72267b7e22768a1f26d9935de4e1752a1dc85