freebsd-dev/sys/opencrypto
Mark Johnston 5072251428 cryptosoft: Avoid referencing end-of-buffer cursors
Once a crypto cursor has reached the end of its buffer, it is invalid to
call crypto_cursor_segment() for at least some crypto buffer types.
Reorganize loops to avoid this.

Fixes:	cfb7b942be ("cryptosoft: Use multi-block encrypt/decrypt for non-AEAD ciphers.")
Fixes:	a221a8f4a0 ("cryptosoft: Use multi-block encrypt/decrypt for AES-GCM.")
Fixes:	f8580fcaa1 ("cryptosoft: Use multi-block encrypt/decrypt for AES-CCM.")
Fixes:	5022c68732 ("cryptosoft: Use multi-block encrypt/decrypt for ChaCha20-Poly1305.")
Reported and tested by:	madpilot
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
2022-01-17 19:01:24 -05:00
..
_cryptodev.h
cbc_mac.c cryptosoft: Fix support for variable tag lengths in AES-CCM. 2021-10-06 14:08:48 -07:00
cbc_mac.h cryptosoft: Fix support for variable tag lengths in AES-CCM. 2021-10-06 14:08:48 -07:00
criov.c Fix "set but not used" in opencrypto, with a correction for the previous 2021-12-05 15:30:36 -07:00
crypto.c crypto: Add support for the XChaCha20-Poly1305 AEAD cipher. 2022-01-11 14:16:41 -08:00
cryptodeflate.c Replace some K&R function definitions with ANSI C. 2020-11-03 22:32:30 +00:00
cryptodev_if.m OCF: Remove support for asymmetric cryptographic operations. 2021-04-12 14:28:43 -07:00
cryptodev.c /dev/crypto: Store blocksize in cse rather than txform pointer. 2021-12-29 17:50:23 -08:00
cryptodev.h crypto: Add support for the XChaCha20-Poly1305 AEAD cipher. 2022-01-11 14:16:41 -08:00
cryptosoft.c cryptosoft: Avoid referencing end-of-buffer cursors 2022-01-17 19:01:24 -05:00
deflate.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
gfmult.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
gfmult.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
gmac.c GMAC: Reset initial hash value and counter in AES_GMAC_Reinit(). 2021-12-09 11:52:42 -08:00
gmac.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
ktls_ocf.c ktls: Support for TLS 1.3 receive offload. 2021-12-14 11:01:05 -08:00
ktls.h ktls: Support asynchronous dispatch of AEAD ciphers. 2021-08-30 13:11:52 -07:00
rmd160.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
rmd160.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_aes_cbc.c crypto: Re-add encrypt/decrypt_multi hooks to enc_xform. 2022-01-11 14:17:41 -08:00
xform_aes_icm.c crypto: Re-add encrypt/decrypt_multi hooks to enc_xform. 2022-01-11 14:17:41 -08:00
xform_aes_xts.c stand: Fix KASSERT use 2022-01-11 16:43:18 -07:00
xform_auth.h OCF: Hook up plain RIPEMD160 in cryptosoft and /dev/crypto. 2021-12-29 16:46:48 -08:00
xform_cbc_mac.c crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
xform_chacha20_poly1305.c crypto: Re-add encrypt/decrypt_multi hooks to enc_xform. 2022-01-11 14:17:41 -08:00
xform_cml.c crypto: Re-add encrypt/decrypt_multi hooks to enc_xform. 2022-01-11 14:17:41 -08:00
xform_comp.h crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
xform_deflate.c crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
xform_enc.h crypto: Re-add encrypt/decrypt_multi hooks to enc_xform. 2022-01-11 14:17:41 -08:00
xform_gmac.c crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
xform_null.c crypto: Re-add encrypt/decrypt_multi hooks to enc_xform. 2022-01-11 14:17:41 -08:00
xform_poly1305.c crypto: Define POLY1305_BLOCK_LEN constant. 2021-12-16 13:47:16 -08:00
xform_rmd160.c OCF: Hook up plain RIPEMD160 in cryptosoft and /dev/crypto. 2021-12-29 16:46:48 -08:00
xform_sha1.c crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
xform_sha2.c crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
xform.c crypto: Consistently use AES instead of Rijndael128 for the AES-CBC cipher. 2021-12-16 13:47:27 -08:00
xform.h Remove MD5 HMAC from OCF. 2020-05-11 22:08:08 +00:00