From: Jakub Kicinski <kuba@kernel.org>
To: Jakub Sitnicki <jakub@cloudflare.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
andrew+netdev@lunn.ch, horms@kernel.org, bpf@vger.kernel.org,
john.fastabend@gmail.com, sd@queasysnail.net
Subject: Re: [PATCH net-next 1/5] tls: reject the combination of TLS and sockmap
Date: Mon, 15 Jun 2026 11:20:10 -0700 [thread overview]
Message-ID: <20260615112010.3f8e0efb@kernel.org> (raw)
In-Reply-To: <87bjddc4xm.fsf@cloudflare.com>
On Sun, 14 Jun 2026 21:12:05 +0200 Jakub Sitnicki wrote:
> On Sun, Jun 14, 2026 at 10:09 AM +02, Paolo Abeni wrote:
> > On 6/14/26 3:40 AM, Jakub Kicinski wrote:
> >> 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).
> >
> > Aren't both tls_ctx_create() and sk_psock_init() under (write) the
> > callback lock? Isn't that enough to avoid races?
>
> +1, but we would have to tweak inet_csk_has_ulp() to check for
> icsk_ulp_data in addition to icsk_ulp_ops. Only icsk_ulp_data is set
> under sk_callback_lock.
>
> espintcp faces the same race...
Right, some deeper restructuring is needed for that. Also - I'm aware
of the race that Sashiko points out but we need to draw the line
somewhere if we want to hit the current merge window.
IOW I decided to keep it simple and focus on removing TLS+sockmap
integration, races in ULP vs sockmap init is a separate can of warms.
next prev parent reply other threads:[~2026-06-15 18:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-14 1:40 [PATCH net-next 0/5] tls: reject the combination of TLS and sockmap Jakub Kicinski
2026-06-14 1:40 ` [PATCH net-next 1/5] " Jakub Kicinski
2026-06-14 8:09 ` Paolo Abeni
2026-06-14 19:12 ` Jakub Sitnicki
2026-06-15 18:20 ` Jakub Kicinski [this message]
2026-06-15 1:41 ` sashiko-bot
2026-06-15 18:45 ` Jakub Sitnicki
2026-06-15 22:00 ` Sabrina Dubroca
2026-06-14 1:40 ` [PATCH net-next 2/5] tls: remove dead sockmap (psock) handling from the SW path Jakub Kicinski
2026-06-15 14:55 ` Jakub Sitnicki
2026-06-15 22:20 ` Sabrina Dubroca
2026-06-14 1:40 ` [PATCH net-next 3/5] selftests/bpf: remove sockmap + ktls tests Jakub Kicinski
2026-06-14 1:40 ` [PATCH net-next 4/5] selftests/bpf: drop the unused kTLS program from test_sockmap Jakub Kicinski
2026-06-14 1:41 ` [PATCH net-next 5/5] selftests/bpf: test that TLS crypto is rejected on a sockmap socket Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260615112010.3f8e0efb@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.