Skip to contentSkip to conversation

CVE-2026-68162: sctp: avoid auth_enable sysctl UAF during netns teardown

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 10

lore
Share & tools
lore
#0 lore raw

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

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

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

sctp: avoid auth_enable sysctl UAF during netns teardown

proc_sctp_do_auth() updates the SCTP control socket after changing net.sctp.auth_enable. The handler gets the per-net SCTP state from ctl->data, so an already opened sysctl file can still target a network namespace while that namespace is being torn down.

SCTP previously registered its per-net sysctls from sctp_defaults_init(), while the control socket is created later from sctp_ctrlsock_init(). This exposed a window during initialization where auth_enable was writable before net->sctp.ctl_sock existed, and a teardown window where auth_enable stayed writable after inet_ctl_sock_destroy() had released the control socket.

Move the per-net SCTP sysctl registration into sctp_ctrlsock_init() after sctp_ctl_sock_init() succeeds, and unregister the sysctl table before destroying the control socket in sctp_ctrlsock_exit(). If sysctl registration fails after the control socket was created, destroy the control socket in the same init path.

Make sctp_sysctl_net_unregister() tolerate a missing header and clear the saved pointer so init-error and exit paths can safely share the unregister helper.

The Linux kernel CVE team has assigned CVE-2026-68162 to this issue.

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

	Issue introduced in 5.4.290 with commit 10c869a52f266e40f548cc3c565d14930a5edafc and fixed in 5.4.292 with commit 19573dcddb8819fd68d6cd1f916c1c99c3fa4ff4
	Issue introduced in 6.6.72 with commit 7ec30c54f339c640aa7e49d7e9f7bbed6bd42bf6 and fixed in 6.6.151 with commit 66700c0719675e0e118ae83b2d7168dacd69dd3d
	Issue introduced in 6.12.10 with commit c184bc621e3cef03ac9ba81a50dda2dae6a21d36 and fixed in 6.12.101 with commit 626bda8cfe43dff19a9833ff6ba055a817b5455c
	Issue introduced in 6.13 with commit 15649fd5415eda664ef35780c2013adeb5d9c695 and fixed in 6.18.42 with commit be6aae9d1b91c603adb35872d37d40e83daf8758
	Issue introduced in 6.13 with commit 15649fd5415eda664ef35780c2013adeb5d9c695 and fixed in 7.1.6 with commit a50e73488e0bbdd262b3be3c9a1d8dd078382381
	Issue introduced in 6.13 with commit 15649fd5415eda664ef35780c2013adeb5d9c695 and fixed in 7.2-rc5 with commit f8d5e7846025f4ab15a461235f8ebae9094a361a
	Issue introduced in 5.10.234 with commit dc583e7e5f8515ca489c0df28e4362a70eade382
	Issue introduced in 5.15.177 with commit bd2a2939423566c654545fa3e96a656662a0af9e
	Issue introduced in 6.1.125 with commit 1b67030d39f2b00f94ac1f0af11ba6657589e4d3

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-2026-68162

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/sctp/protocol.c
net/sctp/sysctl.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/19573dcddb8819fd68d6cd1f916c1c99c3fa4ff4
	https://git.kernel.org/stable/c/66700c0719675e0e118ae83b2d7168dacd69dd3d
	https://git.kernel.org/stable/c/626bda8cfe43dff19a9833ff6ba055a817b5455c
	https://git.kernel.org/stable/c/be6aae9d1b91c603adb35872d37d40e83daf8758
	https://git.kernel.org/stable/c/a50e73488e0bbdd262b3be3c9a1d8dd078382381
	https://git.kernel.org/stable/c/f8d5e7846025f4ab15a461235f8ebae9094a361a