kernel-fxtec-pro1x/drivers/crypto
Russell King e72f407ee7 crypto: marvell/cesa - initialise struct mv_cesa_ahash_req
When a AF_ALG fd is accepted a second time (hence hash_accept() is
used), hash_accept_parent() allocates a new private context using
sock_kmalloc().  This context is uninitialised.  After use of the new
fd, we eventually end up with the kernel complaining:

marvell-cesa f1090000.crypto: dma_pool_free cesa_padding, c0627770/0 (bad dma)

where c0627770 is a random address.  Poisoning the memory allocated by
the above sock_kmalloc() produces kernel oopses within the marvell hash
code, particularly the interrupt handling.

The following simplfied call sequence occurs:

hash_accept()
  crypto_ahash_export()
    marvell hash export function
  af_alg_accept()
    hash_accept_parent()	<== allocates uninitialised struct hash_ctx
  crypto_ahash_import()
    marvell hash import function

hash_ctx contains the struct mv_cesa_ahash_req in its req.__ctx member,
and, as the marvell hash import function only partially initialises
this structure, we end up with a lot of members which are left with
whatever data was in memory prior to sock_kmalloc().

Add zero-initialisation of this structure.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Boris Brezillon <boris.brezillon@free-electronc.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-10-14 22:23:18 +08:00
..
amcc crypto: amcc - replace get_sg_count by sg_nents_for_len 2015-09-21 23:05:53 +08:00
caam crypto: caam - add support for acipher xts(aes) 2015-10-08 21:42:20 +08:00
ccp crypto: ccp - Use module name in driver structures 2015-10-08 21:42:18 +08:00
marvell crypto: marvell/cesa - initialise struct mv_cesa_ahash_req 2015-10-14 22:23:18 +08:00
nx crypto: 842 - Add CRC and validation support 2015-10-14 22:23:17 +08:00
qat crypto: akcipher - Changes to asymmetric key API 2015-10-14 22:23:16 +08:00
qce crypto: qce - dma_map_sg can handle chained SG 2015-10-08 21:42:19 +08:00
sunxi-ss crypto: sunxi-ss - Fix a possible driver hang with ciphers 2015-09-10 17:22:55 +08:00
ux500 crypto: ux500 - Fix module autoload for OF platform drivers 2015-09-21 22:00:37 +08:00
vmx crypto: vmx - Fixing opcode issue 2015-08-24 22:07:43 +08:00
atmel-aes-regs.h crypto: atmel - add Atmel AES driver 2012-07-11 11:07:40 +08:00
atmel-aes.c crypto: atmel - Check for clk_prepare_enable() return value 2015-10-08 21:42:21 +08:00
atmel-sha-regs.h crypto: atmel-sha - add support for latest release of the IP (0x410) 2013-03-10 16:46:42 +08:00
atmel-sha.c crypto: atmel - Check for clk_prepare_enable() return value 2015-10-08 21:42:21 +08:00
atmel-tdes-regs.h crypto: atmel-tdes - add support for latest release of the IP (0x700) 2013-03-10 16:46:42 +08:00
atmel-tdes.c crypto: atmel - Check for clk_prepare_enable() return value 2015-10-08 21:42:21 +08:00
bfin_crc.c crypto: bfin_crc - replace sg_count by sg_nents 2015-09-21 23:05:53 +08:00
bfin_crc.h crypto: bfin_crc - access crc registers by readl and writel functions 2014-04-16 20:40:15 +08:00
geode-aes.c crypto: geode - Don't use tfm->__crt_alg->cra_name directly 2014-05-22 21:03:13 +08:00
geode-aes.h crypto: geode - Consistently use AES_KEYSIZE_128 2014-05-22 21:03:12 +08:00
hifn_795x.c crypto: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
img-hash.c crypto: img-hash - fix spelling mistake in dev_err error message 2015-08-04 17:41:31 +08:00
ixp4xx_crypto.c crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
Kconfig crypto: ccp - Change references to accelerator to offload 2015-10-08 21:42:18 +08:00
Makefile crypto: sunxi-ss - Add Allwinner Security System crypto accelerator 2015-07-20 15:54:08 +08:00
mv_cesa.c crypto: marvell/cesa - another fix up for of_get_named_gen_pool() rename 2015-07-03 11:37:02 -07:00
mv_cesa.h crypto: mv_cesa - Add missing #define 2014-08-29 21:46:36 +08:00
mxs-dcp.c crypto: mxs-dcp - fix type of ret for wait_for_completion_timeout 2015-02-28 23:31:36 +13:00
n2_asm.S crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
n2_core.c Merge branch 'mvebu/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc 2015-06-19 22:07:07 +08:00
n2_core.h crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
omap-aes.c crypto: omap-aes - Use BIT() macro 2015-07-08 15:18:46 +08:00
omap-des.c crypto: omap-des - Fix unmapping of dma channels 2015-07-06 16:20:37 +08:00
omap-sham.c crypto/omap-sham: remove an open coded access to ->page_link 2015-08-17 08:12:57 -06:00
padlock-aes.c x86/fpu: Rename i387.h to fpu/api.h 2015-05-19 15:47:30 +02:00
padlock-sha.c x86/fpu: Rename i387.h to fpu/api.h 2015-05-19 15:47:30 +02:00
picoxcell_crypto.c crypto: picoxcell - Fix module autoload for OF platform driver 2015-09-21 22:00:36 +08:00
picoxcell_crypto_regs.h crypto: picoxcell - add support for the picoxcell crypto engines 2011-02-21 22:42:40 +11:00
s5p-sss.c crypto: drop owner assignment from platform_drivers 2014-10-20 16:20:25 +02:00
sahara.c crypto: sahara - dma_map_sg can handle chained SG 2015-10-01 21:56:56 +08:00
talitos.c crypto: talitos - dma_map_sg can handle chained SG 2015-10-01 21:49:40 +08:00
talitos.h crypto: talitos - Prevent panic in probe error path 2015-08-10 23:19:05 +08:00