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
This commit is contained in:
parent
72f8500f39
commit
02cb5b4be8
@ -158,6 +158,7 @@ aes_encrypt_1(const struct krb5_key_state *ks, int buftype, void *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 usage,
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user