Subject: CVE-2024-26735: ipv6: sr: fix possible use-after-free and null-ptr-deref

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

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

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

ipv6: sr: fix possible use-after-free and null-ptr-deref

The pernet operations structure for the subsystem must be registered
before registering the generic netlink family.

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

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

	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 4.19.308 with commit 953f42934533
	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 5.4.270 with commit 82831e3ff76e
	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 5.10.211 with commit 65c38f23d10f
	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 5.15.150 with commit 91b020aaa1e5
	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 6.1.80 with commit 8391b9b651cf
	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 6.6.19 with commit 9e02973dbc6a
	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 6.7.7 with commit 02b08db594e8
	Issue introduced in 4.10 with commit 915d7e5e5930 and fixed in 6.8 with commit 5559cea2d5aa

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-26735
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/ipv6/seg6.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/953f42934533c151f440cd32390044d2396b87aa
	https://git.kernel.org/stable/c/82831e3ff76ef09fb184eb93b79a3eb3fb284f1d
	https://git.kernel.org/stable/c/65c38f23d10ff79feea1e5d50b76dc7af383c1e6
	https://git.kernel.org/stable/c/91b020aaa1e59bfb669d34c968e3db3d5416bcee
	https://git.kernel.org/stable/c/8391b9b651cfdf80ab0f1dc4a489f9d67386e197
	https://git.kernel.org/stable/c/9e02973dbc6a91e40aa4f5d87b8c47446fbfce44
	https://git.kernel.org/stable/c/02b08db594e8218cfbc0e4680d4331b457968a9b
	https://git.kernel.org/stable/c/5559cea2d5aa3018a5f00dd2aca3427ba09b386b