* Patch "ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()" has been added to the 4.4-stable tree
@ 2017-06-08 7:33 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-08 7:33 UTC (permalink / raw)
To: ben, davem, gregkh, kraig; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ipv6-xfrm-handle-errors-reported-by-xfrm6_find_1stfragopt.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Thu Jun 8 09:11:25 CEST 2017
From: Ben Hutchings <ben@decadent.org.uk>
Date: Wed, 31 May 2017 13:15:41 +0100
Subject: ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
From: Ben Hutchings <ben@decadent.org.uk>
[ Upstream commit 6e80ac5cc992ab6256c3dae87f7e57db15e1a58c ]
xfrm6_find_1stfragopt() may now return an error code and we must
not treat it as a length.
Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Craig Gallek <kraig@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/xfrm6_mode_ro.c | 2 ++
net/ipv6/xfrm6_mode_transport.c | 2 ++
2 files changed, 4 insertions(+)
--- a/net/ipv6/xfrm6_mode_ro.c
+++ b/net/ipv6/xfrm6_mode_ro.c
@@ -47,6 +47,8 @@ static int xfrm6_ro_output(struct xfrm_s
iph = ipv6_hdr(skb);
hdr_len = x->type->hdr_offset(x, skb, &prevhdr);
+ if (hdr_len < 0)
+ return hdr_len;
skb_set_mac_header(skb, (prevhdr - x->props.header_len) - skb->data);
skb_set_network_header(skb, -x->props.header_len);
skb->transport_header = skb->network_header + hdr_len;
--- a/net/ipv6/xfrm6_mode_transport.c
+++ b/net/ipv6/xfrm6_mode_transport.c
@@ -28,6 +28,8 @@ static int xfrm6_transport_output(struct
iph = ipv6_hdr(skb);
hdr_len = x->type->hdr_offset(x, skb, &prevhdr);
+ if (hdr_len < 0)
+ return hdr_len;
skb_set_mac_header(skb, (prevhdr - x->props.header_len) - skb->data);
skb_set_network_header(skb, -x->props.header_len);
skb->transport_header = skb->network_header + hdr_len;
Patches currently in stable-queue which might be from ben@decadent.org.uk are
queue-4.4/ipv6-xfrm-handle-errors-reported-by-xfrm6_find_1stfragopt.patch
queue-4.4/ipv6-fix-leak-in-ipv6_gso_segment.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-08 7:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-08 7:33 Patch "ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).