Skip to content

Conversation

@twilfredo
Copy link
Contributor

RFC 8449 [1] Section 4 defines the record_size_limit TLS extension, which allows peers to negotiate a maximum plaintext record size during the TLS handshake. The value must be between 64 bytes and 16,384 bytes (2^14). If a TLS endpoint receives a record larger than its advertised limit, it must send a fatal record_overflow alert.

This patch fetches maximum support send size as specified by the record size limit extension or as defined in GnuTLS, this value is then passed to the kernel through setsockopt() using the new TLS_TX_MAX_PAYLOAD_LEN option, such that the kernel can ensure outgoing records do not exceed the size specified.

The respective kernel changes are currently applied to net-next [2].

[1] https://www.rfc-editor.org/rfc/rfc8449#section-4
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=82cb5be6ad64198a3a028aeb49dcc7f6224d558a

@twilfredo twilfredo force-pushed the wilfred/record-size-ext-v6 branch 2 times, most recently from 8b83067 to dc30546 Compare October 29, 2025 02:39
@chucklever
Copy link
Member

Well, this is the key part of the kernel commit:

Signed-off-by: Wilfred Mallawa [email protected]
Reviewed-by: Sabrina Dubroca [email protected]
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski [email protected]

So looks like this is now destined to be merged into the Linux kernel. I'll have a look at the ktls-utils PR.

@twilfredo twilfredo force-pushed the wilfred/record-size-ext-v6 branch from dc30546 to 500eead Compare October 29, 2025 23:11
@twilfredo twilfredo force-pushed the wilfred/record-size-ext-v6 branch from 500eead to 39523df Compare November 6, 2025 22:57
@twilfredo twilfredo force-pushed the wilfred/record-size-ext-v6 branch from 39523df to d5ee227 Compare November 9, 2025 22:53
RFC 8449 [1] Section 4 defines the record_size_limit TLS extension, which
allows peers to negotiate a maximum plaintext record size during the
TLS handshake. The value must be between 64 bytes and 16,384 bytes (2^14).
If a TLS endpoint receives a record larger than its advertised limit, it
must send a fatal record_overflow alert.

This patch fetches maximum support send size as specified by the record
size limit extension or as defined in GnuTLS, this value is then passed to
the kernel through setsockopt() using the new TLS_TX_MAX_PAYLOAD_LEN
option, such that the kernel can ensure outgoing records do not exceed the
size specified.

The respective kernel changes are currently applied to net-next [2].

[1] https://www.rfc-editor.org/rfc/rfc8449#section-4
[2] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=82cb5be6ad64198a3a028aeb49dcc7f6224d558a

Signed-off-by: Wilfred Mallawa <[email protected]>
@twilfredo twilfredo force-pushed the wilfred/record-size-ext-v6 branch from d5ee227 to c1610ed Compare November 9, 2025 22:55
@twilfredo twilfredo requested a review from chucklever November 12, 2025 00:53
@chucklever chucklever merged commit 1fee064 into oracle:main Nov 12, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants