• Herbert Xu's avatar
    crypto: hash - Zap unaligned buffers · 8c32c516
    Herbert Xu authored
    Some unaligned buffers on the stack weren't zapped properly which
    may cause secret data to be leaked.  This patch fixes them by doing
    a zero memset.
    
    It is also possible for us to place random kernel stack contents
    in the digest buffer if a digest operation fails.  This is fixed
    by only copying if the operation succeeded.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    8c32c516
ahash.c 7.41 KB