• Herbert Xu's avatar
    crypto: s390 - Fix aes-cbc IV corruption · 898c8e6f
    Herbert Xu authored
    commit f262f0f5 upstream.
    
    The cbc-aes-s390 algorithm incorrectly places the IV in the tfm
    data structure.  As the tfm is shared between multiple threads,
    this introduces a possibility of data corruption.
    
    This patch fixes this by moving the parameter block containing
    the IV and key onto the stack (the block is 48 bytes long).
    
    The same bug exists elsewhere in the s390 crypto system and they
    will be fixed in subsequent patches.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    [bwh: Backported to 3.2: adjust context]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    898c8e6f
aes_s390.c 23.5 KB