Subject: CVE-2024-47756: PCI: keystone: Fix if-statement expression in ks_pcie_quirk()

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

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

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

PCI: keystone: Fix if-statement expression in ks_pcie_quirk()

This code accidentally uses && where || was intended.  It potentially
results in a NULL dereference.

Thus, fix the if-statement expression to use the correct condition.

[kwilczynski: commit log]

The Linux kernel CVE team has assigned CVE-2024-47756 to this issue.

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

	Issue introduced in 5.10.226 with commit ebbdbbc580c1 and fixed in 5.10.227 with commit c289903b7a21
	Issue introduced in 5.15.167 with commit 135843c351c0 and fixed in 5.15.168 with commit dc5aeba07395
	Issue introduced in 6.1.110 with commit af218c803fe2 and fixed in 6.1.113 with commit 23838bef2adb
	Issue introduced in 6.6.51 with commit 576d0fb6f8d4 and fixed in 6.6.54 with commit e85ab507882d
	Issue introduced in 6.10.10 with commit dd47051c76c8 and fixed in 6.10.13 with commit 72210e52e19a
	Issue introduced in 6.11 with commit 86f271f22bbb and fixed in 6.11.2 with commit 2171c5cb2fbc
	Issue introduced in 6.11 with commit 86f271f22bbb and fixed in 6.12-rc1 with commit 6188a1c762eb
	Issue introduced in 5.4.284 with commit cfb006e185f6

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-2024-47756
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/pci/controller/dwc/pci-keystone.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/c289903b7a216df5ea6e1850ddf1b958eea9921d
	https://git.kernel.org/stable/c/dc5aeba07395c8dfa29bb878c8ce4d5180427221
	https://git.kernel.org/stable/c/23838bef2adb714ec37b2d6141dccf4a3a70bdef
	https://git.kernel.org/stable/c/e85ab507882db165c10a858d7f685a0a38f0312e
	https://git.kernel.org/stable/c/72210e52e19a27f615e0b5273d2bf012d0dc318d
	https://git.kernel.org/stable/c/2171c5cb2fbc3e03af7e8116cd58736c09328655
	https://git.kernel.org/stable/c/6188a1c762eb9bbd444f47696eda77a5eae6207a