]> git.baikalelectronics.ru Git - kernel.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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 Jun 2016 09:39:25 +0000 (17:39 +0800)
commite3a9aa214e04f1b42ff54ed61fab906f80e8aaa2
treecbeb3d328b71c83c4d84dec131abec09d2ccff7f
parent44357fd142dc48f7f3834fc194be33369d00b038
crypto: user - re-add size check for CRYPTO_MSG_GETALG

Commit d56c608c0088 ("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: d56c608c0088 ("crypto: user - Add CRYPTO_MSG_DELRNG")
Cc: stable@vger.kernel.org # v4.2
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>
crypto/crypto_user.c