crypto: ixp4xx - Simplify and harden key parsing
authorMathias Krause <mathias.krause@secunet.com>
Tue, 15 Oct 2013 11:49:32 +0000 (13:49 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 16 Oct 2013 12:56:26 +0000 (20:56 +0800)
commit56902781cd037f4d6380cb037b5f50076bb82549
tree644505a855424b0fa61dae07a5675e765ee88283
parentfddc2c43c48d62f70553785d1220505f33aebe0e
crypto: ixp4xx - Simplify and harden key parsing

Use the common helper function crypto_authenc_extractkeys() for key
parsing. Also ensure the keys do fit into the corresponding buffers.
Otherwise memory corruption might occur.

Cc: Christian Hohnstaedt <chohnstaedt@innominate.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ixp4xx_crypto.c