]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: echainiv - Replace chaining with multiplication
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 7 Sep 2016 10:42:08 +0000 (18:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Sep 2016 08:12:43 +0000 (10:12 +0200)
commit77ead6507c98f793af265d09aa68533c59b8126d
tree60d3624aceedcc21126019a64fbaf17b6fcee8ac
parentaa3520cf8c14a61e315b7e43756464e45dcc7ed1
crypto: echainiv - Replace chaining with multiplication

commit 53a5d5ddccf849dbc27a8c1bba0b43c3a45fb792 upstream.

The current implementation uses a global per-cpu array to store
data which are used to derive the next IV.  This is insecure as
the attacker may change the stored data.

This patch removes all traces of chaining and replaces it with
multiplication of the salt and the sequence number.

Fixes: a10f554fa7e0 ("crypto: echainiv - Add encrypted chain IV...")
Reported-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/echainiv.c