linux-stable/drivers/staging
Eric Biggers 8d906d183b crypto: hash - annotate algorithms taking optional key
commit a208fa8f33 upstream.

We need to consistently enforce that keyed hashes cannot be used without
setting the key.  To do this we need a reliable way to determine whether
a given hash algorithm is keyed or not.  AF_ALG currently does this by
checking for the presence of a ->setkey() method.  However, this is
actually slightly broken because the CRC-32 algorithms implement
->setkey() but can also be used without a key.  (The CRC-32 "key" is not
actually a cryptographic key but rather represents the initial state.
If not overridden, then a default initial state is used.)

Prepare to fix this by introducing a flag CRYPTO_ALG_OPTIONAL_KEY which
indicates that the algorithm has a ->setkey() method, but it is not
required to be called.  Then set it on all the CRC-32 algorithms.

The same also applies to the Adler-32 implementation in Lustre.

Also, the cryptd and mcryptd templates have to pass through the flag
from their underlying algorithm.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 20:23:00 +01:00
..
android staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl 2018-01-17 09:45:26 +01:00
board License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ccree staging: ccree: fix fips event irq handling build 2018-02-03 17:39:19 +01:00
clocking-wizard
comedi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dgnc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
emxx_udc
fbtft License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsl-dpaa2 staging: fsl-dpaa2/eth: Account for Rx FD buffers on error path 2017-12-10 13:40:41 +01:00
fsl-mc staging: fsl-mc/dpio: Fix incorrect comparison 2017-12-10 13:40:42 +01:00
fwserial License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gdm724x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
goldfish staging: goldfish: (Coding Style) Fixed parenthesis alignment. 2017-08-31 18:21:37 +02:00
greybus staging: greybus: light: Release memory obtained by kasprintf 2017-12-25 14:26:30 +01:00
gs_fpgaboot
iio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irda
ks7010 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lustre crypto: hash - annotate algorithms taking optional key 2018-02-16 20:23:00 +01:00
media License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
most License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mt29f_spinand staging: mt29f_spinand: Enable the read ECC before program the page 2017-09-18 12:25:31 +02:00
netlogic
nvec License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
octeon
octeon-usb
olpc_dcon License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pi433 staging: pi433: Move limit check to switch default to kill warning 2017-09-18 12:25:31 +02:00
rtl8188eu staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID 2018-02-03 17:39:17 +01:00
rtl8192e License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtl8192u License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtl8712 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtl8723bs License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtlwifi staging: rtl8822be: Keep array subscript no lower than zero 2017-12-10 13:40:41 +01:00
rts5208 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
skein License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sm750fb staging: sm750fb: Fix parameter mistake in poke32 2017-11-21 09:49:24 +01:00
speakup License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
typec staging: typec: fusb302: make structure fusb302_psy_desc static 2017-09-01 19:06:44 +02:00
unisys License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vboxvideo staging: vboxvideo: Fix reporting invalid suggested-offset-properties 2017-11-21 09:49:24 +01:00
vc04_services License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vme License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vt6655 vt6655: Fix a possible sleep-in-atomic bug in vt6655_suspend 2017-12-20 10:10:35 +01:00
vt6656 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wilc1000 staging: wilc1000: Fix bssid buffer offset in Txq 2017-11-21 09:49:23 +01:00
wlan-ng License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xgifb License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00