Skip to content
  • Mathias Krause's avatar
    crypto: user - re-add size check for CRYPTO_MSG_GETALG · 055ddaac
    Mathias Krause authored
    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")
    Cc: stable@vger.kernel.org	# v4.2
    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>
    055ddaac