diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-15 10:21:04 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-15 10:21:04 -0800 |
| commit | ca43444e4342e9ce38202fb1082d38a7afa8f977 (patch) | |
| tree | 3400d3466c252957ead4c87a19e5784cd1bf299c /crypto/ablkcipher.c | |
| parent | 173ae9ba63349194ae180622f05fb49f55a4df46 (diff) | |
| parent | 70d906bc17500edfa9bdd8c8b7e59618c7911613 (diff) | |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
"This fixes a boundary condition in the blkcipher SG walking code that
can lead to a crash when used with the new chacha20 algorithm"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: skcipher - Copy iv from desc even for 0-len walks
Diffstat (limited to 'crypto/ablkcipher.c')
| -rw-r--r-- | crypto/ablkcipher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index b4ffc5be1a93..e5b5721809e2 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -277,12 +277,12 @@ static int ablkcipher_walk_first(struct ablkcipher_request *req, if (WARN_ON_ONCE(in_irq())) return -EDEADLK; + walk->iv = req->info; walk->nbytes = walk->total; if (unlikely(!walk->total)) return 0; walk->iv_buffer = NULL; - walk->iv = req->info; if (unlikely(((unsigned long)walk->iv & alignmask))) { int err = ablkcipher_copy_iv(walk, tfm, alignmask); |
