Subject: CVE-2024-35856: Bluetooth: btusb: mediatek: Fix double free of skb in coredump

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

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

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

Bluetooth: btusb: mediatek: Fix double free of skb in coredump

hci_devcd_append() would free the skb on error so the caller don't
have to free it again otherwise it would cause the double free of skb.

Reported-by : Dan Carpenter <[email-masked]>

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

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

	Issue introduced in 6.6 with commit 0b7015132878 and fixed in 6.6.30 with commit 80dfef128cb9
	Issue introduced in 6.6 with commit 0b7015132878 and fixed in 6.8.9 with commit e20093c741d8
	Issue introduced in 6.6 with commit 0b7015132878 and fixed in 6.9 with commit 18bdb386a1a3

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-35856
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/btmtk.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/80dfef128cb9f1b1ef67c0fe8c8deb4ea7ad30c1
	https://git.kernel.org/stable/c/e20093c741d8da9f6390dd45d75b779861547035
	https://git.kernel.org/stable/c/18bdb386a1a30e7a3d7732a98e45e69cf6b5710d