]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
crypto: user - re-add size check for CRYPTO_MSG_GETALG
authorMathias Krause <minipli@googlemail.com>
Wed, 22 Jun 2016 18:29:37 +0000 (20:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jul 2016 16:31:12 +0000 (09:31 -0700)
commitce1abd2563d07c1042a6e156fdbaa73e1e70b75f
tree65c54bb5b43959e2e6852a87ec87f097b80ccff8
parent5ae68873134c30bf83159b6d335b2f996c60346b
crypto: user - re-add size check for CRYPTO_MSG_GETALG

commit 055ddaace03580455a7b7dbea8e93d62acee61fc upstream.

Commit 9aa867e46565 ("crypto: user - Add CRYPTO_MSG_DELRNG")
accidentally removed the minimum size check for CRYPTO_MSG_GETALG
netlink messages. This allows userland to send a truncated
CRYPTO_MSG_GETALG message as short as a netlink header only making
crypto_report() operate on uninitialized memory by accessing data
beyond the end of the netlink message.

Fix this be re-adding the minimum required size of CRYPTO_MSG_GETALG
messages to the crypto_msg_min[] array.

Fixes: 9aa867e46565 ("crypto: user - Add CRYPTO_MSG_DELRNG")
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/crypto_user.c