ktls: Fix CBC encryption when input and output iov sizes are different
Reported by: gallatin
Tested by: gallatin
Fixes: 49f6925ca
Differential Revision: https://reviews.freebsd.org/D29073
This commit is contained in:
parent
0d3b3beeb2
commit
ff6a7e4ba6
@ -298,8 +298,8 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls,
|
|||||||
memcpy(crp.crp_iv, hdr + 1, AES_BLOCK_LEN);
|
memcpy(crp.crp_iv, hdr + 1, AES_BLOCK_LEN);
|
||||||
crypto_use_uio(&crp, &uio);
|
crypto_use_uio(&crp, &uio);
|
||||||
if (!inplace) {
|
if (!inplace) {
|
||||||
memcpy(out_iov, outiov, sizeof(*iniov) * outiovcnt);
|
memcpy(out_iov, outiov, sizeof(*outiov) * outiovcnt);
|
||||||
out_iov[outiovcnt] = iov[outiovcnt + 1];
|
out_iov[outiovcnt] = iov[iniovcnt + 1];
|
||||||
out_uio.uio_iov = out_iov;
|
out_uio.uio_iov = out_iov;
|
||||||
out_uio.uio_iovcnt = outiovcnt + 1;
|
out_uio.uio_iovcnt = outiovcnt + 1;
|
||||||
out_uio.uio_offset = 0;
|
out_uio.uio_offset = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user