Subject: CVE-2023-52693: ACPI: video: check for error while searching for backlight device parent

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

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

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

ACPI: video: check for error while searching for backlight device parent

If acpi_get_parent() called in acpi_video_dev_register_backlight()
fails, for example, because acpi_ut_acquire_mutex() fails inside
acpi_get_parent), this can lead to incorrect (uninitialized)
acpi_parent handle being passed to acpi_get_pci_dev() for detecting
the parent pci device.

Check acpi_get_parent() result and set parent device only in case of success.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

The Linux kernel CVE team has assigned CVE-2023-52693 to this issue.

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

	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 4.19.306 with commit 556f02699d33
	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 5.4.268 with commit 1e3a2b9b4039
	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 5.10.209 with commit c4e1a0ef0b47
	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 5.15.148 with commit 3a370502a568
	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 6.1.75 with commit 2124c5bc2294
	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 6.6.14 with commit 39af144b6d01
	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 6.7.2 with commit 72884ce4e104
	Issue introduced in 2.6.39 with commit 9661e92c10a9 and fixed in 6.8 with commit ccd45faf4973

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-2023-52693
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/acpi/acpi_video.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/556f02699d33c1f40b1b31bd25828ce08fa165d8
	https://git.kernel.org/stable/c/1e3a2b9b4039bb4d136dca59fb31e06465e056f3
	https://git.kernel.org/stable/c/c4e1a0ef0b4782854c9b77a333ca912b392bed2f
	https://git.kernel.org/stable/c/3a370502a5681986f9828e43be75ce26c6ab24af
	https://git.kernel.org/stable/c/2124c5bc22948fc4d09a23db4a8acdccc7d21e95
	https://git.kernel.org/stable/c/39af144b6d01d9b40f52e5d773e653957e6c379c
	https://git.kernel.org/stable/c/72884ce4e10417b1233b614bf134da852df0f15f
	https://git.kernel.org/stable/c/ccd45faf4973746c4f30ea41eec864e5cf191099