freebsd-skq/sys/opencrypto
Mark Johnston 1a04f0156c cryptodev: Fix some input validation bugs
- When we do not have a separate IV, make sure that the IV length
  specified by the session is not larger than the payload size.
- Disallow AEAD requests without a separate IV.  crp_sanity() asserts
  that CRYPTO_F_IV_SEPARATE is set for AEAD requests, and some (but not
  all) drivers require it.
- Return EINVAL for AEAD requests if an IV is specified but the
  transform does not expect one.

Reported by:	syzbot+c9e8f6ff5cb7fa6a1250@syzkaller.appspotmail.com
Reported by:	syzbot+007341439ae295cee74f@syzkaller.appspotmail.com
Reported by:	syzbot+46e0cc42a428b3b0a40d@syzkaller.appspotmail.com
Reported by:	syzbot+2c4d670173b8bdb947df@syzkaller.appspotmail.com
Reported by:	syzbot+220faa5eeb4d47b23877@syzkaller.appspotmail.com
Reported by:	syzbot+e83434b40f05843722f7@syzkaller.appspotmail.com
Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30154
2021-05-11 17:36:12 -04:00
..
_cryptodev.h
cbc_mac.c Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
cbc_mac.h Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
criov.c crypto(9): add CRYPTO_BUF_VMPAGE 2020-08-26 02:37:42 +00:00
crypto.c OCF: Remove support for asymmetric cryptographic operations. 2021-04-12 14:28:43 -07: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 cryptodev: Fix some input validation bugs 2021-05-11 17:36:12 -04:00
cryptodev.h OCF: Remove support for asymmetric cryptographic operations. 2021-04-12 14:28:43 -07:00
cryptosoft.c opencrypto: Make cryptosoft attach silently 2021-03-05 13:11:25 -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
gfmult.h
gmac.c Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
gmac.h Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
ktls_ocf.c ktls: Fix non-inplace TLS 1.3 encryption. 2021-03-10 11:07:40 -08: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_icm.c Improve support for stream ciphers in the software encryption interface. 2020-05-22 16:29:09 +00:00
xform_aes_xts.c Include sys/types.h here 2020-09-15 15:21:29 +00:00
xform_auth.h Add an implementation of CHACHA20_POLY1305 to cryptosoft. 2021-02-18 09:26:23 -08:00
xform_cbc_mac.c Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
xform_chacha20_poly1305.c Add an implementation of CHACHA20_POLY1305 to cryptosoft. 2021-02-18 09:26:23 -08:00
xform_cml.c Various cleanups to the software encryption transform interface. 2020-05-20 21:21:01 +00:00
xform_comp.h Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_deflate.c Replace some K&R function definitions with ANSI C. 2020-11-03 22:32:30 +00:00
xform_enc.h Add an OCF algorithm for ChaCha20-Poly1305 AEAD. 2021-02-18 09:26:00 -08:00
xform_gmac.c Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
xform_null.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_poly1305.c poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. 2021-03-05 09:55:11 -08:00
xform_rijndael.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_rmd160.c Adjust crypto_apply function callbacks for OCF. 2020-06-10 21:18:19 +00:00
xform_sha1.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform_sha2.c Consistently use C99 fixed-width types in the in-kernel crypto code. 2020-11-03 22:27:54 +00:00
xform.c Remove MD5 HMAC from OCF. 2020-05-11 22:08:08 +00:00
xform.h Remove MD5 HMAC from OCF. 2020-05-11 22:08:08 +00:00