Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2021 19:08:19 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3fa034210c75 - main - ktls: Fix non-inplace TLS 1.3 encryption.
Message-ID:  <202103101908.12AJ8Jw6069324@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=3fa034210c75431173cb0a2375f6938386e25315

commit 3fa034210c75431173cb0a2375f6938386e25315
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-03-10 19:07:40 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-03-10 19:07:40 +0000

    ktls: Fix non-inplace TLS 1.3 encryption.
    
    Copy the iovec for the trailer from the proper place.  This is the same
    fix for CBC encryption from ff6a7e4ba6bf.
    
    Reported by:    gallatin
    Reviewed by:    gallatin, markj
    Fixes:          49f6925ca
    Sponsored by:   Netflix
    Differential Revision:  https://reviews.freebsd.org/D29177
---
 sys/opencrypto/ktls_ocf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c
index 7414e26bb3e2..2f2249cd3bfe 100644
--- a/sys/opencrypto/ktls_ocf.c
+++ b/sys/opencrypto/ktls_ocf.c
@@ -574,7 +574,7 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls,
 	if (!inplace) {
 		/* Duplicate the output iov to append the trailer. */
 		memcpy(out_iov, outiov, outiovcnt * sizeof(*out_iov));
-		out_iov[outiovcnt] = iov[outiovcnt];
+		out_iov[outiovcnt] = iov[iniovcnt];
 
 		out_uio.uio_iov = out_iov;
 		out_uio.uio_iovcnt = outiovcnt + 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103101908.12AJ8Jw6069324>