linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] net/tls: add support for the record size limit extension
@ 2025-07-29  2:41 Wilfred Mallawa
  2025-07-29  2:41 ` [RFC 1/4] net/handshake: get negotiated tls record size limit Wilfred Mallawa
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Wilfred Mallawa @ 2025-07-29  2:41 UTC (permalink / raw)
  To: alistair.francis, dlemoal, chuck.lever, davem, edumazet, kuba,
	pabeni, horms, donald.hunter, corbet, kbusch, axboe, hch, sagi,
	kch, borisp, john.fastabend, jlayton, neil, okorniev, Dai.Ngo,
	tom, trondmy, anna, kernel-tls-handshake, netdev
  Cc: linux-kernel, linux-doc, linux-nvme, linux-nfs, Wilfred Mallawa

From: Wilfred Mallawa <wilfred.mallawa@wdc.com>

During a tls handshake, an endpoint may specify a maximum record size limit. As
specified by [1]. which allows peers to negotiate a maximum plaintext record
size during the TLS handshake. If a TLS endpoint receives a record larger
than its advertised limit, it must send a fatal "record_overflow" alert [1].
Currently, this limit is not visble to the kernel, particularly in the case
where userspace handles the handshake (tlshd/gnutls).

This series in conjunction with the respective userspace changes for tlshd [2]
and gnutls [3], adds support for the kernel the receive the negotiated record
size limit through the existing netlink communication layer, and use this
value to limit outgoing records to the size specified.

[1] https://www.rfc-editor.org/rfc/rfc8449
[2] https://github.com/oracle/ktls-utils/pull/112
[3] https://gitlab.com/gnutls/gnutls/-/merge_requests/1989

Wilfred Mallawa (4):
  net/handshake: get negotiated tls record size limit
  net/tls/tls_sw: use the record size limit specified
  nvme/host/tcp: set max record size in the tls context
  nvme/target/tcp: set max record size in the tls context

 Documentation/netlink/specs/handshake.yaml |  3 +++
 Documentation/networking/tls-handshake.rst |  8 +++++++-
 drivers/nvme/host/tcp.c                    | 18 +++++++++++++++++-
 drivers/nvme/target/tcp.c                  | 16 +++++++++++++++-
 include/net/handshake.h                    |  4 +++-
 include/net/tls.h                          |  1 +
 include/uapi/linux/handshake.h             |  1 +
 net/handshake/genl.c                       |  5 +++--
 net/handshake/tlshd.c                      | 15 +++++++++++++--
 net/sunrpc/svcsock.c                       |  4 +++-
 net/sunrpc/xprtsock.c                      |  4 +++-
 net/tls/tls_sw.c                           | 10 +++++++++-
 12 files changed, 78 insertions(+), 11 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-08-07  0:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29  2:41 [RFC 0/4] net/tls: add support for the record size limit extension Wilfred Mallawa
2025-07-29  2:41 ` [RFC 1/4] net/handshake: get negotiated tls record size limit Wilfred Mallawa
2025-07-29  8:07   ` Damien Le Moal
2025-07-29  8:12   ` Hannes Reinecke
2025-08-07  0:03     ` Wilfred Mallawa
2025-07-29  2:41 ` [RFC 2/4] net/tls/tls_sw: use the record size limit specified Wilfred Mallawa
2025-07-29  8:13   ` Damien Le Moal
2025-08-07  0:04     ` Wilfred Mallawa
2025-07-29  2:41 ` [RFC 3/4] nvme/host/tcp: set max record size in the tls context Wilfred Mallawa
2025-07-29  8:16   ` Hannes Reinecke
2025-07-29  2:41 ` [RFC 4/4] nvme/target/tcp: " Wilfred Mallawa
2025-07-29  8:16   ` Hannes Reinecke
2025-07-29 13:37 ` [RFC 0/4] net/tls: add support for the record size limit extension Chuck Lever
2025-08-07  0:14   ` Wilfred Mallawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).