Subject: CVE-2022-48952: PCI: mt7621: Add sentinel to quirks table

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

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

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

PCI: mt7621: Add sentinel to quirks table

Current driver is missing a sentinel in the struct soc_device_attribute
array, which causes an oops when assessed by the
soc_device_match(mt7621_pcie_quirks_match) call.

This was only exposed once the CONFIG_SOC_MT7621 mt7621 soc_dev_attr
was fixed to register the SOC as a device, in:

commit 7c18b64bba3b ("mips: ralink: mt7621: do not use kzalloc too early")

Fix it by adding the required sentinel.

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

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

	Issue introduced in 5.5 with commit b483b4e4d3f6 and fixed in 5.15.86 with commit 3e9c395ef2d5
	Issue introduced in 5.5 with commit b483b4e4d3f6 and fixed in 6.0.15 with commit cb7323ece786
	Issue introduced in 5.5 with commit b483b4e4d3f6 and fixed in 6.1.1 with commit a4997bae1b5b
	Issue introduced in 5.5 with commit b483b4e4d3f6 and fixed in 6.2 with commit 19098934f910
	Issue introduced in 5.4.17 with commit 21fd877300b0

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-48952
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/pcie-mt7621.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/3e9c395ef2d52975b2c2894d2da09d6db2958bc6
	https://git.kernel.org/stable/c/cb7323ece786f243f6d6ccf2e5b2b27b736bdc04
	https://git.kernel.org/stable/c/a4997bae1b5b012c8a6e2643e26578a7bc2cae36
	https://git.kernel.org/stable/c/19098934f910b4d47cb30251dd39ffa57bef9523