svn commit: r359524 - head/sys/kgssapi/krb5
John Baldwin
jhb at FreeBSD.org
Wed Apr 1 17:15:45 UTC 2020
Author: jhb
Date: Wed Apr 1 17:09:21 2020
New Revision: 359524
URL: https://svnweb.freebsd.org/changeset/base/359524
Log:
Set crp_ilen for crypto requests.
Assertions in crypto_dispatch() depend on this value being set to
verify that payload and AAD regions are in bounds. Also, requests
that use a single kernel buffer rely on this to know how long the
buffer is for bus_dma, etc.
Reported by: kp
Modified:
head/sys/kgssapi/krb5/kcrypto_aes.c
Modified: head/sys/kgssapi/krb5/kcrypto_aes.c
==============================================================================
--- head/sys/kgssapi/krb5/kcrypto_aes.c Wed Apr 1 17:08:55 2020 (r359523)
+++ head/sys/kgssapi/krb5/kcrypto_aes.c Wed Apr 1 17:09:21 2020 (r359524)
@@ -158,6 +158,7 @@ aes_encrypt_1(const struct krb5_key_state *ks, int buf
crp->crp_buf_type = buftype;
crp->crp_buf = buf;
+ crp->crp_ilen = skip + len;
crp->crp_opaque = as;
crp->crp_callback = aes_crypto_cb;
@@ -329,6 +330,7 @@ aes_checksum(const struct krb5_key_state *ks, int usag
crp->crp_flags = CRYPTO_F_CBIFSYNC;
crp->crp_buf_type = CRYPTO_BUF_MBUF;
crp->crp_mbuf = inout;
+ crp->crp_ilen = skip + inlen + 12;
crp->crp_opaque = as;
crp->crp_callback = aes_crypto_cb;
More information about the svn-src-head
mailing list