Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce1abd25 authored by Mathias Krause's avatar Mathias Krause Committed by Greg Kroah-Hartman
Browse files

crypto: user - re-add size check for CRYPTO_MSG_GETALG



commit 055ddaace03580455a7b7dbea8e93d62acee61fc upstream.

Commit 9aa867e4 ("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: 9aa867e4 ("crypto: user - Add CRYPTO_MSG_DELRNG")
Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5ae68873
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment