Subject: CVE-2024-42281: bpf: Fix a segment issue when downgrading gso_size

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

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

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

bpf: Fix a segment issue when downgrading gso_size

Linearize the skb when downgrading gso_size because it may trigger a
BUG_ON() later when the skb is segmented as described in [1,2].

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

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

	Issue introduced in 4.13 with commit 2be7e212d541 and fixed in 5.4.282 with commit a689f5eb13a9
	Issue introduced in 4.13 with commit 2be7e212d541 and fixed in 5.10.224 with commit dda518dea60d
	Issue introduced in 4.13 with commit 2be7e212d541 and fixed in 5.15.165 with commit f6bb8c90cab9
	Issue introduced in 4.13 with commit 2be7e212d541 and fixed in 6.1.103 with commit 11ec79f5c7f7
	Issue introduced in 4.13 with commit 2be7e212d541 and fixed in 6.6.44 with commit c3496314c53e
	Issue introduced in 4.13 with commit 2be7e212d541 and fixed in 6.10.3 with commit ec4eea14d75f
	Issue introduced in 4.13 with commit 2be7e212d541 and fixed in 6.11 with commit fa5ef655615a

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-42281
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:
	net/core/filter.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/a689f5eb13a90f892a088865478b3cd39f53d5dc
	https://git.kernel.org/stable/c/dda518dea60d556a2d171c0122ca7d9fdb7d473a
	https://git.kernel.org/stable/c/f6bb8c90cab97a3e03f8d30e3069efe6a742e0be
	https://git.kernel.org/stable/c/11ec79f5c7f74261874744039bc1551023edd6b2
	https://git.kernel.org/stable/c/c3496314c53e7e82ddb544c825defc3e8c0e45cf
	https://git.kernel.org/stable/c/ec4eea14d75f7b0491194dd413f540dd19b8c733
	https://git.kernel.org/stable/c/fa5ef655615a01533035c6139248c5b33aa27028