An error occurred while fetching folder content.
KEYS: fix "ca_keys=" partial key matching
Mimi Zohar authored
[ Upstream commit f2b3dee4 ]

The call to asymmetric_key_hex_to_key_id() from ca_keys_setup()
silently fails with -ENOMEM.  Instead of dynamically allocating
memory from a __setup function, this patch defines a variable
and calls __asymmetric_key_hex_to_key_id(), a new helper function,
directly.

This bug was introduced by 'commit 46963b77

 ("KEYS: Overhaul
key identification when searching for asymmetric keys")'.

Changelog:
- for clarification, rename hexlen to asciihexlen in
  asymmetric_key_hex_to_key_id()
- add size argument to __asymmetric_key_hex_to_key_id() - David Howells
- inline __asymmetric_key_hex_to_key_id() - David Howells
- remove duplicate strlen() calls
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 3.18
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
07519e4a
Name Last commit Last update
..
asymmetric_keys KEYS: fix "ca_keys=" partial key matching
async_tx dmaengine: fix xor sources continuation
842.c crypto: prefix module autoloading with "crypto-"
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Makefile crypto: sha-mb - multibuffer crypto infrastructure
ablk_helper.c crypto: ablk_helper - Replace memcpy with struct assignment
ablkcipher.c crypto: skcipher - Use eseqiv even on UP machines
aead.c crypto: user - fix info leaks in report API
aes_generic.c crypto: add missing crypto module aliases
af_alg.c crypto: af_alg - fix backlog handling
ahash.c crypto: hash - initialize entry len for null input in crypto hash sg list walk
algapi.c crypto: include crypto- module prefix in template
algboss.c crypto: algboss - Hold ref count on larval
algif_hash.c net: update consumers of MSG_MORE to recognize MSG_SENDPAGE_NOTLAST
algif_skcipher.c crypto: algif - avoid excessive use of socket buffer in skcipher
ansi_cprng.c crypto: add missing crypto module aliases
anubis.c crypto: prefix module autoloading with "crypto-"
api.c crypto: prefix module autoloading with "crypto-"
arc4.c crypto: prefix module autoloading with "crypto-"
authenc.c crypto: include crypto- module prefix in template
authencesn.c crypto: include crypto- module prefix in template
blkcipher.c crypto: allow blkcipher walks over AEAD data
blowfish_common.c crypto: blowfish - split generic and common c code
blowfish_generic.c crypto: add missing crypto module aliases
camellia_generic.c crypto: add missing crypto module aliases
cast5_generic.c crypto: add missing crypto module aliases
cast6_generic.c crypto: add missing crypto module aliases
cast_common.c crypto: make tables used from assembler __visible
cbc.c crypto: include crypto- module prefix in template
ccm.c crypto: include crypto- module prefix in template
chainiv.c crypto: include crypto- module prefix in template
cipher.c crypto: cipher - Fix checkpatch errors
cmac.c crypto: include crypto- module prefix in template
compress.c crypto: compress - Fix checkpatch errors
crc32.c crypto: prefix module autoloading with "crypto-"
crc32c_generic.c crypto: add missing crypto module aliases
crct10dif_common.c crypto: crct10dif - Add fallback for broken initrds
crct10dif_generic.c crypto: add missing crypto module aliases
cryptd.c crypto: include crypto- module prefix in template
crypto_null.c crypto: prefix module autoloading with "crypto-"
crypto_user.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6 into next
crypto_wq.c crypto: crypto_wq - Fix late crypto work queue initialization
ctr.c crypto: include crypto- module prefix in template
cts.c crypto: include crypto- module prefix in template
deflate.c crypto: prefix module autoloading with "crypto-"
des_generic.c crypto: add missing crypto module aliases
drbg.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
ecb.c crypto: include crypto- module prefix in template
eseqiv.c crypto: include crypto- module prefix in template
fcrypt.c crypto: prefix module autoloading with "crypto-"
fips.c
gcm.c
gf128mul.c
ghash-generic.c
hash_info.c
hmac.c
internal.h
khazad.c
krng.c
lrw.c
lz4.c
lz4hc.c
lzo.c
mcryptd.c
md4.c
md5.c
memneq.c
michael_mic.c
pcbc.c
pcompress.c
pcrypt.c
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c
salsa20_generic.c
scatterwalk.c
seed.c
seqiv.c
serpent_generic.c
sha1_generic.c
sha256_generic.c
sha512_generic.c
shash.c
tcrypt.c
tcrypt.h
tea.c
testmgr.c
testmgr.h
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c