• Herbert Xu's avatar
    crypto: user - Fix crypto_alg_match race · 016baaa1
    Herbert Xu authored
    The function crypto_alg_match returns an algorithm without taking
    any references on it.  This means that the algorithm can be freed
    at any time, therefore all users of crypto_alg_match are buggy.
    
    This patch fixes this by taking a reference count on the algorithm
    to prevent such races.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    016baaa1
crypto_user.c 12.7 KB