Subject: CVE-2024-27074: media: go7007: fix a memleak in go7007_load_encoder

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

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

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

media: go7007: fix a memleak in go7007_load_encoder

In go7007_load_encoder, bounce(i.e. go->boot_fw), is allocated without
a deallocation thereafter. After the following call chain:

saa7134_go7007_init
  |-> go7007_boot_encoder
        |-> go7007_load_encoder
  |-> kfree(go)

go is freed and thus bounce is leaked.

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

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

	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 4.19.311 with commit 7f11dd3d165b
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 5.4.273 with commit 291cda0b805f
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 5.10.214 with commit b49fe84c6cef
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 5.15.153 with commit 790fa2c04dfb
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 6.1.83 with commit e04d15c8bb3e
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 6.6.23 with commit f31c1cc37411
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 6.7.11 with commit d43988a23c32
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 6.8.2 with commit 7405a0d44427
	Issue introduced in 3.10 with commit 95ef39403f89 and fixed in 6.9 with commit b9b683844b01

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-27074
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/media/usb/go7007/go7007-driver.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/7f11dd3d165b178e738fe73dfeea513e383bedb5
	https://git.kernel.org/stable/c/291cda0b805fc0d6e90d201710311630c8667159
	https://git.kernel.org/stable/c/b49fe84c6cefcc1c2336d793b53442e716c95073
	https://git.kernel.org/stable/c/790fa2c04dfb9f095ec372bf17909424d6e864b3
	https://git.kernel.org/stable/c/e04d15c8bb3e111dd69f98894acd92d63e87aac3
	https://git.kernel.org/stable/c/f31c1cc37411f5f7bcb266133f9a7e1b4bdf2975
	https://git.kernel.org/stable/c/d43988a23c32588ccd0c74219637afb96cd78661
	https://git.kernel.org/stable/c/7405a0d4442792988e9ae834e7d84f9d163731a4
	https://git.kernel.org/stable/c/b9b683844b01d171a72b9c0419a2d760d946ee12