All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch added to 3.12-stable] crypto: hash - Fix page length clamping in hash walk
@ 2016-05-18 14:44 Jiri Slaby
  2016-05-18 14:44 ` [patch added to 3.12-stable] get_rock_ridge_filename(): handle malformed NM entries Jiri Slaby
                   ` (25 more replies)
  0 siblings, 26 replies; 31+ messages in thread
From: Jiri Slaby @ 2016-05-18 14:44 UTC (permalink / raw)
  To: stable; +Cc: Herbert Xu, Jiri Slaby

From: Herbert Xu <herbert@gondor.apana.org.au>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

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.

Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 crypto/ahash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/ahash.c b/crypto/ahash.c
index b246858ca032..781a8a73a7ff 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -64,8 +64,9 @@ static int hash_walk_new_entry(struct crypto_hash_walk *walk)
 	struct scatterlist *sg;
 
 	sg = walk->sg;
-	walk->pg = sg_page(sg);
 	walk->offset = sg->offset;
+	walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT);
+	walk->offset = offset_in_page(walk->offset);
 	walk->entrylen = sg->length;
 
 	if (walk->entrylen > walk->total)
-- 
2.8.2


^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2016-05-19  6:44 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 14:44 [patch added to 3.12-stable] crypto: hash - Fix page length clamping in hash walk Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] get_rock_ridge_filename(): handle malformed NM entries Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] Input: max8997-haptic - fix NULL pointer dereference Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] asmlinkage, pnp: Make variables used from assembler code visible Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] drm/radeon: fix PLL sharing on DCE6.1 (v2) Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] drm/i915: Bail out of pipe config compute loop on LPT Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] ARM: OMAP3: Fix booting with thumb2 kernel Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net/route: enforce hoplimit max value Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] decnet: Do not build routes to devices without decnet private data Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] route: do not cache fib route info on local routes with oif Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] atl2: Disable unimplemented scatter/gather feature Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] ipv4/fib: don't warn when primary address is missing if in_dev is dead Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net/mlx4_en: fix spurious timestamping callbacks Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net_sched: introduce qdisc_replace() helper Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net_sched: update hierarchical backlog too Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] sch_htb: update backlog as well Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] sch_dsmark: " Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] netem: Segment GSO packets on enqueue Jiri Slaby
2016-05-18 14:54   ` Eric Dumazet
2016-05-18 14:59     ` Jiri Slaby
2016-05-18 16:04       ` Eric Dumazet
2016-05-19  6:44         ` Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net: fix infoleak in llc Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net: fix infoleak in rtnetlink Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] VSOCK: do not disconnect socket when peer has shutdown SEND only Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net: bridge: fix old ioctl unlocked net device walk Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] net: fix a kernel infoleak in x25 module Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] ASN.1: Fix non-match detection failure on data overrun Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] KEYS: Fix ASN.1 indefinite length object parsing Jiri Slaby
2016-05-18 14:44 ` [patch added to 3.12-stable] sched: Remove lockdep check in sched_move_task() Jiri Slaby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.