]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerTodd Vierling <todd.vierling@oracle.com>
Fri, 9 Dec 2016 14:46:31 +0000 (09:46 -0500)
commit65bcc66991e30081b6b3a24a51711c25508440b0
tree394795570a4cc010d454a5c094fbed8d87000de6
parent318cfc5a477c3b0eff3ff514c4ed7174f4ec95d1
crypto: hash - Fix page length clamping in hash walk

[ Upstream commit 13f4bb78cf6a312bbdec367ba3da044b09bf0e29 ]

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: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 1669540814a1cf57ff50e037c5bf84f831ea4e09)
Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
crypto/ahash.c