The branch main has been updated by jhb:

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

commit 3fa034210c75431173cb0a2375f6938386e25315
Author:     John Baldwin <[email protected]>
AuthorDate: 2021-03-10 19:07:40 +0000
Commit:     John Baldwin <[email protected]>
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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to