]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tls: reject the combination of TLS and sockmap
authorJakub Kicinski <kuba@kernel.org>
Sun, 14 Jun 2026 01:40:56 +0000 (18:40 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Jun 2026 15:55:40 +0000 (08:55 -0700)
commit460e6486617c17dd19abe8f3fc67d9a6fa25f8ca
tree868b7482c65b0d36731a099c5d2e8d9f2e585ca1
parente1f544466b2c6c67e70e42118a7fb39cee0b374a
tls: reject the combination of TLS and sockmap

TLS and sockmap (BPF psock) integration hides a lot of latent bugs.
Bugs which may be more or less relevant for real users but they
are definitely exploitable.

We could not find anyone actively using this integration so let's
reject this config. Adding a TLS socket to a sockmap was already
rejected by sk_psock_init() through the inet_csk_has_ulp() check.
We need to reject the attempts to configure the TLS keys (rather
than adding the ULP itself) because checking prior to the ULP
installation is tricky without risking a race with sockmap getting
added in parallel (sockmap does not hold the socket lock).

This patch is a minimal rejection of the feature. Subsequent patch
in the series will do a light dead code removal. Full cleanup would
require a major rewrite of the Tx path, we don't need skmsg any more.

Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20260614014102.461064-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/tls/tls_main.c