HomeFreeBSD

OpenSSL: KTLS: Check for unprocessed receive records in ktls_configure_crypto.

Description

OpenSSL: KTLS: Check for unprocessed receive records in ktls_configure_crypto.

KTLS implementations currently assume that the start of the in-kernel
socket buffer is aligned with the start of a TLS record for the
receive side. The socket option to enable KTLS specifies the TLS
sequence number of this initial record.

When read ahead is enabled, data can be pending in the SSL read buffer
after negotiating session keys. This pending data must be examined to
ensurs that the kernel's socket buffer does not contain a partial TLS
record as well as to determine the correct sequence number of the
first TLS record to be processed by the kernel.

In preparation for enabling receive kernel offload for TLS 1.3, move
the existing logic to handle read ahead from t1_enc.c into ktls.c and
invoke it from ktls_configure_crypto().

Approved by: jkim
Obtained from: OpenSSL commit 85773128d0e80cd8dcc772a6931d385b8cf4acd1
MFC after: 1 week
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D34973

Details

Provenance
jhbAuthored on May 4 2022, 8:08 PM
Differential Revision
D34973: OpenSSL: KTLS: Check for unprocessed receive records in ktls_configure_crypto.
Parents
rGf6e5fcdc848f: OpenSSL: Cleanup record length checks for KTLS
Branches
Unknown
Tags
Unknown