freebsd-dev/sys/crypto
Marcin Wojtas ccbaa67d8b Change return types of hash update functions in SHA-NI
r359374 introduced crypto_apply function which takes as argument a function pointer
that is expected to return an int, however aesni hash update functions
return void.
Because of that the function pointer passed was simply cast with
its return value changed.
This resulted in undefined behavior, in particular when mbuf is used, (ipsec)
m_apply checks return value of function pointer passed to it
and in our case bogusly fails after calculating hash of the first mbuf
in chain.
Fix it by changing signatures of sha update routines in aesni and
dropping the casts.

Submitted by: Kornel Duleba
Reviewed by: jhb, cem
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D25030
2020-05-28 09:13:20 +00:00
..
aesni Change return types of hash update functions in SHA-NI 2020-05-28 09:13:20 +00:00
armv8 Retire the CRYPTO_F_IV_GENERATE flag. 2020-04-20 22:24:49 +00:00
blake2 Refactor driver and consumer interfaces for OCF (in-kernel crypto). 2020-03-27 18:25:23 +00:00
camellia
ccp Add support for optional separate output buffers to in-kernel crypto. 2020-05-25 22:12:04 +00:00
chacha20 Improve support for stream ciphers in the software encryption interface. 2020-05-22 16:29:09 +00:00
des Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
libsodium Bring in compatibility glue for libsodium 2018-08-17 00:27:56 +00:00
rc4
rijndael rijndael (AES): Avoid leaking sensitive data on kernel stack 2018-10-26 20:53:01 +00:00
sha2 libmd: Always erase context in _Final method, and when doing 2018-07-20 07:01:28 +00:00
siphash Fix C++ includability of crypto headers with static array sizes 2016-10-18 23:20:49 +00:00
skein libmd: Always erase context in _Final method, and when doing 2018-07-20 07:01:28 +00:00
via Remove MD5 HMAC from OCF. 2020-05-11 22:08:08 +00:00
intake.h Implement boot-time encryption key passing (keybuf) 2017-04-01 05:05:22 +00:00
sha1.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
sha1.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00