crypto: hash - Fix page length clamping in hash walk
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 4 May 2016 09:52:56 +0000 (17:52 +0800)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:53 +0000 (10:42 +0200)
commitf220ec58d1e4f49cb6c761a859241c057844cdf2
treebfea16a474bd463abaa58be6abe1492f47e8e1a2
parent73dd3ac10bf81213a89538654aa005be6432e52d
crypto: hash - Fix page length clamping in hash walk

commit 13f4bb78cf6a312bbdec367ba3da044b09bf0e29 upstream.

The crypto hash walk code is broken when supplied with an offset
greater than or equal to PAGE_SIZE.  This patch fixes it by adjusting
walk->pg and walk->offset when this happens.

Cc: <stable@vger.kernel.org>
Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Willy Tarreau <w@1wt.eu>
crypto/ahash.c