Subject: CVE-2024-35858: net: bcmasp: fix memory leak when bringing down interface

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

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

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

net: bcmasp: fix memory leak when bringing down interface

When bringing down the TX rings we flush the rings but forget to
reclaimed the flushed packets. This leads to a memory leak since we
do not free the dma mapped buffers. This also leads to tx control
block corruption when bringing down the interface for power
management.

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

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

	Issue introduced in 6.6 with commit 490cb412007d and fixed in 6.6.30 with commit 09040baf8779
	Issue introduced in 6.6 with commit 490cb412007d and fixed in 6.8.9 with commit 2389ad199016
	Issue introduced in 6.6 with commit 490cb412007d and fixed in 6.9 with commit 9f898fc2c31f

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-35858
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/ethernet/broadcom/asp2/bcmasp_intf.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/09040baf8779ad880e0e0d0ea10e57aa929ef3ab
	https://git.kernel.org/stable/c/2389ad1990163d29cba5480d693b4c2e31cc545c
	https://git.kernel.org/stable/c/9f898fc2c31fbf0ac5ecd289f528a716464cb005