Re: [PATCH bpf-next v2 1/2] bpf,ktls: Fix data corruption when using bpf_msg_pop_data() in ktls
From: Jakub Kicinski
Date: Mon Jun 09 2025 - 15:34:45 EST
On Mon, 9 Jun 2025 10:08:52 +0800 Jiayuan Chen wrote:
> When sending plaintext data, we initially calculated the corresponding
> ciphertext length. However, if we later reduced the plaintext data length
> via socket policy, we failed to recalculate the ciphertext length.
>
> This results in transmitting buffers containing uninitialized data during
> ciphertext transmission.
>
> This causes uninitialized bytes to be appended after a complete
> "Application Data" packet, leading to errors on the receiving end when
> parsing TLS record.
Acked-by: Jakub Kicinski <kuba@xxxxxxxxxx>