Subject: CVE-2024-38563: wifi: mt76: mt7996: fix potential memory leakage when reading chip temperature

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

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

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

wifi: mt76: mt7996: fix potential memory leakage when reading chip temperature

Without this commit, reading chip temperature will cause memory leakage.

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

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

	Issue introduced in 6.8 with commit 6879b2e94172 and fixed in 6.8.12 with commit 84e81f9b4818
	Issue introduced in 6.8 with commit 6879b2e94172 and fixed in 6.9.3 with commit ef46dbb93fc9
	Issue introduced in 6.8 with commit 6879b2e94172 and fixed in 6.10 with commit 474b9412f33b

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-38563
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/net/wireless/mediatek/mt76/mt7996/mcu.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/84e81f9b4818b8efe89beb12a246d5d510631939
	https://git.kernel.org/stable/c/ef46dbb93fc9279fb7de883aac22abffe214e6b5
	https://git.kernel.org/stable/c/474b9412f33be87076b40a49756662594598a85e