diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 1436a36c1934..af3be9a29d6d 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -1479,7 +1479,7 @@ static int decrypt_internal(struct sock *sk, struct sk_buff *skb, } if (prot->version == TLS_1_3_VERSION) memcpy(iv + iv_offset, tls_ctx->rx.iv, - crypto_aead_ivsize(ctx->aead_recv)); + prot->iv_size + prot->salt_size); else memcpy(iv + iv_offset, tls_ctx->rx.iv, prot->salt_size);