• Herbert Xu's avatar
    crypto: algif_hash - Require setkey before accept(2) · 6de62f15
    Herbert Xu authored
    Hash implementations that require a key may crash if you use
    them without setting a key.  This patch adds the necessary checks
    so that if you do attempt to use them without a key that we return
    -ENOKEY instead of proceeding.
    
    This patch also adds a compatibility path to support old applications
    that do acept(2) before setkey.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    6de62f15
algif_hash.c 9.97 KB