Subject: CVE-2024-36880: Bluetooth: qca: add missing firmware sanity checks

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

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

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

Bluetooth: qca: add missing firmware sanity checks

Add the missing sanity checks when parsing the firmware files before
downloading them to avoid accessing and corrupting memory beyond the
vmalloced buffer.

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

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

	Issue introduced in 4.3 with commit 83e81961ff7e and fixed in 5.15.159 with commit ed53949cc92e
	Issue introduced in 4.3 with commit 83e81961ff7e and fixed in 6.1.91 with commit 1caceadfb504
	Issue introduced in 4.3 with commit 83e81961ff7e and fixed in 6.6.31 with commit 427281f9498e
	Issue introduced in 4.3 with commit 83e81961ff7e and fixed in 6.8.10 with commit 02f05ed44b71
	Issue introduced in 4.3 with commit 83e81961ff7e and fixed in 6.9 with commit 2e4edfa1e2bd

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-36880
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/bluetooth/btqca.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/ed53949cc92e28aaa3463d246942bda1fbb7f307
	https://git.kernel.org/stable/c/1caceadfb50432dbf6d808796cb6c34ebb6d662c
	https://git.kernel.org/stable/c/427281f9498ed614f9aabc80e46ec077c487da6d
	https://git.kernel.org/stable/c/02f05ed44b71152d5e11d29be28aed91c0489b4e
	https://git.kernel.org/stable/c/2e4edfa1e2bd821a317e7d006517dcf2f3fac68d