• Herbert Xu's avatar
    crypto: lskcipher - Copy IV in lskcipher glue code always · 7cfc2ab3
    Herbert Xu authored
    The lskcipher glue code for skcipher needs to copy the IV every
    time rather than only on the first and last request.  Otherwise
    those algorithms that use IV to perform chaining may break, e.g.,
    CBC.
    
    This is because crypto_skcipher_import/export do not include the
    IV as part of the saved state.
    
    Reported-by: syzbot+b90b904ef6bdfdafec1d@syzkaller.appspotmail.com
    Fixes: 662ea18d ("crypto: skcipher - Make use of internal state")
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    7cfc2ab3
lskcipher.c 17.6 KB