• Herbert Xu's avatar
    crypto: algif_aead - Fix bogus request dereference in completion function · e6534aeb
    Herbert Xu authored
    The algif_aead completion function tries to deduce the aead_request
    from the crypto_async_request argument.  This is broken because
    the API does not guarantee that the same request will be pased to
    the completion function.  Only the value of req->data can be used
    in the completion function.
    
    This patch fixes it by storing a pointer to sk in areq and using
    that instead of passing in sk through req->data.
    
    Fixes: 83094e5e ("crypto: af_alg - add async support to...")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    e6534aeb
algif_aead.c 18.9 KB